Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More consistent package syntax #3927

Merged

Conversation

zygoloid
Copy link
Contributor

@zygoloid zygoloid commented May 1, 2024

Change the syntax for package declarations from:

[package Foo] [library "bar"] api;
[package Foo] [library "bar"] impl;

to

[package Foo] [library "bar"];
impl [package Foo] [library "bar"];

@zygoloid zygoloid added proposal A proposal proposal draft Proposal in draft, not ready for review labels May 1, 2024
@zygoloid zygoloid force-pushed the proposal-more-consistent-pack branch from f58e129 to d00c76a Compare May 1, 2024 20:48
Change the syntax for `package` declarations from:

```carbon
[package Foo] [library "bar"] api;
[package Foo] [library "bar"] impl;
```

to

```carbon
[package Foo] [library "bar"];
impl [package Foo] [library "bar"];
```
@zygoloid zygoloid force-pushed the proposal-more-consistent-pack branch from d00c76a to b093019 Compare May 1, 2024 22:15
@zygoloid zygoloid marked this pull request as ready for review May 1, 2024 22:15
@github-actions github-actions bot added proposal rfc Proposal with request-for-comment sent out and removed proposal draft Proposal in draft, not ready for review labels May 1, 2024
@github-actions github-actions bot requested a review from KateGregory May 1, 2024 22:16
docs/design/README.md Outdated Show resolved Hide resolved
Clean up other uses of the term "implementation" where we can instead
say "definition" to avoid confusion or ambiguity. Remove some lingering
references to the old `api` modifier, replacing them with mentions of
the new `private` modifier.
Mention that we're retiring the term "`impl` file".

Slightly reorganize.
Copy link
Contributor

@chandlerc chandlerc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, ship it!

@zygoloid zygoloid added this pull request to the merge queue May 16, 2024
Merged via the queue into carbon-language:trunk with commit 6bbbd4e May 16, 2024
7 checks passed
@zygoloid zygoloid deleted the proposal-more-consistent-pack branch May 16, 2024 00:59
zygoloid added a commit to zygoloid/carbon-lang that referenced this pull request May 20, 2024
Change syntax for package declaration to put the `impl` keyword at the
start and remove the `api` keyword.

To support this, rearrange processing of package, library, and import
declarations to use the general modifier handling support in declaration
parsing rather than special-case logic.
github-merge-queue bot pushed a commit that referenced this pull request May 21, 2024
Change syntax for package declaration to put the `impl` keyword at the
start and remove the `api` keyword.

To support this, rearrange processing of package, library, and import
declarations to use the general modifier handling support in declaration
parsing rather than special-case logic.

There is an ambiguity in `impl package.Foo as Bar`, which we resolve by
treating `package` as an introducer after a modifier only if it's not
followed by `.`.
CJ-Johnson pushed a commit to CJ-Johnson/carbon-lang that referenced this pull request May 23, 2024
Change the syntax for `package` declarations from:

```carbon
[package Foo] [library "bar"] api;
[package Foo] [library "bar"] impl;
```

to

```carbon
[package Foo] [library "bar"];
impl [package Foo] [library "bar"];
```
CJ-Johnson pushed a commit to CJ-Johnson/carbon-lang that referenced this pull request May 23, 2024
Change syntax for package declaration to put the `impl` keyword at the
start and remove the `api` keyword.

To support this, rearrange processing of package, library, and import
declarations to use the general modifier handling support in declaration
parsing rather than special-case logic.

There is an ambiguity in `impl package.Foo as Bar`, which we resolve by
treating `package` as an introducer after a modifier only if it's not
followed by `.`.
ryoari added a commit to ryoari/carbon-lang that referenced this pull request May 23, 2024
…ing document to reflect the change to package syntax from proposal carbon-language#3927
github-merge-queue bot pushed a commit that referenced this pull request May 23, 2024
… to reflect proposal #3927. (#3981)

Replace image file in /docs/images/ directory and update the svg editing
document to reflect the change to package syntax from proposal #3927

Closes #3969
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal rfc Proposal with request-for-comment sent out proposal A proposal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants