Skip to content

Commit

Permalink
Do not make JLL packages require Preferences
Browse files Browse the repository at this point in the history
This will make the introduction of `Preferences` non-breaking: as it is now,
packages need to have `Preferences` in their own environment.
  • Loading branch information
giordano committed Feb 4, 2021
1 parent 11ddbff commit 9cbe2be
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
- "1.3"
- "1.4"
- "1.5"
- "^1.6.0-0"
- "nightly"
os:
- ubuntu-latest
Expand Down
7 changes: 5 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210"
authors = ["Mosè Giordano", "Elliot Saba"]
version = "1.3.0"

[deps]
Preferences = "21216c6a-2e73-6563-6e65-726566657250"

[compat]
Preferences = "1.2.1"
julia = "1.0.0"

[extras]
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Preferences = "21216c6a-2e73-6563-6e65-726566657250"

[targets]
test = ["Pkg", "Test", "Preferences"]
test = ["Pkg", "Test"]
4 changes: 4 additions & 0 deletions src/JLLWrappers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ if isdefined(Base, :Experimental) && isdefined(Base.Experimental, Symbol("@compi
@eval Base.Experimental.@compiler_options compile=min optimize=0 infer=false
end

if VERSION >= v"1.6.0-DEV"
using Preferences
end

# We need to glue expressions together a lot
function excat(exs::Union{Expr,Nothing}...)
ex = Expr(:block)
Expand Down
2 changes: 1 addition & 1 deletion src/toplevel_generators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function generate_imports(src_name)
else
# Use fast stdlib-based Artifacts + Preferences
return quote
using Libdl, Artifacts, Preferences, Base.BinaryPlatforms
using Libdl, Artifacts, JLLWrappers.Preferences, Base.BinaryPlatforms
using Artifacts: load_artifacts_toml, unpack_platform
using Base.BinaryPlatforms: triplet, select_platform
end
Expand Down
1 change: 0 additions & 1 deletion test/HelloWorldC_jll/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
JLLWrappers = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Preferences = "21216c6a-2e73-6563-6e65-726566657250"

[compat]
julia = "1.0"
1 change: 0 additions & 1 deletion test/OpenLibm_jll/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
JLLWrappers = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Preferences = "21216c6a-2e73-6563-6e65-726566657250"

[compat]
julia = "1.0"
1 change: 0 additions & 1 deletion test/Vulkan_Headers_jll/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
JLLWrappers = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Preferences = "21216c6a-2e73-6563-6e65-726566657250"

[compat]
julia = "1.0"
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ using JLLWrappers
using Pkg
using Test

# We use preferences only in Julia v1.6+
@static if VERSION >= v"1.6.0-DEV"
using Preferences
end
Expand Down

2 comments on commit 9cbe2be

@staticfloat
Copy link
Member

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/34512

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 v1.3.0 -m "<description of version>" 9cbe2beb3b9638a8c0102c664c3125e7ba621ae8
git push origin v1.3.0

Please sign in to comment.