Commit Graph
129 Commits
Author SHA1 Message Date
Chandler Carruth def2e65ffa Add .clang-tidy and compile_flags.txt to enable Clang-based tooling. (#208) 2020-12-04 22:32:14 -08:00
Chandler Carruth 6aae31b65b Merge LLVM and Bazel infra from the toolchain repository. (#207)
The Bazel bits are collected into a directory and given less confusing
names (I hope). Other than names, everything is a direct copy from the
toolchain repository without any edits.

A few files needed to be merged in:
- `.gitignore`
- `.pre-commit-config.yaml`

Subsequent commits will add relevant C++ infrastructure and then the
source code itself.
2020-12-04 19:26:07 -08:00
Jon Meow e3584dce01 Switch build/site to build-site in order to keep symlinks working (#211)
The jekyll build keeps top-level without expanding them. So the site works, but the publish copy failed because some symlinks to files that aren't visible through the site (like CONTRIBUTING.md, versus the site's CONTRIBUTING.html) didn't work.
2020-12-04 16:17:36 -08:00
Jon Meow f2d48f1bd0 Move the jekyll sidebar to a python script for consistent generation. (#205)
One implication here is that both proposals/README.md and the website should use basically the same format for their proposal lists. Another subtle change is that the website sidebar was previously sorted by *filename*, and is now sorted by *title*, which seems better because it's something that readers can see.

Enumerating why files change:

- gen_sidebar.py is the centerpiece, with a couple helpful functions for re-use elsewhere
- Delete the old sidebar html includes
- Modify the Makefile to handle gen_sidebar.py reasonably well (let's be honest... I'm not great at Makefiles)
- Move proposal listing out to its own file (proposals.py) for re-use
- Add a few PYTHONPATH things + `__init__.py` files to get modules importing correctly (may be a better way at this, I've hit a wall though).
2020-12-04 08:26:25 -08:00
Jon Meow b2f005c1bb Publish interop goals (#202)
This takes #175 and publishes it as interop goals. I've made a few small editorial changes, but the main addition is the "Offer equivalent support for languages other than C++" non-goal which I thought may be useful (in particular, it can be used to clarify why this directory is "interoperability" and not "interoperability_cpp").
2020-12-03 13:50:04 -08:00
Jon Meow 58554b87ae Fix website dir move from merge (#204) 2020-12-03 13:29:21 -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
Jon Meow 1a85ea2225 Decision for: Basic Syntax #162 (#190)
- [Proposal PR](https://github.com/carbon-language/carbon-lang/pull/162)
- [RFC topic](https://forums.carbon-lang.dev/t/rfc-basic-syntax/142)
- [Decision request](https://forums.carbon-lang.dev/t/request-for-decision-basic-syntax-162/165)
- [Decision announcement](https://forums.carbon-lang.dev/t/accepted-basic-syntax-162/170)

Tracking issues filed as part of decision:

- Should there be a function type? #191
- Should types be values? #192

Finalized on 2020-11-24
2020-12-01 13:18:59 -08:00
136a8ae470 Basic Syntax (#162)
* first draft of proposal for basic syntax

* rename proposal

* formating

* fixing typos

* precendence and associativity

* minor edit

* added abstract syntax

* some revisions based on feedback from meeting today

* optional return type

* oops, not optional for function declarations

* replacing abbreviations with full names

* name changes

* Update proposals/p0162.md

Co-authored-by: Dmitri Gribenko <gribozavr@gmail.com>

* removed = from precedence table

* for fun decl, back to optional return type, shorthand for void return

* more fiddling with return types

* change base case of statement_list to empty

* added pattern non-terminal

* added  expression style function definitions

* change && to and, || to or

* change  and  to have equal precedence

* updating text to match grammar, fix typo in grammar regarding pattern

* adding trailing comma thing to tuples

* removed 'alt' keyword, not necessary

* flipped expression and pattern

* added period for named arguments and documented the reason

* change alternative syntax to use tuple instead of expression

* comment about abstract syntax

* code block language annotations

* added alternative designs, some cleanup for pre-commit

* spell checking

* filled out the TOC

* minor edits

* minor edit

* trying to fix pre-commit error

* changes from pre-commit?

* changes based on meeting today

* describe alternatives regarding methods

* more rationale in discussion of alternatives

* addressing comments

* typo fix, added text about next steps

* removed *, changed a ! to not

* Update proposals/p0162.md

Co-authored-by: Geoff Romer <gromer@google.com>

* edits from feedback

* pre-commit

* added second reason for period in field initializer

* added executable semantics, fixed misunderstanding regarding associativity

* update README

* added a paragraph about tuples and tuple types

* Update proposals/p0162.md

Co-authored-by: josh11b <josh11b@users.noreply.github.com>

* addressing comments from josh11b

* Update executable-semantics/README.md

Co-authored-by: Dmitri Gribenko <gribozavr@gmail.com>

* link to implicit parameters in generics proposal

* added non-terminal for designator as per geoffromer's suggestion

* changed handling of tuples in function call and similar places as per josh11b and zygoloid

* moving code to separate PR

Co-authored-by: Dmitri Gribenko <gribozavr@gmail.com>
Co-authored-by: Geoff Romer <gromer@google.com>
Co-authored-by: josh11b <josh11b@users.noreply.github.com>
2020-12-01 11:55:48 -05:00
Jon Meow e195b35a73 C++ interoperability goals (#175)
Related threads:

-  From austern, [Initial draft of C++ Interoperability principles doc #62](https://github.com/carbon-language/carbon-lang/pull/62)
-  From me, [Carbon <-> C/C++ interoperability #80](https://github.com/carbon-language/carbon-lang/pull/80)
    - [Doc](https://docs.google.com/document/d/1va8VgvDdA966WG3znJyUrlComYqNfNBV7__hUd9XxxU/edit)
    - [Ideas topic](https://forums.carbon-lang.dev/t/draft-carbon-c-c-interoperability/77)
    - [RFC topic](https://forums.carbon-lang.dev/t/rfc-carbon-c-c-interoperability/89)
- From chandlerc, [Interop implementation strategies](https://forums.carbon-lang.dev/t/interop-implementation-strategies/108)

For this PR:

- [RFC topic](https://forums.carbon-lang.dev/t/rfc-c-interoperability-goals-175/156)
- [Decision topic](https://forums.carbon-lang.dev/t/request-for-decision-c-interoperability-goals/171)
- [Decision announcement](https://forums.carbon-lang.dev/t/accepted-c-interoperability-goals/175)
- [Decision PR](https://github.com/carbon-language/carbon-lang/pull/200)
2020-11-25 09:06:44 -08:00
Sidney HummertandJon Meow 7b7cf1a10b Decision for 0063: Criteria for Carbon to go public (#187)
* Decision for 0063: Going Public

* Update proposals/p0063_decision.md

Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com>

* Update proposals/p0063_decision.md

Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com>

* Update p0063_decision.md

* Update README.md

Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com>
2020-11-19 10:41:22 -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
Jon Meow 657bd66b9c Fix proposal script to handle copyright (#197)
`.tmp` -> `.tmp.md` causes the right copyright to be chosen (new issue due to the check-copyright pre-commit)

The `_get_proposals_dir` changes are to allow pytest to be run from any directory.
2020-11-13 16:32:11 -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
Jon Meow bb1ad5478f Decision for: Add a C++ style guide #113 (#181)
-   [Proposal PR](https://github.com/carbon-language/carbon-lang/pull/113)
-   [RFC topic](https://forums.carbon-lang.dev/t/rfc-add-a-c-style-guide/102)
-   [Decision request](https://forums.carbon-lang.dev/t/request-for-decision-add-a-c-style-guide-113/155)
-   [Decision announcement](https://forums.carbon-lang.dev/t/accepted-add-a-c-style-guide-113/161)

Finalized on: 2020-11-10
2020-11-10 16:01:41 -08:00
Richard Smith ee7a108da4 Incorporate proposals #142 and #143 into the design
Add design text based on the contents of two proposals:

#142 Unicode source files
#143 Numeric literals
2020-11-03 16:39:05 -08:00
Jon Meow 8e3b67513a Fix decision filename (#186) 2020-10-30 11:06:13 -07:00
Sidney HummertandChandler Carruth 1721701bc6 Create decision for proposal 149--Change markdown style guide (#165)
* Create p0149_decision.md

Create decision for proposal 149--Change markdown style guide

* Update proposals/p0149_decision.md

Co-authored-by: Chandler Carruth <chandlerc@gmail.com>

* Update proposals/p0149_decision.md

Co-authored-by: Chandler Carruth <chandlerc@gmail.com>

* Run pre-commit

* Update README.md

Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
2020-10-30 10:34:21 -07:00
10a30f0a77 Decision for p107 "Code and Name Organization" (#174)
* Decision for p107 "Code and Name Organization"

Create initial decision doc.

* Update proposals/p107_decision.md

Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com>

* Update proposals/p107_decision.md

Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com>

* Update proposals/p107_decision.md

Co-authored-by: Chandler Carruth <chandlerc@gmail.com>

* Update proposals/p107_decision.md

Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com>

* Update proposals/p107_decision.md

Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com>

Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com>
Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
2020-10-30 09:46:25 -07:00
Jon Meow 5760d807fe Update pre-commit configs and standardize yaml extension (#184) 2020-10-29 10:02:32 -07:00
Richard Smith c197215bca Proposal: Unicode source files (#142)
Factored out of the Lexical Conventions proposal (https://github.com/carbon-language/carbon-lang/pull/173). This proposal covers only the encoding aspect: Carbon text is Unicode, source files are encoded in UTF-8, and we will follow the Unicode Consortium's recommendations to the extent that they make sense to us.
2020-10-28 17:25:20 -07:00
Richard Smith 5312cc9417 Update pre-commit configuration to match changes to prettier (#183)
See https://github.com/prettier/prettier/issues/9459 for details. Unclear whether this is a prettier bug or an npm bug, but pre-commit fails with new repositories without this change.
2020-10-28 08:56:56 -07:00
Richard Smith 2078b8d095 Fix pyenv version number syntax (#182) 2020-10-27 18:59:19 -07:00
Jon Meow b5a4c8eb73 Decision for #142 (unicode source files) (#173)
-   [Proposal PR](https://github.com/carbon-language/carbon-lang/pull/142)
-   [RFC topic](https://forums.carbon-lang.dev/t/rfc-unicode-source-files/119)
-   [Decision topic](https://forums.carbon-lang.dev/t/request-for-decision-unicode-source-files/145)
-   [Decision announcement](https://forums.carbon-lang.dev/t/accepted-unicode-source-files-142/148)

Finalized on 2020-10-27
2020-10-27 11:19:42 -07:00
Jon Meow 5676765375 Pre-commit fix (#180)
Issue introduced by #48
2020-10-27 11:08:27 -07:00
Matt Godbolt 05afb1b1ec Fix markdown around link to BFloat16 (#178) 2020-10-27 09:15:33 -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 7b3608a6c5 Use check-copyright pre-commit (#172) 2020-10-19 10:45:38 -07:00
Chandler CarruthandJon Meow 3bd756c773 Decision for p0143 - Numeric literals (#167)
Adds a decision and rationale for proposal #143.

Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com>
2020-10-16 14:54:25 -07:00
Sidney Hummert 4e81e25877 Decision for proposal #42 (Create code review guidelines) (#176)
* Decision for proposal #42 (Create code review guidelines)

This is a recreation of PR #137 that got stuck in git merge hell.

* Results of running pre-commit
2020-10-16 13:38:36 -07:00
Sidney HummertandJon Meow 21868c1c80 Create Overview proposal decision (#132)
* Create Overview proposal decision

Create the proposal decision for the proposal in PR83: An incomplete, early, and in-progress overview of the language design

* Update proposals/p0083-decision.md

Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com>

* Rerun pre-commit

Adjusted some spaces.

* Rename decision to use _ instead of -

Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com>
2020-10-16 10:19:42 -07:00
Jon Meow e36f9a1546 Change markdown style guide (#149)
-   [RFC topic](https://forums.carbon-lang.dev/t/rfc-change-markdown-style-guide/123)
-   [Decision topic](https://forums.carbon-lang.dev/t/request-for-decision-change-markdown-style-guide/132)
-   [Decision announcement](https://forums.carbon-lang.dev/t/accepted-change-markdown-style-guide/137)
2020-10-14 16:59:46 -07:00
Jon Meow 4c43d63b8a Code and name organization (#107)
- [RFC](https://forums.carbon-lang.dev/t/rfc-code-and-name-organization/121)
- [Decision request](https://forums.carbon-lang.dev/t/request-for-decision-code-and-name-organization/140)
- [Examples doc](https://docs.google.com/document/d/1J8GX9uw5AxBz5Q22MLHJOfzLq4WJqKL-q1VwnKGHG-k/edit)
- [Approval announcement](https://forums.carbon-lang.dev/t/accepted-code-and-name-organization-107/150)

Files, packages, libraries, and imports for Carbon.

Contributors: chandlerc, fowles, tkoeppe, zygoloid
2020-10-14 10:52:24 -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
Richard Smith ccb99ad6f2 Proposal for numeric literal syntax. (#143)
This proposal specifies lexical rules for numeric constants in Carbon.
2020-10-05 19:24:46 -07:00
Jon Meow 541550635c Add carbon-project-tools to readme (#164) 2020-09-25 10:58:02 -07:00
Jon Meow ce6d00e36c Move firebase config to carbon-project-tools (#163)
See also carbon-language/carbon-project-tools#2
2020-09-24 15:54:00 -07:00
Jon Meow 1882253754 Update pre-commit-hooks (#161) 2020-09-24 15:53:21 -07:00
Jon Meow 98ebae62a6 Update pre-commit versions and fix black break (#160)
Caught by black stable change, done by `pre-commit autoupdate`

`pre-commit autoupdate` also wanted to update pre-commit-hooks, but that gave me some pyenv errors so I'm leaving it alone for now.
2020-09-15 09:00:24 -07:00
Jon Meow b739cf30ae Fix title for decision 120 (#159) 2020-09-11 14:51:30 -07:00
Jon Meow 5905c9f138 Fix proposals index (#158) 2020-09-09 15:35:37 -07:00
Jon Meow ef1e9ea40c Update the new proposal script with some tests and changes from #96 (#156)
- Tests
- Fix Python style
- Use argparse for arguments
- Switch to git commit --amend
2020-09-09 09:48:00 -07:00
Sidney Hummert 551ded5a03 Decision for proposal 120 (Goals addition) (#150) 2020-09-08 10:59:37 -07:00
Jon Meow 946e4fedbc Remove unused args (#153) 2020-09-08 08:41:33 -07:00
Jon Meow 37c1e42b98 Migrate update_label_access to Python, and start consolidating GraphQL logic. (#147)
Main reasons for doing this were:

- Add tests for update_label_access
- Reduce js reliance
- Unify handling of access tokens
- Migrate more to GH's graphql (unfortunately not everything, pygithub is rest-based)
- With pytest, reduce the number of executable scripts
2020-09-03 10:20:54 -07:00