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
Extension modules (weak dependencies) only seem to load if both packages are in the currently-active environment. The docs say
An extension will only be loaded if the extension dependencies are loaded from the same environment or environments higher in the environment stack than the package itself.
but I am not certain that applies here, since both packages are in the same (default) environment. Either the docs might benefit from clarification, or there may be a bug.
Demo:
julia>using PkgCacheInspector, MethodAnalysis
julia>methods(methodinstances, (PkgCacheInfo,))
# 1 method for generic function "methodinstances" from MethodAnalysis:
[1] methodinstances(info::PkgCacheInfo)
@ MethodAnalysisExt ~/.julia/packages/PkgCacheInspector/s2sOo/ext/MethodAnalysisExt.jl:5
That works (both are in my default environment).
Now open a fresh session:
(@v1.10) pkg> generate A
Generating project A:
A/Project.toml
A/src/A.jl
(@v1.10) pkg> activate ./A
Activating project at `/tmp/pkgs/A`
(A) pkg> st
Project A v0.1.0
Status `/tmp/pkgs/A/Project.toml` (empty project)
julia>using PkgCacheInspector, MethodAnalysis
julia>methods(methodinstances, (PkgCacheInfo,))
# 1 method for generic function "methodinstances" from MethodAnalysis:
[1] methodinstances(top)
@ ~/.julia/packages/MethodAnalysis/oGkyP/src/MethodAnalysis.jl:171
Note that this is the generic method, indicating that the one specialized for PkgCacheInfo didn't load.
In case this has already been fixed, worth saying my master is a few days old:
julia>versioninfo()
Julia Version 1.10.0-DEV.368
Commit 65e6919079 (2023-01-1412:26 UTC)
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU:16×12th Gen Intel(R) Core(TM) i7-1260P
WORD_SIZE:64
LIBM: libopenlibm
LLVM: libLLVM-14.0.6 (ORCJIT, alderlake)
Threads:1 on 16 virtual cores
The text was updated successfully, but these errors were encountered:
break# For now, only insert triggers for packages in the first load_path.
.
I think that is an old thing that was there before I had a more clear picture of how extensions should work with environment stacks. Should be fine to just remove it. I will do that and add a test.
Extension modules (weak dependencies) only seem to load if both packages are in the currently-active environment. The docs say
but I am not certain that applies here, since both packages are in the same (default) environment. Either the docs might benefit from clarification, or there may be a bug.
Demo:
That works (both are in my default environment).
Now open a fresh session:
Note that this is the generic method, indicating that the one specialized for
PkgCacheInfo
didn't load.In case this has already been fixed, worth saying my
master
is a few days old:The text was updated successfully, but these errors were encountered: