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

Setting preferences for other packages.

Open lassepe opened this issue 3 years ago • 4 comments

In one of my packages, say PkgA, I would like to set a preference for one of its dependencies, say PkgB. I did so by setting the preference key-value-pair in PkgA/Project.toml. When I activate the env of PkgA this does what I want. However, when I depend on PkgA in another package, say PkgC (which does not have any preferences set at all), then the preference I specified in the PkgA/Project.toml for PkgB's config value is not loaded. Is there a way to achieve this or is this beyond the (current) scope of this package?

lassepe avatar Apr 25 '22 20:04 lassepe

Similarly, when package A depends on package B and I change preferences in LocalPreferences.toml for A, then launch tests ]test for A, it does not load preferences for B, even though they are specified in LocalPreferences.toml.

But when loading package A directly, it loads preferences for B as well.

pxl-th avatar Jun 25 '22 14:06 pxl-th

@pxl-th I think that's #24.

giordano avatar Jun 25 '22 22:06 giordano

@pxl-th I think that's #24.

Indeed, thanks.

pxl-th avatar Jun 26 '22 14:06 pxl-th

Is there any update on the original question by @lassepe for how to set preferences on package dependencies, that should be passed on to other packages unless overridden?

nathanaelbosch avatar Apr 26 '23 08:04 nathanaelbosch