-
Notifications
You must be signed in to change notification settings - Fork 511
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
Allow setting duplicate settings #2563
Comments
Settings and variables are distinct, so I'm a bit hesitant to add more They're really a hack to, originally, work around the lack of modules, and now to work around limitations of modules. Modules have their own settings scope, so you can put whatever settings you want inside of submodules and they won't conflict. The biggest limitation is that you can't call recipes in child modules, which is, I think, the main reason why often using imports won't help with particular use cases. |
Right, in our case we're using these across repos (only some of which are public). The example Quiet isn't a big deal (and we can prefix |
|
What if there's no syntax changes, it's only an error to set a setting to a new value, but a no-op to set it to the same value again? So multiple files can all have the same setting, but disagreements would error out (same as today). |
That's definitely less bad. I vaguely worry that it would mask user error, but I think it would be okay, and probably what most people need. I want to let this feature request sit for a little bit, and collect some feedback and see if anyone else needs it. |
I've got two justfiles across related projects. Each should work on their own, but the child imports the parent for extra (optional) functionality. It's roughly:
And it works great!
But, I want to set
quiet
in both files. If I always usedchild
whenparent
was present, then I could just piggyback on a definition in parent. Or, exclude it from parent and set it in each child. But, since each justfile should work independently, I find myself wanting to set it in both places. Today, I get an error:I'd expect it to follow the existing
allow-duplicate-variables
behavior: last setting wins.Is this sort of thing possible today? Alternatively, would you be open to a PR?
The text was updated successfully, but these errors were encountered: