Preferences.jl icon indicating copy to clipboard operation
Preferences.jl copied to clipboard

Global preferences

Open aplavin opened this issue 3 years ago • 17 comments

How to make global preferences for a package? I tried putting them to ~/.julia/environments/v1.7/Project.toml, but they are only available when this environment is in the LOAD_PATH. Code running from tests or from Pluto notebooks doesn't have this load path entry, so those preferences are unavailable. I'm talking about machine-specific preferences, like some system directory path, or hardware-related settings. They seem to be a good fit for Preferences.jl, but such preferences should always be available in order to make sense at all.

aplavin avatar Mar 16 '22 17:03 aplavin

Global preferences essentially work through the JULIA_LOAD_PATH. See https://juliaparallel.org/tutorials/preferences/#interactions_with_the_julia_load_path

vchuravy avatar Apr 20 '22 07:04 vchuravy

Yeah, you'll need to provide a global entry on the LOAD_PATH for this to work.

staticfloat avatar Apr 20 '22 17:04 staticfloat