Closed
Description
It seems to me that LocalPreferences.toml
don't have any effect if the package I am setting the dependency in isn't listed as a direct dependency.
I prepared a small example: prefs.tar.gz
A
is the package using Preferences.jl to manage a "backend"B
is usingA
C
is usingB
vchuravy@odin ~/s/prefs> cat B/LocalPreferences.toml
[A]
backend = "CUDA"
vchuravy@odin ~/s/prefs> cat C/LocalPreferences.toml
[A]
backend = "CUDA"
vchuravy@odin ~/s/prefs> julia --project=B -e "using B; @show B.active_backend()"
B.active_backend() = "CUDA"
vchuravy@odin ~/s/prefs> julia --project=C -e "using B; @show B.active_backend()"
B.active_backend() = "OpenCL"
Both have the same LocalPreferences.toml
After adding A
to C
as a dependency things seem to work. But this is problematic for several use-cases of Preferences. I found this the first time when I wanted to change the path of a library in a jll
package.
Metadata
Metadata
Assignees
Labels
No labels