Commit Graph
183 Commits
Author SHA1 Message Date
21fb6f5802 Update broken links (#3786)
Update broken links to aid in following links while perusing the
documentation. Closes #3778

I don't imagine I got every one of these right. Some 404s may be
reported due to permissions.

Using the lychee command in #3778, only the following link is reported
as not found, but it's just a permission issue:

```
[proposals/p1367.md]:
✗ [404] https://github.com/carbon-language/carbon-lang/settings/access | Failed: Network error: Not Found
```

I tried to get it down to as few as possible, partially so that future
link scans won't run into repeat errors.

---------

Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
Co-authored-by: Carbon Infra Bot <carbon-external-infra@google.com>
2024-03-22 18:42:20 +00:00
Nathan Youngman 10189bbb78 rephrase a few sentences (#3766)
Minor tweaks while reading through the docs to hopefully improve
readability.
2024-03-13 22:03:34 +00:00
Nathan Youngman 50e5dd7754 Homebrew recommends installing pre-commit directly (#3764)
On macOS, Homebrew recommends `pipx` to install Python binaries, or
installing `pre-commit` directly, since it is available.

Here is the message in full. 

```console
❯ pip3 install pre-commit

error: externally-managed-environment
 × This environment is externally managed
╰─> To install Python packages system-wide, try brew install
    xyz, where xyz is the package you are trying to
    install.

    If you wish to install a non-brew-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip.
    
    If you wish to install a non-brew packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
```

~~Also, unless there is a compelling reason to install a particular 3.x
version of Python, it may be better to let Homebrew use whatever version
people may already have installed (or let it automatically install the
version they've tested).~~

Here are the details of the pre-commit Homebrew package:

```
❯ brew info pre-commit
==> pre-commit: stable 3.6.2 (bottled), HEAD
Framework for managing multi-language pre-commit hooks
https://pre-commit.com/
/opt/homebrew/Cellar/pre-commit/3.6.2 (679 files, 9.9MB) *
  Poured from bottle using the formulae.brew.sh API on 2024-03-08 at 22:22:11
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/p/pre-commit.rb
License: MIT
==> Dependencies
Required: libyaml ✔, python@3.12 ✔
```

Installing directly with Homebrew is a supported option in the
pre-commit documentation. https://pre-commit.com/#install
2024-03-11 23:25:19 +00:00
Chandler Carruthandjosh11b da7533ae7f Update project to require Clang 16 or newer. (#3649)
This should also unblock our switch to C++20 and other improvements.

There are three core parts of the change --

1) Updating our infrastructure to fetch and find Clang-16.
2) Updating our documentation to reflect this and help folks with any
   system issues they encounter.

The infrastructure change is unfortunately tricky. We can't get Clang 16
easily on GitHub's runner images, and in the past we've had persistent
problems with flakiness when our actions download this much during their
runs. Due to the flakiness, we've previously removed all downloading of
dependencies outside of Bazel itself, and added retry loops around Bazel
specifically to overcome flaky downloads.

This change tries to address these problems by populating the Clang and
LLVM toolchain in a place that we can then cache using the built-in
GitHub action caching infrastructure. This seems like by far the least
likely to flake way of downloading extra things into our runs. And since
these are relatively slow moving dependencies, we should populate this
cache very, very rarely.

For Linux, this downloads the binary release artifact from GitHub,
prunes out large parts of it that we don't need, and then caches this as
a local toolchain. This proves both small and fast.

For macOS, this uses a trick to cache the destination of Homebrew
installs. It unfortunately caches the *entire* Homebrew installation
though, and so it also goes to some lengths to prune and minimize how
much is installed from Homebrew. The result is "only" a 2gb cache image.
Because of the size and slower download and filesystem, the macOS runs
see a 1 - 2 minute slowdown.

We might extend the Linux infrastructure here usefully if we want to
test multiple LLVM versions. We might also extend the macOS version to
get a cheaper way to prune parts of the system and free up disk space,
or to cache other Homebrew installed tools if needed.

Last but not least, this brought to the forefront an issue with our C++
toolchain integration which relied on a specific CMake build option
being set in the LLVM toolchain install. This option isn't used in the
official release artifacts. Instead, switch to a more robust approach to
linking libc++abi statically that shouldn't have these problems.

Beyond the infrastructure changes, this also updates the documentation
to reflect requiring Clang 16 or newer, and adds some extra tips for
folks that are missing this.

The documentation is also updated to address a problem with getting the
right libc++abi files installed to support the more robust linking
strategy. This may reduce the problems we've seen in the past around
libc++abi and linking on other Linux distros as well.

---------

Co-authored-by: josh11b <josh11b@users.noreply.github.com>
2024-01-25 01:23:09 +00:00
8ba24bbe41 Roadmap for 2024 and a retrospective for 2023 (#3564)
We propose a roadmap for 2024 focused on a working Carbon toolchain that
supports Carbon ↔ C++ interop.

---------

Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
Co-authored-by: Richard Smith <richard@metafoo.co.uk>
2024-01-12 01:14:48 +00:00
Richard Smith dfb27ded9c Update setup instructions for recent debian / ubuntu (#3571)
`pip3 install` refuses to perform a system-wide installation, but we can
install `pre-commit` with `apt` instead.
2024-01-05 00:19:09 +00:00
Jon Ross-Perkins 75ef947a4f Change contribution_tools.md to refer to toolchain instead of explorer (#3499) 2023-12-20 22:29:43 +00:00
Chandler Carruth 6fecf7539f Focus implementation effort on the toolchain (#3532)
Proposal to focus implementation effort for the next 1-2 years on the
Carbon
toolchain instead of the explorer. This will impact the explorer in a
few ways:

- We will keep the explorer's code in place, building, and passing its
basic
    tests. It can remain a good baseline for exploring Carbon's language
    features.
- We won't prioritize expanding the explorer's coverage of Carbon
features or
other improvements -- it is good enough for what we need until the
toolchain
    catches up.
- We will stop actively fuzzing and expanding test coverage for the
explorer.
- Eventually, when we want to resume work on the explorer, we'll
evaluate the
best platform to build on -- the current explorer codebase or on top of
the
    toolchain's semantic IR.

Also tries to update the core readme and contributing docs to reflect
this.
2023-12-20 02:13:51 +00:00
Jon Ross-Perkins f4f18d871c Drop zlib notes from contribution_tools (#3531)
The underlying issue should have been addressed by #3526; the install
shouldn't be needed.
2023-12-19 19:14:16 +00:00
Christopher Di Bella 8282595bf8 updates conduct_team.md to use work Discord account (#3510) 2023-12-14 19:16:54 +00:00
Jon Ross-Perkins 4605b1d3e1 Style note for explicit constructors. (#3457)
This stems from an [old
discussion](https://discord.com/channels/655572317891461132/821113559755784242/1070759074112741447),
I think this is the resolution that never got added here.
2023-12-06 00:10:33 +00:00
Sree Dananjay S 1603edc359 Added Documentation support for Bazel installation in Linux distros (#3441)
This Pull Request added support for Bazel installation and setup in the
contribution_tools.md file un the docs directory. It added a link to the
releases page of the bazel repository for debian/ubuntu users to
download the binary and execute the commands provided in the
documentation.

Closes #3439
2023-12-01 00:53:23 +00:00
Chandler Carruth 01e12111a8 Auto-update pre-commit repositories and fix. (#3427)
The version of `flake8` was too old to support with Python 3.12 -- there
is new F-string support that caused false positives sadly. The updated
version has fixes for all of these.

This in turn updates codespell which has picked up several new fixes
that actually fire in our code, so also fix everything. While we don't
do more in-depth updates to old proposals, similar to simply fixing
broken links, fixing automatically detected typos seems scalable and
fine.

All edits were automatically generated here.
2023-11-28 17:17:28 +00:00
Piyush Udhao a0bacbb26b potential grammatical error fix in docs/project/roadmap.md (#3359)
just noticed this small error while reading through.
I apologize if the change is too insignificant for a PR.
2023-11-03 02:55:15 +00:00
josh11bandChandler Carruth 58c106010c Updates to design docs to reflect accepted proposals (#3254)
Includes proposals:
- #990
- #2188
- #2138
- #2200
- #2360
- #2760
- #2964
- #3162

Also tries to use more precise language when talking about:
- implementations, to avoid confusing `impl` declaration and definitions
with the `impls` operator used in `where` clauses, an issue brought up
in #2495 and #2483;
- "binding patterns", like `x: i32`, and "bindings" like `x`.

---------

Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
2023-09-23 15:53:07 +00:00
Geoff Romer e3d3122f1d Move tests to the namespace of the code under test (#3244)
Rationale: this convention avoids forcing closely-related code to be far
apart in the namespace hierarchy, and vice versa. By the same token, it
makes the namespace hierarchy more consistent with the directory
hierarchy.
2023-09-18 22:05:14 +00:00
Lucile Rose NihlenandChandler Carruth fe93c0225f add documentation about debugging on macOS (#3114)
Adds some notes about the required build flags for lldb to successfully
find the symbols on macOS debug builds. Also adds a recommended debugger
configuration for interactive debugging in VSCode on macOS.

---------

Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
2023-08-18 19:01:50 +00:00
Richard Smith 90cca11ea3 Document the de facto conventions for library dependencies in explorer (#3092)
Unlike in the toolchain, we have not been preferring LLVM facilities
over standard ones. Update the documentation to describe this and
provide some rationale.
2023-08-11 19:22:58 +00:00
587ab64d1b Update Generics terminology document (#3048)
This reflects changes from a number of approved proposals:
- #920 : concrete statements about orphan and overlap in Carbon
- #2138 : "generic" -> "checked generic", "template" -> "template
generic"
- #2188 : binding patterns are forbidden in type position
- #2360 : "type", "facet type", "facet". Note: I am not using the term
"generic type" from #2360 since that meaning conflicts with the
generally accepted meaning of "generic type" of a type with a
compile-time parameter.
- #2760 / #2770 : internal/external impl -> extending impl
- #2964 : "symbolic constant" and "template constant"

---------

Co-authored-by: Geoff Romer <gromer@google.com>
Co-authored-by: Richard Smith <richard@metafoo.co.uk>
2023-08-02 23:22:15 +00:00
Samiur KhanandJon Ross-Perkins 45ca5bb2c4 Update contribution tools with bazel versioning details (#3053)
You need bazel version 6.0.0 (with --host_per_file_copt) to build
carbon. This adds versioning info and adds that Linux, Mac and Windows
can use bazelisk.

---------

Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
2023-08-02 22:14:23 +00:00
Adrien Leravatandjonmeow a914932b1c doc: update PR workflow for GH merge queues (#2965)
Co-authored-by: jonmeow <jperkins@google.com>
2023-07-06 18:33:58 +00:00
e8f0866b2f Introduce a new Conduct team (#2922)
The Carbon Project relied on the three leads to handle conduct concerns initially as it bootstrapped its community team and expertise. We now have an active and effective community lead and team of moderators. Our community lead has worked to train and ramp up a new and independent conduct team.

This proposal both provides an overview of the process and hands off conduct handling to the new team! Going forward, we expect routine updates to the conduct team to happen without full proposals as they allow trained folks to rotate in and out of this difficult but essential role on the project.

Last but not least, making these changes uncovered a restriction in the Code of
Conduct itself that we expect to be problematic to adhere to going forward.
While well intentioned, it has a bunch of unanticipated effects that made both
current and new conduct teams want to remove it. A related section has had its
wording strengthened to try and address the underlying motivation at least
partially.

Most of this content comes from @CelineausBerlin with some additions and edits from myself and the other leads as we worked toward building the new CoC team.

Co-authored-by: Céline Dedaj <CelineausBerlin@users.noreply.github.com>
Co-authored-by: Geoff Romer <gromer@google.com>
Co-authored-by: Kate Gregory <kate@Gregcons.com>
2023-06-27 15:35:35 -07:00
Richard Smith b235b53e95 Break long ground rule bullet into multiple bullets (#2805)
This makes the bullets more self-consistent and easier to read, and makes this list match the list in the code of conduct.
2023-04-26 16:42:46 -07:00
debe4cc151 Defining the 0.1 language (#2759)
Provide a clear definition of our goals for the 0.1 Carbon language, and a
concrete feature-set that is expected to satisfy these goals.

The high level goal proposed for the 0.1 language is to reach an evaluation-MVP
(Minimal Viable Product): it should be sufficiently complete to evaluate its
suitability specifically with respect to fitness as a C++ successor language.

The features proposed for 0.1 language in turn focus on C++ interoperability and
a minimal subset of foundational aspects of the language.

Beyond the language itself, the other project features and milestones proposed
focus on enabling evaluation of the language design and interoperating with C++
in practice.

Co-authored-by: Richard Smith <richard@metafoo.co.uk>
Co-authored-by: jonmeow <jperkins@google.com>
Co-authored-by: josh11b <josh11b@users.noreply.github.com>
2023-04-25 18:19:06 -07:00
642fcd3b77 Replace keyword is with impls (#2483)
Use the keyword `impls` instead of `is` when writing a `where` constraint that a type variable needs to implement an interface or named constraint.

What was previously (provisionally) written:
```
fn Sort[T:! Container where .ElementType is Ordered](x: T*);
```
will now be written:
```
fn Sort[T:! Container where .ElementType impls Ordered](x: T*);
```

---------

Co-authored-by: Geoff Romer <gromer@google.com>
Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
2023-03-22 21:45:32 -07:00
Geoff RomerandChandler Carruth 2cc64ee38a Clarify ambiguous phrasing in roadmap (#2678)
Previous phrasing was unclear, because "language work" sounds like it means language _design_ work.

Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
2023-03-15 13:07:35 -07:00
Jon Ross-PerkinsandRichard Smith 6a59c77715 Add a question for language version upgrades. (#2559)
Fixes #2229

Co-authored-by: Richard Smith <richard@metafoo.co.uk>
2023-01-27 16:46:56 -08:00
Chandler Carruth 9faf87e171 Roadmap for 2023 and retrospective for 2022 (#2551)
We propose a roadmap for 2023 focus on:

-   Progressing towards a concrete goal of an MVP / 0.1 language.
-   Engaging more broadly and deeply with the C++ community.

We also reflect on our overly ambitious
[roadmap for 2022](https://github.com/carbon-language/carbon-lang/blob/3d90a85f2439bb74b71a553c5017012369ec0f63/docs/project/roadmap.md)
and how the year went.
2023-01-24 15:44:39 -08:00
Avi levy 94c207158e llvm-ar no such file or directory fix instruction (#2423)
Add link to llvm-ar error fix instruction.
2022-12-05 14:02:58 -08:00
Nico Z 4ea3e1951b Add ubuntu:22.04 docker images (#1618)
Ubuntu 22.04 base image and examples using github, a copy instruction and volumes.

I was using this to run examples on a windows machine since it is more comfortable than switching OS or using the WSL subsystem directly.
If this is something that other people would like to have  I can add other versions of ubuntu and other linux distributions.
2022-11-03 13:12:21 -07:00
Jon Ross-Perkins f1e36a50ca C/C++ -> C and C++ (#2340)
As requested at https://github.com/carbon-language/carbon-lang/pull/2332#discussion_r1002257672, "Very minor, but "C/C++" irritates some people in the C++ community so we may as well avoid it here."
2022-10-25 12:06:24 -07:00
Chandler Carruth d76835bed4 Fix a missing link and tweak the template. (#2330)
Mostly wanted to more clearly separate the closing observations from the
rest of the report. Noticed the missing link while I was there so fixing
that too.
2022-10-21 08:02:46 -07:00
Chandler CarruthandCéline Dedaj b315c69f0c Begin publishing CoC and moderation transparency reports. (#2295)
Provides a documented cadence, publishing target, and template for Code of Conduct and moderation transparency reports.

Based on the initial proposal draft from @CelineausBerlin.

Co-authored-by: Céline Dedaj <CelineausBerlin@users.noreply.github.com>
2022-10-18 10:59:08 -07:00
Jon Ross-PerkinsandRichard Smith 1e1fa9295d Rewrite contribution tools documentation (#2203)
Key rewrite points:

- Making more use of apt now, since we no longer need `brew` for llvm on Linux.
  - Gets ahead of issues with brew's llvm 15 on Linux.
- Clear list of commands for a typical setup.
- Less verbose text about various tool options (I think this was just too much).

Co-authored-by: Richard Smith <richard@metafoo.co.uk>
2022-09-30 13:21:27 -07:00
Jon Ross-Perkins 768764787f Fix x/_ and y/z in faq example. (#2230) 2022-09-29 10:52:05 -07:00
Jon Ross-Perkins 1dcd15380c Remove stacked PR notes (#2205)
chandlerc had originally added these and previously expressed being okay with removing them. They've just proven too complex to be applied; it needs to be easier for people to want to do it.
2022-09-21 16:10:36 -07:00
Jon Ross-Perkins 360f905755 Remove update_label_access, which is obsolete (#2184)
The PyGithub import is causing problems for me in test execution, but TBH I don't think we need it anymore. I should probably update groups.md though.
2022-09-15 13:57:50 -07:00
josh11bandChandler Carruth 54059801ca More etiquette for responding to code reviews (#2169)
Includes the advice from https://github.com/carbon-language/carbon-lang/pull/2022#issuecomment-1239070023

Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
2022-09-13 08:15:43 -07:00
Geoff RomerandJon Ross-Perkins 36a5a52a84 Add FAQ entries for common syntax questions (#2011)
Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
2022-09-07 23:54:11 +03:00
Jon Ross-Perkins 2bc6da2967 Try a different autoassign action (#2093)
This removes the separate data files, which have been failing to load properly ([example](https://github.com/carbon-language/carbon-lang/runs/7957047892?check_suite_focus=true)). This one wasn't working previously, but hopefully will with these changes (and it might've also just been a pull_request_target issue, but the silent "Resource not accessible by integration" failures aren't great).
2022-08-23 12:13:19 -07:00
Enzo Venturi f338f56502 docs: fix little writing issue (#2031) 2022-08-15 10:16:49 -07:00
Jon Ross-Perkins 9b3f80c6d6 Switch proposal process from projects to labels (#1981)
This is being done because Projects v1 requires repo write access, a serious limitation for letting people use it. Projects v2 isn't a great option because it lacks event support. Labels are pretty stable in GitHub, so this switches to that.

Note this assumes we're fine renaming "decision: accepted" -> "proposal accepted", etc. There are two reasons for this:

1) To make it clear that this is a proposal-specific label, versus something like an issue for leads label.
2) Removing the colon because it was causing trouble with yaml syntax.

This also adds the "proposal draft" label, mainly to complete the taxonomy.

I was considering whether this should be a proposal itself, but it feels like maybe it's not necessary because it's a fairly low-key infrastructure change, and I'm not sure how much people were relying on the project board anyways.

I tested this in a personal repo, basically just poking at https://github.com/jonmeow/test/pull/2
2022-08-12 11:11:09 -07:00
Jon Ross-Perkins 6b3ea40283 Update leads questions process for labels (#1995)
Separately working on labeling everything and filing tracking issues as discussed.

For project columns, the result is:

"Blocking issues" -> gone, we haven't been using it
"Questions" -> "leads questions" label, open: https://github.com/carbon-language/carbon-lang/issues?
q=is%3Aissue+is%3Aopen+label%3A%22leads+question%22
"Resolved" -> "leads questions" label, closed: https://github.com/carbon-language/carbon-lang/issues?q=is%3Aissue+is%3Aclosed+label%3A%22leads+question%22+
"Needs proposal" -> file a tracking issue, remark on the linked issue
"Deferred" -> add the "long term" label: https://github.com/carbon-language/carbon-lang/issues?q=is%3Aissue+is%3Aopen+label%3A%22leads+question%22+label%3A%22long+term%22

Note the "long term" label overlaps with the automation that reminds people when we're inactive, so it's two birds, one stone.

This is part of #1898
2022-08-12 10:55:45 -07:00
Dennis Onyeka 45a5828bb4 Update low_context_sensitivity (#1970)
Corrected a Typo error on line 220
2022-08-09 15:36:12 -07:00
90598633ec Document a little about moderators and tiers (#1909)
Note, partly writing this down to make sure everyone's in agreement with what's written.

Co-authored-by: Geoff Romer <gromer@google.com>
Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
2022-08-09 15:35:03 -07:00
Asmi AgarwalandJon Ross-Perkins f9bd01536b Fixed error (#1966)
Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
2022-08-09 09:09:33 -07:00
Krishna Agarwal 5d12c25bbe minor mistakes (#1952) 2022-08-09 09:00:07 -07:00
cabmeurer 8f80399bad Fix typo: Add missing backtick (#1959)
There was a small typo in the `contribution_tools.md` for `bazel test //...:all`
2022-08-08 10:42:22 -07:00
Jon Ross-Perkins d7613f5ef7 Updating links for shared drive and access notes (#1933)
Part of #1902 

Fixes #1904 

Regarding #1904, using #access-requests because I've decided I feel weird using any other channel for this (including #proposal-prs-and-process)
2022-08-08 09:11:00 -07:00
Jon Ross-Perkins fb38a43de8 Add formatter mention to the goals (#1922)
Trying to do this without affecting too much. I think we've generally considered this to be part of "refactoring tools", since large-scale refactoring is assisted by automatic formatting, but formatting is visible enough that it's probably worth addressing directly.

Fixes https://github.com/carbon-language/carbon-lang/issues/1656
2022-08-05 07:51:27 -07:00