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

Add disable-private-check option #8202

Merged
merged 4 commits into from
Nov 2, 2023

Conversation

Akirathan
Copy link
Member

@Akirathan Akirathan commented Nov 1, 2023

Fixes #8140. Follow-up of #7840.

Pull Request Description

Adds --disable-private-check option that essentialy disables private keyword.

Important Notes

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed, the GUI was tested when built using ./run ide build.

@Akirathan Akirathan self-assigned this Nov 1, 2023
@Akirathan Akirathan force-pushed the wip/akirathan/8140-disable-private-check branch from 0b446df to dadae74 Compare November 1, 2023 13:14
@Akirathan Akirathan added the CI: No changelog needed Do not require a changelog entry for this PR. label Nov 1, 2023
@Akirathan Akirathan marked this pull request as ready for review November 1, 2023 13:33
AmbiguousImportsAnalysis,
PrivateModuleAnalysis.INSTANCE,
AmbiguousImportsAnalysis
) ++ (if (config.privateCheckEnabled) {
Copy link
Member Author

Choose a reason for hiding this comment

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

So far, we only implement private modules via PrivateModuleAnalysis compiler pass, there is no runtime checking yet. Thus, this conditional adding of PrivateModuleAnalysis pass effectively disables the checks. In the future, when we will have more private stuff, like types, we will need some more sophisticated way to disable these checks. That is why the option is also in EnsoLanguage and not only in CompilerConfig.

Copy link
Collaborator

@hubertp hubertp left a comment

Choose a reason for hiding this comment

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

So many changes just to pass a single flag... 🤦

@Akirathan Akirathan merged commit 8884852 into develop Nov 2, 2023
33 checks passed
@Akirathan Akirathan deleted the wip/akirathan/8140-disable-private-check branch November 2, 2023 13:25
mergify bot pushed a commit that referenced this pull request Mar 27, 2024
I forgot to add the `--disable-private-check` cmdline option in #8202. This PR fixes this:
```
> enso -h | grep -A2 private
--disable-private-check                Disables private module
checking at runtime. Useful for
tests.

```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot disable private module checks in tests
3 participants