Skip to content

Commit 8208fcc

Browse files
committed
Revert Ref around the path variable
1 parent 32c80b6 commit 8208fcc

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/products/executable_generators.jl

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,18 @@ function declare_old_executable_product(product_name)
77
return Base.invokelatest(
88
JLLWrappers.withenv_executable_wrapper,
99
f,
10-
$(Symbol("$(product_name)_path"))[],
10+
$(Symbol("$(product_name)_path")),
1111
PATH[],
1212
LIBPATH[],
1313
adjust_PATH,
1414
adjust_LIBPATH,
1515
)
1616
end
1717

18-
$(path_name) = Ref{String}()
18+
# This will eventually be replaced with a `Ref{String}`
19+
$(path_name) = ""
1920
function $(Symbol(string("get_", product_name, "_path")))()
20-
return $(path_name)[]
21+
return $(path_name)::String
2122
end
2223
end
2324
end
@@ -38,7 +39,7 @@ function declare_new_executable_product(product_name)
3839
adjust_PATH,
3940
adjust_LIBPATH,
4041
)
41-
return Cmd(Cmd([$(path_name)[]]); env)
42+
return Cmd(Cmd([$(path_name)]); env)
4243
end
4344

4445
# Signal to concerned parties that they should use the new version, eventually.
@@ -60,7 +61,7 @@ macro init_executable_product(product_name, product_path)
6061
path_name = Symbol(string(product_name, "_path"))
6162
return esc(quote
6263
# Locate the executable on-disk, store into $(path_name)
63-
$(path_name)[] = joinpath(artifact_dir, $(product_path))
64+
global $(path_name) = joinpath(artifact_dir, $(product_path))
6465

6566
# Add this executable's directory onto the list of PATH's that we'll need to expose to dependents
6667
push!(PATH_list, joinpath(artifact_dir, $(dirname(product_path))))

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module TestJLL end
2525
else
2626
@test @eval TestJLL HelloWorldC_jll.is_available()
2727
@test "Hello, World!" == @eval TestJLL hello_world(h->readchomp(`$h`))
28-
@test isfile(@eval TestJLL HelloWorldC_jll.hello_world_path[])
28+
@test isfile(@eval TestJLL HelloWorldC_jll.hello_world_path)
2929
@test isfile(@eval TestJLL HelloWorldC_jll.get_hello_world_path())
3030
@test isdir(@eval TestJLL HelloWorldC_jll.artifact_dir)
3131
@test !isempty(@eval TestJLL HelloWorldC_jll.PATH[])

0 commit comments

Comments
 (0)