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

Implement module privacy rules #4474

Merged
merged 4 commits into from
Apr 28, 2023
Merged

Implement module privacy rules #4474

merged 4 commits into from
Apr 28, 2023

Conversation

IGI-111
Copy link
Contributor

@IGI-111 IGI-111 commented Apr 20, 2023

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

  • I have linked to any relevant issues.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where relevant (API docs, the reference, and the Sway book).
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@IGI-111 IGI-111 self-assigned this Apr 24, 2023
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 IGI-111 force-pushed the IGI-111/privacy-rules branch 6 times, most recently from cba0704 to 9ddb4d0 Compare April 27, 2023 09:23
@IGI-111 IGI-111 force-pushed the IGI-111/privacy-rules branch from 9ddb4d0 to faad810 Compare April 27, 2023 09:32
@IGI-111 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
@IGI-111 IGI-111 requested a review from a team April 27, 2023 18:10
@IGI-111 IGI-111 marked this pull request as ready for review April 27, 2023 18:11
@IGI-111 IGI-111 mentioned this pull request Apr 27, 2023
3 tasks
@IGI-111 IGI-111 force-pushed the IGI-111/privacy-rules branch from f02719f to cd70abe Compare April 27, 2023 23:29
@IGI-111 IGI-111 requested review from tritao and a team April 27, 2023 23:29
Copy link
Member

@JoshuaBatty JoshuaBatty left a comment

Choose a reason for hiding this comment

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

utACK

@JoshuaBatty JoshuaBatty requested a review from a team April 28, 2023 05:14
@tritao tritao merged commit 1ecc5e7 into master Apr 28, 2023
@tritao tritao deleted the IGI-111/privacy-rules branch April 28, 2023 09:30
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants