-
-
Notifications
You must be signed in to change notification settings - Fork 195
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 import_to_main
flag for Main module package name conflicts resolution
#807
Conversation
for pkg in packages | ||
print(julia_code_buffer, """ | ||
if isdefined(Main, Symbol("$pkg")) | ||
@warn( |
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.
Did you check that users will see this warning?
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.
I saw it on a build once but let me confirm on a simple example
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.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #807 +/- ##
=======================================
Coverage 84.64% 84.64%
=======================================
Files 3 3
Lines 827 827
=======================================
Hits 700 700
Misses 127 127 ☔ View full report in Codecov by Sentry. |
@KristofferC Can we merge and tag this? I confirmed it works fine on my case |
src/PackageCompiler.jl
Outdated
@@ -504,6 +516,9 @@ compiler (can also include extra arguments to the compiler, like `-g`). | |||
transitive dependencies into the sysimage. This only makes a difference if some | |||
packages do not load all their dependencies when themselves are loaded. Defaults to `true`. | |||
|
|||
- `import_into_main::Bool`: If `true`, import all packages from the sysimage into `Main`. |
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.
Is this true? I thought it was just the packages in the [deps]
section of the project file.
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.
No, I believe only deps from the project you're creating a sysimage of go in
- `import_into_main::Bool`: If `true`, import all packages from the sysimage into `Main`. | |
- `import_into_main::Bool`: If `true`, import all packages from `packages` into `Main`. |
This is more accurate I guess
This contains only the
import_to_main
part of #794Fixes #768
Changelog:
import_into_main
flag (default true), which allows you to control whether the top level packages will be imported into Main in the sysimage