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

Simplified package declaration for the Main package #2550

Merged

Conversation

zygoloid
Copy link
Contributor

@zygoloid zygoloid commented Jan 24, 2023

Make the preamble of simple programs more ergonomic, by removing the
package Main from the main package and removing the package declaration
entirely from the main source file. Imports within a single package no longer
need to, and are not permitted to, specify the package name.

Partially covers #2001 / #1136.
Covers #1869.
Supersedes #2265.
Addresses design idea #2323.

@zygoloid zygoloid added proposal A proposal proposal draft Proposal in draft, not ready for review labels Jan 24, 2023
@zygoloid zygoloid force-pushed the proposal-simplified-package-d branch from 1e1a425 to d3d9af9 Compare January 24, 2023 20:21
@zygoloid zygoloid marked this pull request as ready for review January 25, 2023 01:27
@zygoloid zygoloid requested a review from jonmeow January 25, 2023 01:27
@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 Jan 25, 2023
proposals/p2550.md Outdated Show resolved Hide resolved
proposals/p2550.md Outdated Show resolved Hide resolved
proposals/p2550.md Outdated Show resolved Hide resolved
proposals/p2550.md Outdated Show resolved Hide resolved
proposals/p2550.md Outdated Show resolved Hide resolved
docs/design/README.md Outdated Show resolved Hide resolved
proposals/p2550.md Outdated Show resolved Hide resolved
proposals/p2550.md Show resolved Hide resolved
zygoloid and others added 2 commits January 25, 2023 13:09
Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
@zygoloid zygoloid requested a review from jonmeow January 27, 2023 01:19
Copy link
Contributor

@jonmeow jonmeow left a comment

Choose a reason for hiding this comment

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

To the extent that this proposal is renaming the entry point from Run to Main in documentation, would it be good to try resolving #2265 first? It looks like that proposal has been quiet for a couple months, and could maybe use attention from leads.

docs/design/code_and_name_organization/README.md Outdated Show resolved Hide resolved
docs/design/code_and_name_organization/README.md Outdated Show resolved Hide resolved
proposals/p2550.md Outdated Show resolved Hide resolved
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.

Mostly marking this as needing an update now that #1869 is sorted out. Also a small comment inline.

docs/design/README.md Outdated Show resolved Hide resolved
@zygoloid zygoloid force-pushed the proposal-simplified-package-d branch from 8b42534 to 9f20a24 Compare May 30, 2023 22:36
Copy link
Contributor

@jonmeow jonmeow left a comment

Choose a reason for hiding this comment

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

I think this proposal is in a good state, regardless of how my pedantic comment is resolved.

proposals/p2550.md Outdated Show resolved Hide resolved
Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
@zygoloid zygoloid changed the title Simplified package declaration for the main package Simplified package declaration for the Main package May 31, 2023
docs/design/README.md Outdated Show resolved Hide resolved
docs/design/code_and_name_organization/README.md Outdated Show resolved Hide resolved
docs/design/code_and_name_organization/README.md Outdated Show resolved Hide resolved
proposals/p2550.md Outdated Show resolved Hide resolved
proposals/p2550.md Outdated Show resolved Hide resolved
proposals/p2550.md Show resolved Hide resolved
proposals/p2550.md Outdated Show resolved Hide resolved
proposals/p2550.md Outdated Show resolved Hide resolved
proposals/p2550.md Outdated Show resolved Hide resolved
Co-authored-by: josh11b <josh11b@users.noreply.github.com>
zygoloid and others added 3 commits July 5, 2023 16:07
Co-authored-by: josh11b <josh11b@users.noreply.github.com>
Co-authored-by: josh11b <josh11b@users.noreply.github.com>
@zygoloid zygoloid requested a review from josh11b July 5, 2023 23:21
proposals/p2550.md Outdated Show resolved Hide resolved
proposals/p2550.md Outdated Show resolved Hide resolved
Co-authored-by: josh11b <josh11b@users.noreply.github.com>
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.

Awesome, ship it!

@chandlerc chandlerc added this pull request to the merge queue Jul 6, 2023
Merged via the queue into carbon-language:trunk with commit ea982ad Jul 6, 2023
6 checks passed
github-merge-queue bot pushed a commit that referenced this pull request Aug 31, 2023
Most changes are due to proposal #2360, but this also includes changes
to reflect: #1136, #2138, #2006, #2550, and #2964.

---------

Co-authored-by: Richard Smith <richard@metafoo.co.uk>
@zygoloid zygoloid deleted the proposal-simplified-package-d branch October 4, 2023 23:27
zygoloid added a commit to zygoloid/carbon-lang that referenced this pull request Oct 5, 2023
github-merge-queue bot pushed a commit that referenced this pull request Oct 5, 2023
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.

5 participants