i learned today these behaviors of pants options t...
# general
a
i learned today these behaviors of pants options that surprised me: (1)
./pants test --compile-zinc-cache-ignore
works -- i would have assumed that this would become
--test-compile-zinc-cache-ignore
, which doesn't exist (2)
./pants test --junit-cache-ignore
fails -- i would have assumed this would become
--test-junit-cache-ignore
, analogous to
./pants test.junit --cache-ignore
, except additionally: (3)
./pants --test-junit-cache-ignore
isn't recognized!! resulting in
Exception message: Unrecognized command line flags on scope 'test.junit': --cache-ignore.
this is despite the fact that
./pants test.junit --cache-ignore
works!! i think these feel like fixable bugs -- one approach is e.g. to "normalize" all command lines into options with scopes, e.g. convert
test.junit --cache-ignore
into
--test-junit-cache-ignore
, and then modify the code that looks for options to be able to recognize that (it currently doesn't -- that's #3 above). has anyone experienced any other surprises with options? does anyone have any thoughts on whether changing the options behavior to fix 1, 2, 3 above might break existing behavior (e.g. in scripts calling pants)?
w
item 3 is because the correct scope for a "scoped" instance of a subsystem is:
--cache-test-junit-ignore