-
Notifications
You must be signed in to change notification settings - Fork 30
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
No longer merge config files by default, use priorities instead #790
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙏
I wonder if either is the right behaviour, though. Do you actually want options that you haven't specified on the local configuration file to override the ones from the global configuration file? This doesn't seem like the general case. Your feeling is that you shouldn't have to write Could we document what ideal semantics we'd like to have (regardless of whether it's feasible with Nickel)? |
I'm not sure there is a single right behavior, to be honest. I'm not sure either I understand what you mean by "per-option priority", could you please elaborate on that? It sort of makes sense to think about per-language priority, but at the moment a "language" isn't well defined in the configuration file. You're correct regarding one of the goal of this PR: I don't want to have to specify In the end, I'd argue that even if I don't know what the ideal semantics of multiple configuration files should be, the behavior introduced in this PR is something we want to have no matter what. What's open to discussion is whether it should be the default behavior. |
It's not necessarily something very precise. But maybe you have
Maybe a better way would be to have the gobal configuration file to be only
I agree, it's akin to the |
Description
At the moment, the way Topiary configuration works is counterintuitive: the README suggests that configuration files are somehow prioritized, and that a higher-priority file trumps a lower-priority one.
This is not the case. Because of how Nickel merge works, all configuration files are actually equivalent, which has led to problems when a configuration passed with the
-C
option disagrees with, for instance, the built-in configuration. Although this behavior is documented in the README, I think it's highly counterintuitive.This PR switches the default behavior to priority-based, meaning that all lower-priority files will be disregarded.
The newly added flag
--merge-configuration
reinstates the old behavior.Closes #612 (sort of)
Checklist
Checklist before merging: