main: rename data-dir to force-data-dir#386
Merged
lzap merged 1 commit intoosbuild:mainfrom Nov 27, 2025
Merged
Conversation
Let's name arguments that fully override built-in definitions with the `force-` prefix. This makes room for an `extra-data-dir` in the future that allows for drop-in data. The same will be applied to passing other arguments in the future. We use a normalization to rename the old argument to the new one so we can keep accessing it under a single name and a deprecation to hide the previous argument name but still accept it on the command. Cobra will emit a deprecation warning for us. Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
lzap
approved these changes
Nov 26, 2025
Contributor
|
I'm a bit late, sorry - should we update the README.md as well (that currently mentionds --data-dir) without the --force-data-dir? |
Contributor
|
Sorry for rushing that in. |
Member
Author
Yes, I'll do a follow-up. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Let's name arguments that fully override built-in definitions with the
force-prefix. This makes room for anextra-data-dirin the future that allows for drop-in data.The same will be applied to passing other arguments in the future.
We use a normalization to rename the old argument to the new one so we can keep accessing it under a single name and a deprecation to hide the previous argument name but still accept it on the command.
Cobra will emit a deprecation warning for us.
I'm planning to add a
--force-defs-dirargument to make using YAML definitions a little bit more discoverable (though still experimental initially). This aligns nicely with the--{force,extra}-repoand we'd be consistent over all arguments, as we'll likely want drop-in definitions and full override capabilities.