-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Implement module privacy rules #4474
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This change mainly adds checks to enforce the new module privacy rules and supporting changes for it. Changes include updating std and core to use public modules, updating the parser to allow the use of the `pub mod` syntax and adding an error type for private modules. This change is implemented behind a `--experimental-private-modules` experimental flag and not enabled by default. It implements part of #4446, the `pub use` syntax is yet to be implemented.
IGI-111
force-pushed
the
IGI-111/privacy-rules
branch
6 times, most recently
from
April 27, 2023 09:23
cba0704
to
9ddb4d0
Compare
IGI-111
force-pushed
the
IGI-111/privacy-rules
branch
from
April 27, 2023 09:32
9ddb4d0
to
faad810
Compare
IGI-111
added
enhancement
New feature or request
language feature
Core language features visible to end users
breaking
May cause existing user code to break. Requires a minor or major release.
compiler: frontend
Everything to do with type checking, control flow analysis, and everything between parsing and IRgen
compiler: parser
Everything to do with the parser
compiler: ui
Mostly compiler messages
labels
Apr 27, 2023
tritao
reviewed
Apr 27, 2023
sway-core/src/semantic_analysis/ast_node/declaration/impl_trait.rs
Outdated
Show resolved
Hide resolved
IGI-111
force-pushed
the
IGI-111/privacy-rules
branch
from
April 27, 2023 23:29
f02719f
to
cd70abe
Compare
JoshuaBatty
approved these changes
Apr 28, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
tritao
approved these changes
Apr 28, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
breaking
May cause existing user code to break. Requires a minor or major release.
compiler: frontend
Everything to do with type checking, control flow analysis, and everything between parsing and IRgen
compiler: parser
Everything to do with the parser
compiler: ui
Mostly compiler messages
enhancement
New feature or request
language feature
Core language features visible to end users
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This change mainly adds checks to enforce the new module privacy rules
and supporting changes for it.
Changes include updating std and core to use
public modules, updating the parser to allow the use of the
pub mod
syntax and adding an error type for private modules.
This change is implemented behind a
--experimental-private-modules
experimental flag and not enabled by default.
It implements part of #4446, the
pub use
syntax is yet to be implemented.Checklist
Breaking*
orNew Feature
labels where relevant.