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

Prevent user code from referring to internal module names #19793

Open
bradcray opened this issue May 11, 2022 · 2 comments
Open

Prevent user code from referring to internal module names #19793

bradcray opened this issue May 11, 2022 · 2 comments

Comments

@bradcray
Copy link
Member

PR #19788 changes things to prevent internal module names from being automatically available in user code by relying on the new public use behavior introduced in #19306 which is good as internal module names are not meant to be user facing, so having ChapelBase be automatically available is a bit odd. However, it does not prevent user code from writing use ChapelBase; / import ChapelBase; (or similarly for other internal modules). In this issue, I'm proposing that we only resolve internal module names for other internal modules, not for user/package/standard modules.

@mppf
Copy link
Member

mppf commented May 11, 2022

There is a bit of an issue with the automatic use of ChapelStandard but I think we can make a special case for that.

@bradcray
Copy link
Member Author

I wonder whether that could be finessed by having the compiler-injected use ChapelStandard; use a resolved symbol to refer to it, and to put the choke point for other internal modules in the logic that tries to change it from UnresolvedSymbol to resolved...?

bradcray added a commit that referenced this issue May 13, 2022
…le-ref

Fix failing test fallout from #19788

[trivial, not reviewed]

This test is only run on linux32, so escaped my testing and refers to
an internal module, which is no longer available by default.  Here,
I'm using an explicit `use` to bring the module's name into scope,
though this will also break if/when we implement the proposal in
#19793.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants