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

Make imports prefer the "current" package #44

Open
Mercerenies opened this issue Jun 24, 2018 · 1 comment
Open

Make imports prefer the "current" package #44

Mercerenies opened this issue Jun 24, 2018 · 1 comment

Comments

@Mercerenies
Copy link
Owner

If a module import is ambiguous and one of the candidates is in the same package as the importing module, the module with the same package should be favored over the others. This behavior will only apply if the short form of use is used; in the long form fromPackage, the package name is already being specified by the user.

To this end, we may have to define a dynamic $currentPackage variable or similar, so that the import mechanism can query for the current package. Alternatively, we could attempt to use metaprogramming tools to get at the enclosing module (possibly exploiting $whereAmI to do so).

@Mercerenies
Copy link
Owner Author

d4d64ca is not a full fix, but it does improve the situation somewhat by eliminating a lot of ambiguity errors.

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

1 participant