bitter-ability-32190
09/20/2022, 3:14 PMbuf
and terraform
have different strategies for handling not being dedicated to a single goal:
buf
has one subsystem: buf
which has format/lint_skip
and format/lint_args
(sic on format
)
terraform
has terraform-fmt
terraform-validate
, etc...
It seems to me what we don't have is a guide on how to shape subsystems, what conventions we have, etc...
One piece of this would be to introduce "pluggable" options for goals (like injected field for a target). So black-skip
would be fmt-skip-black
(which would match the field name π )
Thoughts y'all?bitter-ability-32190
09/20/2022, 3:14 PMintroduce "pluggable" optionsI have no idea how to make that a nondisruptive change though, thinking of our future deprecation policy. Guess that'd take thought
curved-television-6568
09/20/2022, 3:57 PMbitter-ability-32190
09/20/2022, 3:58 PMbitter-ability-32190
09/20/2022, 3:58 PMcurved-television-6568
09/20/2022, 3:58 PMbitter-ability-32190
09/20/2022, 3:58 PMbuf
breaks all the molds on this journey which is what triggered this discussion πcurved-television-6568
09/20/2022, 3:59 PMfmt-skip-black
arg above π πcurved-television-6568
09/20/2022, 3:59 PMbitter-ability-32190
09/20/2022, 4:03 PMfix
hundreds-father-404
09/20/2022, 4:10 PMpython-native-code
. I think it makes it much harder to discover things. So I bias towards buf
, one subsystem for both the fmt and lint implementationsbitter-ability-32190
09/20/2022, 4:13 PMhundreds-father-404
09/20/2022, 4:16 PMbitter-ability-32190
09/20/2022, 5:12 PMHelm
also kinda breaks the mold as well, in a different way. (I think I brought this up earlier).
It has no subsystem version, but the FieldSet has a skip_lint
field π΅ )bitter-ability-32190
09/20/2022, 5:14 PMargs
, but doesn't use them for lint
. Presumably because args
is for some other goal π€bitter-ability-32190
09/20/2022, 5:17 PMcheck
support also has this quirkbitter-ability-32190
09/26/2022, 12:41 AMFmtSubsystem.register_plugin_options(BlackFmtPluginOptons),
yields
$ ./pants help fmt
13:08:37.47 [INFO] Initializing scheduler...
13:08:38.26 [INFO] Scheduler initialized.
`fmt` goal options
------------------
Autoformat source code.
Activated by pants.core
Config section: [fmt]
...
--[no-]fmt-skip-black
PANTS_FMT_SKIP_BLACK
skip_black
default: False
current value: False
If true, don't use Black when running `./pants fmt` and `./pants lint`.
Advanced options available. You can list them by running ./pants help-advanced fmt.
Related subsystems: filter
bitter-ability-32190
09/26/2022, 12:41 AMbitter-ability-32190
09/26/2022, 1:16 AM