-
Notifications
You must be signed in to change notification settings - Fork 4
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
Safer loading #7
Conversation
Seems fine. The main concern should be whether Hwloc is available though. |
Why may it not be? Of course something seems to be going wrong, so it's probable that I am mistaken somewhere. |
If running Julia on WINE, Hence, it's meant to fail in situations like that. |
Codecov Report
@@ Coverage Diff @@
## main #7 +/- ##
=======================================
Coverage 38.58% 38.58%
=======================================
Files 3 3
Lines 184 184
=======================================
Hits 71 71
Misses 113 113
Continue to review full report at Codecov.
|
But you are only allowed to load "top level packages", and if |
Ah. I guess |
This works: julia> Hwloc = Base.require(Base.PkgId(Base.UUID("0e44f5e4-bd66-52a0-8798-143a42290a1d"), "Hwloc"))
Hwloc |
Excellent! julia> using Hwloc
│ Package Hwloc not found, but a package named Hwloc is available from a registry.
│ Install package?
│ (p3) pkg> add Hwloc
└ (y/n/o) [y]: n
ERROR: ArgumentError: Package Hwloc not found in current path.
- Run `import Pkg; Pkg.add("Hwloc")` to install the Hwloc package.
Stacktrace:
[1] macro expansion
@ ./loading.jl:1047 [inlined]
[2] macro expansion
@ ./lock.jl:223 [inlined]
[3] require(into::Module, mod::Symbol)
@ Base ./loading.jl:1028
julia> Base.require(Base.PkgId(Base.UUID("0e44f5e4-bd66-52a0-8798-143a42290a1d"), "Hwloc"))
[ Info: Precompiling Hwloc [0e44f5e4-bd66-52a0-8798-143a42290a1d]
Hwloc |
@tkf @fredrikekre
Is this better? Or should I take an approach like JuliaLang/julia/pull/43270?
Also, I'm not sure how to test if this actually works.
The current tests were passing even in the broken versions.