Commit Graph
77 Commits
Author SHA1 Message Date
38eb2c0d2f Low context-sensitivity principle (#646)
Establish a principle that understanding the meaning and performance should not depend on expensive context, and explain what makes context expensive.

Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com>
Co-authored-by: Richard Smith <richard@metafoo.co.uk>
2021-08-03 10:20:46 -07:00
Jon Meow 61abc44aef Mention the RFC project column in docs (#688)
Nothing is automating "ready for review" unfortunately, but the lack of RFC mention seems like a clear miss.
2021-07-29 10:57:21 -07:00
a725ae214d Add design style guide and a description of what belongs in the design versus in a proposal document. (#649)
Expand the description of the structure of a proposal PR. Clarify that
the full PR is the proposal, not only the P-numbered document. Start a
design style guide and use it to describe which parts of a proposal
should not end up in the design.

Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com>
Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
2021-07-26 11:58:40 -07:00
Geoff Romer d3b4358fd5 Update stacked pull request workflow. (#590)
This avoids having the stacked PR get auto-closed in step 7, and clarifies that you need to merge from trunk to the formerly-stacked PR in order to avoid spurious diffs.
2021-06-24 13:15:24 -07:00
Jon Meow 7af826e4df Update docs for pyenv and llvm (#570) 2021-06-10 08:32:15 -07:00
Chandler CarruthandJon Meow 05261b7fe7 Remove the LLVM bootstrap and use Hombrew installed LLVM-12. (#551)
Now that LLVM 12 has been released we no longer have any need to
bootstrap LLVM to get the desired featureset. LLVM 12 is available
widely, including in Homebrew across multiple platforms and in the
GitHub action runners.

Sadly, the Linux distribution builds of LLVM-12 are largely broken and
not as useful for us. The Homebrew Linux install was also broken
originally, but I've worked extensively with the Homebrew folks to get
the Linux install into a really good shape. It should now work reliably.

There are two primary bugs in Linux LLVM packages that need to be fixed
before we can just use them:

- https://bugs.llvm.org/show_bug.cgi?id=43604
- https://bugs.llvm.org/show_bug.cgi?id=46321

Once those are addressed and point releases with the fixes widely
available we can further simplify things.

Even with the need to use Homebrew installs, using the released LLVM has
the extra advantage of making it easy to properly support Darwin ARM and
I've added that configuration so that I can test things there.

Last but not least, this will significantly shrink our build outputs
which should allow building much more in continuous integration on
GitHub actions without exceeding the action cache size limits. I've even
added several tweaks and adjustments to the compile and build flags to
improve the build performance and reduce the build output size.

Once this is landed and stable, we can consider adding the refactoring
tooling back to our CI.

One of the biggest downsides of this path is that our CI has to download
and install the LLVM toolchain from Homebrew on each run. This is pretty
slow (takes a couple of minutes). But it is a fixed overhead -- it won't
get worse over time. Eventually, we can either look at a much fancier
action configuration to avoid this or hopefully the Debian packages will
get updated and we can move back to those.

The bootstrapping has served us long enough at this point. We can
resurrect it if we ever find a compelling reason for breaking off of the
latest LLVM release as our host toolchain.

Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com>
2021-06-09 10:00:46 -07:00
Jon Meow 40f60e6591 Clean up vscode mentions and standardize install label (#569)
Also we don't use markdown-toc anymore.
2021-06-08 15:31:16 -07:00
Jon MeowandChandler Carruth c72c201133 Copy roadmap from proposal #253 (#533)
Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
2021-05-14 09:52:16 -07:00
Jon MeowandMatthew Riley a13cecccc6 Updates docs for community changes (#489)
- Generally replace Discourse mentions with GitHub Discussions, per #444 
- Switch from "Discord Chat" to just "Discord" because there's no more ambiguity, and "Discord" is the more common term.
- Fix mentions of "core team" to "Carbon leads" (because the touched docs overlap a lot).

Co-authored-by: Matthew Riley <mdriley@gmail.com>
2021-04-23 09:06:52 -07:00
Jon Meow f4ce5eafef Delete commenting guidelines, let code_review.md stand alone (#490)
Mainly I don't think this doc has been useful, and I think links that used to be there have drifted more towards code_review.md
2021-04-22 14:42:59 -07:00
Geoff Romerandjosh11b 6639a915dc Principle: Errors are values (#301)
A Carbon function that needs to report recoverable failures should return a sum type whose alternatives represent the success case and failure cases, such as Optional(T), Result(T, Error), or Bool. The function's successful return
value, and any metadata about the failure, should be embedded in the alternatives of the sum type, rather than reported by way of output parameters or other side channels. Carbon's design will prioritize making this form of error handling efficient and ergonomic.

Co-authored-by: josh11b <josh11b@users.noreply.github.com>
2021-04-21 13:00:03 -07:00
Jon Meow 37f94c964d Update evolution doc for #426 (#469)
A lot of text is mirrored over, but also some nuanced adjustments. @chandlerc and I have been working on this [in Docs](https://docs.google.com/document/d/1n6xVPKQDuTpMuMoK0BnQ8jtEaBhDo9Y50gYb1zyG-_s/edit).
2021-04-19 16:42:44 -07:00
Jon Meow f2c3f68813 Fix repo/respository (#452) 2021-04-14 14:46:51 -07:00
Jon Meow b4593f5133 Add pip_install to the build. (#435)
Updates corresponding tool instructions.
2021-04-07 09:08:02 -07:00
Chandler CarruthandJon Meow 251402ceb7 Make Python 3.6 our minimum version and fix tests. (#401)
This matches the version on Ubuntu LTS and other OSes. The only problem
I found with it in our testing is that Bazel confusingly sets the locale
to use `LANG=en_US` by default which breaks UTF-8 support. We may need
to shift this on Windows, but this seems like a reasonable first step.

Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com>
2021-03-19 00:58:46 -07:00
Dave Abrahams 18690b43bb Bison/Flex are now installed and built by bazel. 2021-03-04 10:12:18 -08:00
Dave Abrahams 3078f34f5e Shallow clone submodules. 2021-03-04 10:09:29 -08:00
Jon Meow 1edfb1786e Language-level safety strategy (#196)
-   Based on [#130](https://github.com/carbon-language/carbon-lang/pull/130) from chandlerc
-   [RFC](https://forums.carbon-lang.dev/t/rfc-language-level-safety-strategy-196/182)
-   [Decision](https://forums.carbon-lang.dev/t/request-for-decision-language-level-safety-strategy/196)
-   [Approval annnouncement](https://forums.carbon-lang.dev/t/accepted-language-level-safety-strategy/201)
2021-03-03 15:00:23 -08:00
Dave Abrahams 4383b9fd92 Doc: make tools needed by tests required/add validation check 2021-02-26 13:15:05 -08:00
Jon Meow 23009d3b06 Stop using 'Review manager requests', adjust some minor advice bits. (#293) 2021-02-25 11:15:13 -08:00
Jon MeowandChandler Carruth 50fa120c87 Add style guideline for using std::foo; (#263)
Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
2021-02-22 10:38:54 -08:00
Jon Meow 6e5070de18 Adapting jsiek's executable semantics tooling for commit. (#237)
Notes versus what jsiek wrote:

- This adopts Bazel for building.
    - System-local versions of bison/flex are used. I found https://github.com/jmillikin/rules_bison, but those print a lot of warnings (things like -Wsign-compare IIRC) which makes builds hard to read. Plus I think the underlying bison_cc_library rule didn't work, so this would really only get a hermetic bison/flex build (helpful, but didn't seem worth more time).
    - I'm adding in a .bazeliskrc to push a somewhat more standard choice of bazel versions. I noticed I was getting unstable versions by default, possible Google-specific, but seemed good to include.
    - The `-lpthread` kludge.
- Turn all of the examples into golden tests.
    - Including adding a golden test rule.
- Fixed various style guide issues. For example:
    - Fixing function names to be CamelCase instead of snake_case (https://google.github.io/styleguide/cppguide.html#Function_Names)
    - Removed exception use (https://google.github.io/styleguide/cppguide.html#Exceptions)
    - File name fixes (https://github.com/carbon-language/carbon-lang/blob/trunk/docs/project/cpp_style_guide.md#file-names)
- Dropped `using` of `std` names -- I believe this is preferred (maybe we should be explicit about this in the Carbon style guide)
- Switched `enum` uses to `enum class` for ease-of-identification.
- Spent some time breaking out files to hopefully be easier to read/edit pieces, and understand relations between structs.
- Added `code requires` to `syntax.ypp` to address include issues

Possibly other things -- but the fundamental structure is, I believe, unchanged. I put in the golden tests pretty early to ensure I wasn't mutating output/results.
2021-02-19 15:25:43 -08:00
Jon Meow 7a1abddb4f Clarify code review applies to docs in CONTRIBUTING (#262)
And add note about rebasing issues
2021-02-10 10:36:36 -08:00
Jon MeowandChandler Carruth f58e5da827 Modify clang detection to build clang (#261)
Per chandlerc's comment:

First, this builds inside the Bazel tree rather than in the source
repository. This ensures we start in a clean directory each time the
repository rule is run again. We don't need to detect an existing build
with this, and it will only be rebuilt when the workspace file or the
repository rule implementation is changed. This can be forced by using:
```
bazel sync --configure
```

Second, we use an implicit dependency on the `WORKSPACE` file to locate
the workspace directory automatically, and the `HEAD` file from the
`llvm-project` submodule to trigger a rebuild if the submodule is
updated.

Third, teach the CMake script to try to use a system-installed `clang`
if installed and not overridden by the `CC` environment variable. This
is very different from the prior logic -- this is only used with the
CMake build, and so should work with any system C++ compiler that can
build Clang and LLVM.

Lastly, this tweaks the CMake options to tune this build given that we
now fully control it and it will only be used in this context. This
still results in a 1.5gb build for me. =/ But its as small as I can make
it really. It's a frustrating long list, but I couldn't find a more
brief way of representing this.

Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
2021-02-08 17:17:58 -08:00
Jon Meow 299e5e2f83 Remove text about creating open question issues without a decision. (#247)
This isn't reflected in the above text, not sure how it managed to remain. There is still a note about filing issues for open questions at https://github.com/carbon-language/carbon-lang/blob/trunk/docs/project/consensus_decision_making.md#formal-decision-content, but I think it's much clearer when it's part of the core team's decision, rather than during proposal iteration.
2021-02-08 16:16:28 -08:00
Jon Meow b24e694ba2 Flesh out advice on package managers, add fsmonitor/ninja. (#246) 2021-02-05 16:26:03 -08:00
Jon Meow efef7cae16 Detect if there's a built version of clang within the workspace (#260) 2021-02-05 15:15:51 -08:00
Matt Godbolt 769c6b4c01 Update path for llvm-project (#255) 2021-02-05 14:37:17 -08:00
Matthew Riley d1f4b15aab Use new name for "Google Meet" (#241)
https://www.theverge.com/2020/4/8/21214059/google-hangouts-meet-rebrand-video-chat-conferencing
2021-01-27 20:12:53 -08:00
Matthew Riley c2ec084d07 Add mmdriley as review manager (#242)
As discussed at https://forums.carbon-lang.dev/t/looking-for-additional-review-managers
2021-01-27 20:12:25 -08:00
Jon Meow 6ba2f5851c Document more tools (#240)
- bazel/bazelisk because it's kinda needed
- buildifier per #236 
- Clang/LLVM I know a number of people are familiar with, but I wasn't...
- `go get` and `pip` because it's feeling more and more appropriate to separate out package managers vs other tools
2021-01-27 09:51:11 -08:00
5db229afc6 Create an implementation team. (#179)
Create a team to oversee the implementation of Carbon. This team is
responsible for code reviews as well as handling any implementation-specific
decisions.

Originally, it was suggested to call this a "toolchain" team. During
discussion, it became clear that the scope wasn't easily limited to
implementation efforts that were necessarily part of the toolchain. There are
many different aspects of implementation, and we anticipate code sharing
between them that make it unhelpful to try to separate these. Instead, this
team is chartered with broadly covering all of the implementation concerns in
Carbon. If someone is concerned that an issue is larger than that, perhaps
impacting the design of the language, the project, or the community, the
standard process already provides for easy escalation to the core team.

Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com>
Co-authored-by: austern <austern@google.com>
Co-authored-by: Geoff Romer <gromer@google.com>
2021-01-16 16:06:39 -08:00
Chandler Carruth 79ad0bf228 Make the rules for braces on ifs and loops simpler and more strict. (#194)
This simply requires braces and doesn't allow single-line `if`s. There
is some minor readability loss here, but it seems minor and provides
extremely simple rules which I'd value.

I can also trivially get clang-tidy to both check for this and
automatically fix code to conform.

Just sending this as a code review as it seems fully in the direction of
the style guide approved by the core team and I've heard no real
objections. That said, if anyone is concerned, I'm happy to take it
through the proposal process.
2020-12-02 20:07:13 -08:00
Jon Meow cc4211442f Merge carbon-project-tools back into carbon-lang (#203)
As proposed at https://forums.carbon-lang.dev/t/merged-repo-structure/174:

- carbon-lang:/src/jekyll -> carbon-lang:/website/jekyll
- carbon-lang:/src/scripts -> carbon-lang:/proposals/scripts
- carbon-project-tools:/firebase -> carbon-lang:/website/firebase
- carbon-project-tools:/github -> carbon-lang:/github
2020-12-02 09:53:14 -08:00
Bryce Adelstein Lelbach aka wash b8750e6c4b Criteria for Carbon to go public (#63)
- [Google Doc](https://docs.google.com/document/d/1Uir4sc1HuT5pOzRrFDnbuClzSYBEwE2Unbabr28e8iw/edit)
- [Ideas](https://forums.carbon-lang.dev/t/going-public-doc/139)
- [RFC](https://forums.carbon-lang.dev/t/rfc-criteria-for-carbon-to-go-public/146)
- [Decision announcement](https://forums.carbon-lang.dev/t/accepted-criteria-for-carbon-to-go-public/167)
2020-11-17 14:13:46 -08:00
Jon Meow 79a9b51d07 Update pre-commits, add and address flake8 (#195)
Adopts new copyright and markdown toc checks.

The new toc check generates the toc header, so that's why all the md files changed (this had felt better to me for the long-term, more auto-generated content)
2020-11-13 16:34:23 -08:00
f44cf22924 Add a C++ style guide for the project (#113)
When writing C++ code for Carbon, we want to keep all of our code consistent,
easy to learn, and help avoid spending undue code review time arguing about
the same core style and idiomatic issues.

This adopts the Google C++ style guide as a baseline, and then makes minimal,
focused additions and adjustments to it to suit the needs of Carbon.

Co-authored-by: Thomas Köppe <tkoeppe@google.com>
Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com>
Co-authored-by: Geoff Romer <gromer@google.com>
Co-authored-by: Richard Smith <richard@metafoo.co.uk>
Co-authored-by: austern <austern@google.com>
Co-authored-by: Dmitri Gribenko <gribozavr@gmail.com>
2020-11-13 00:49:54 -08:00
Jon Meow 94e065d9d2 Automated fixes using check-google-doc-style (#193)
With one manual ignore in the markdown style proposal, because it's explicitly listing disallowed terms.
2020-11-12 10:31:26 -08:00
Richard Smith 2078b8d095 Fix pyenv version number syntax (#182) 2020-10-27 18:59:19 -07:00
Jon Meow 5676765375 Pre-commit fix (#180)
Issue introduced by #48
2020-10-27 11:08:27 -07:00
1b434896b2 Add a workflow to support stacked pull requests. (#48)
There is limited direct or obvious support for working with a stack of
dependent pull requests with clean code review of each incremental
change.

Carbon needs to support high-latency asynchronous code review due to
timezones, schedule differences (especially in an open source project),
and the delays imposed by our proposal process. To this end we need some
solution for doing stacked pull requests with a reasonable code review
experience. This suggests a compromise flow that seems to minimize the
costs of doing this.

Co-authored-by: josh11b <josh11b@users.noreply.github.com>
Co-authored-by: Dmitri Gribenko <gribozavr@gmail.com>
Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com>
Co-authored-by: austern <austern@google.com>
2020-10-24 19:17:50 -07:00
Chandler Carruth 2ebf7ca0a0 Address a TODO by linking to the code review document. (#177)
The pull request workflow was supposed to connect to the review guidance
anyways, but the link hadn't been added.

Also adds a TOC to the pull request workflow document as it was missing
one.
2020-10-20 18:32:12 -07:00
Jon Meow 800e87efcf Moving github scripts to carbon-project-tools (#170) 2020-10-09 10:21:10 -07:00
Jon Meow a768b0ee19 Adjust copyrights based on carbon-project-tools/#3 (#171) 2020-10-09 10:18:06 -07:00
Chandler Carruth 630311c6ae Create code review guidelines (#42)
Carbon needs a strong code review process to handle code (and other)
changes that are not significant proposals. This attempts to provide
clear guidance on the process, structure, and scope of code review.
It also gives detailed guidance on how to effectively do code review
for both reviewers and authors.

This proposal was accepted on 2020-08-04.
2020-08-27 02:05:40 -07:00
Jon Meow 1e7aba7391 Add idiomatic code performance and developer-facing docs to goals (#120)
- [RFC topic](https://forums.carbon-lang.dev/t/rfc-add-idiomatic-code-performance-and-developer-facing-docs-to-goals/105)
- [Decision](https://forums.carbon-lang.dev/t/request-for-decision-add-idiomatic-code-performance-and-developer-facing-docs-to-goals/116)

Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
Co-authored-by: Geoff Romer <gromer@google.com>
Co-authored-by: Dmitri Gribenko <gribozavr@gmail.com>

Most of this is addressing issue #106.

Two new explicit sub-goals:

- Idiomatic code should be performant, stemming from #106.
- User-facing documentation, separate thought from #83 discussion.

I think both of these are on people's minds and assumed, but still worth spelling out.
2020-08-20 15:26:58 -07:00
Jon Meow c0403cf82d Add more setup instructions for various tools (#138)
This was mainly to document pyenv/python, but I figured I'd note a few other things while I was in here.
2020-08-18 08:34:33 -07:00
Jon Meow e9130a29e9 Use _ consistently in filenames (#135)
This had been causing me issues when writing a test for pr-comments.py, which I then renamed so that I could import. It's had me mulling that I should really write tests for other scripts, but the name gets in the way.

The decision files are just an exception, so trying to reach consistency.
2020-08-18 08:32:23 -07:00
Jon Meow b8be334ab3 Brushing up review manager docs. (#119)
- Add mentions of new "comment deadline" label.
- Link to review manager doc from evolution doc.
- Standardize evolution doc on "topic" instead of "forum topic" (use was mixed).
2020-07-30 11:05:14 -07:00
Jon Meow be116a46c9 Adjust md tab width to work better cross-markdown-parser (#124)
We're running into issues with md handlers that expect this kind of 4-space indent. It should be cross-compatible with GH, so switch, even though it feels a little churny.

Manual edits are to:

- .prettierrc.yaml:
    - rename from .prettierrc
    - add tabWidth (primary change)
    - add trailingComma (fix vimPrettier skew)
- contribution_tools.md: Fix remarks about .prettierrc.yaml
- pre-commit-toc.js: indent, bullets
- pre-commit-proposal-list.py: indent of output

The rest is the result of `pre-commit run --all-files`

Unfortunately this'll probably depend on the change being propagated into PR branches, so I wouldn't be surprised if we see regressions for a bit. We'll also need to nudge people to update .vimrc's. Hopefully the pre-commit GH action helps catch issues.
2020-07-27 10:47:38 -07:00