-
Notifications
You must be signed in to change notification settings - Fork 500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Share settings between modules #2271
Comments
Hi @prasannavl, @casey, I think the best way to address your valid point is introduce an optional keyword or mechanism (e.g., When this feature is enabled, all set options defined in the parent So the example I've made is the following: set shell := "bash"
set quiet := true I think by introducing an It would allow for transitive propagation of options without sacrificing flexibility or requiring repetitive definitions. Cheers, |
Thanks for opening this issue! There should definitely be a way to share settings between modules. There are kind of two ways to go about it:
|
Currently, when using
import
, import happens into the parent justfile, so imports can use all the variables as well as the options that are set withset
likeshell
, etc.However, when another justfile is used as a module, this module entirely lives in it's own scope. While variables can atleast be exported in the parent and reexamined in the module with
shell("echo $VARIABLE")
, there is currently no way for options to be carried on.This makes it challenging to use in many scenarios.
Context: I'm trying to build a mono-repo, with just as the task runner. Experiment here: https://github.com/prasannavl/monorepo-experiments/tree/main/just-refined
WORKSPACE_OUT
,WORKSPACE_ROOT
are exported. However,shell
option needs to be set at each and every module, which might defeat the purpose in many aspects.The text was updated successfully, but these errors were encountered: