Skip to content

Commit

Permalink
Merge pull request #7 from JuliaSIMD/saferloading
Browse files Browse the repository at this point in the history
Safer loading
  • Loading branch information
chriselrod authored Mar 22, 2022
2 parents a9a0204 + ed9b3aa commit 91846c7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "CPUSummary"
uuid = "2a0fbf3d-bb9c-48f3-b0a9-814d99fd7ab9"
authors = ["chriselrod <[email protected]> and contributors"]
version = "0.1.16"
version = "0.1.17"

[deps]
Hwloc = "0e44f5e4-bd66-52a0-8798-143a42290a1d"
Expand Down
7 changes: 6 additions & 1 deletion src/CPUSummary.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ use_hwloc(b) = @set_preferences!("hwloc" => b)

@static if USE_HWLOC
try
p = run(`$(Base.julia_cmd()) --project=$(Base.active_project()) -e'using Hwloc; Hwloc.gettopology()'`, wait=false)
script = """
$(Base.load_path_setup_code())
Hwloc = Base.require(Base.PkgId(Base.UUID("0e44f5e4-bd66-52a0-8798-143a42290a1d"), "Hwloc"))
Hwloc.gettopology()
"""
p = run(`$(Base.julia_cmd()) -e $(script)`, wait=false)
wait(p)
if p.exitcode == 0 && p.termsignal == 0
include("topology.jl")
Expand Down

2 comments on commit 91846c7

@chriselrod
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/57097

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.17 -m "<description of version>" 91846c77aed015cf2ba2fe738197e5b6aa64eb04
git push origin v0.1.17

Please sign in to comment.