fix(cli): reserve -V for ext-str#1032
Open
He-Pin wants to merge 2 commits into
Open
Conversation
fc07d8a to
28e593c
Compare
stephenamar-db
approved these changes
Jun 24, 2026
Motivation: Match C++ jsonnet, go-jsonnet, and jrsonnet CLI semantics where -V is the short alias for --ext-str only. The previous sjsonnet definition also attached -V to code-valued and TLA-valued options, making the short option ambiguous and inconsistent with the other implementations. Modification: Remove the -V short alias from --ext-code and --tla-code, keep it only on --ext-str, update the README help snapshot, and add CLI regression coverage backed by Jsonnet input files plus golden outputs. Result: -V now binds string external variables, while code external variables and top-level code arguments require their explicit long options.
28e593c to
1819fa4
Compare
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.
Motivation
-Vwas registered as a short alias for three different options:--ext-str,--ext-code, and--tla-code. The collision caused nondeterministic behavior depending on argument order. Reference implementations (C++ jsonnet, go-jsonnet, jrsonnet) reserve-Vexclusively for--ext-str.-Valiases--ext-stronly--ext-stronly--ext-stronly--ext-str,--ext-code,--tla-code(collision)--ext-stronlyModification
short = 'V'from--ext-codeand--tla-code@argannotations inConfig.scala.short = 'V'on--ext-stronly.Result
-Vexclusively aliases--ext-str, matching reference implementations.--ext-codeand--tla-coderemain available through their explicit long options.