You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With this approach, GlueModule is precompiled. Unfortunately, I get this warning:
┌ Warning: Package ExampleTwo does not have GlueModule in its dependencies:
│ - If you have ExampleTwo checked out for development and have
│ added GlueModule as a dependency but haven't updated your primary
│ environment's manifest file, try `Pkg.resolve()`.
│ - Otherwise you may need to report an issue with ExampleTwo
└ Loading GlueModule into ExampleTwo from project dependency, future warnings for ExampleTwo are suppressed.
I understand the purpose of the "Warning: Package Foo does not have Bar in its dependencies" warning when Bar is a real package with a UUID that is in the Julia General registry and can be added to a Project.toml file. But in this case, GlueModule isn't a real package - it's a glue module that is located in the same package repository as ExampleTwo. GlueModule doesn't have its own GitHub repository, doesn't have its own UUID, is not separately registered in the Julia General registry, and cannot be added to a Project.toml file.
So is there a way to suppress the "Warning: Package ExampleTwo does not have GlueModule in its dependencies" warning for glue modules that are conditionally loaded by Requires.jl?
The text was updated successfully, but these errors were encountered:
Will be closed when the "package extension" feature of 1.9 lands: instead of separating code into another module and "using"-importing it via Requires to try and get precompilation which is what triggers the warning, the extra code can be defined as a package extension.
Cross posted from JuliaPackaging/Requires.jl#65 and JuliaLang/Pkg.jl#1238.
I can conditionally load code like this:
ExampleOne.jl
:But code loaded like this is not precompiled.
If I want to be able to precompile my conditionally loaded code, I can do so like this:
ExampleTwo.jl
:Where the contents of
GlueModule.jl
are:With this approach,
GlueModule
is precompiled. Unfortunately, I get this warning:I understand the purpose of the "Warning: Package
Foo
does not haveBar
in its dependencies" warning whenBar
is a real package with a UUID that is in the Julia General registry and can be added to aProject.toml
file. But in this case,GlueModule
isn't a real package - it's a glue module that is located in the same package repository asExampleTwo
.GlueModule
doesn't have its own GitHub repository, doesn't have its own UUID, is not separately registered in the Julia General registry, and cannot be added to aProject.toml
file.So is there a way to suppress the "Warning: Package
ExampleTwo
does not haveGlueModule
in its dependencies" warning for glue modules that are conditionally loaded by Requires.jl?The text was updated successfully, but these errors were encountered: