Open topolarity opened 2 months ago
If I change [deps]
in the Project.toml to [weakdeps]
and do a Pkg> resolve
and Pkg> instantiate
then this works:
julia> using Foo, ModelingToolkit
julia> Base.get_extension(Foo, :ModelingToolkitFooExt)
ModelingToolkitFooExt
Out or curiosity, what is the use case? Since it is a strong dependency I would thought you would put the code in the package since it will be unconditionally loaded, or?
Actually... I thought this would work looking at https://github.com/JuliaLang/julia/pull/54009...
Ok, it does work on 1.11, it is just that this feature is not available on 1.10.
Out or curiosity, what is the use case?
Not a very compelling one, but still something I'd expect would work.
I wanted to ] add
the extension package so that I could run my tests and I was using --project=.
- Basically, I was messing with my environment temporarily as a poor man's version of TestEnv.jl
Yeah, that's the use case that was given in https://github.com/JuliaLang/julia/pull/54009 as well.
Even if the feature is not available on 1.10, I think we ought to fix the KeyError that can happen here: https://github.com/JuliaLang/Pkg.jl/issues/4018
The extension does not load when doing
using Foo, ModelingToolkit
:Related: https://github.com/JuliaLang/Pkg.jl/issues/3797 https://github.com/JuliaLang/Pkg.jl/issues/4018