bitter-ability-3219007/16/2022, 6:09 PM
fixes style, what fixes semantic issues?"
Pile in thread: 🧵
) or try and create a new one (a la
). There's pros and cons to either.
I doubt we'll find an existing schema we can all agree on, so I suggest we consider a punny new one. Although too many of these and users get lost "what does
My current guesstimate is something to the tune of
hundreds-father-40407/16/2022, 6:20 PM
Sorry if this derails, but I continue to not love
. The split for sure makes sense, only I think it might be a little confusing how do you run `fix`/`mend` in check-only mode
curved-television-656807/16/2022, 6:24 PM
. Check only
. Check only
? (No need to have a separate goal for check only operation, maybe..?)
Just playing with alternatives.
as well as
are both good options in my book.
bitter-ability-3219007/16/2022, 6:26 PM
, but let's not get derailed 😉
wide-midnight-7859807/16/2022, 6:44 PM
either, but 🤷" - that's super common nowadays (for better or worse). As is format/fmt, build, compile, typecheck, test, package, init, deploy, publish, export, version, inspect, etc...
Those verbs are not super ambiguous language to language or tool to tool, and any reasonable developer could approximately infer (within reason) what they should do.
Tools (in-house or public) that make me sound like I'm quoting Harry Potter definitely make my blood boil.
I think one of the worst examples was a backend pipeline that was something like "did you remember to deflux the capacitor before deployment" - thinking they were being clever.
hundreds-father-40407/16/2022, 6:47 PM
So I'm generally much more pro
. Even though it's imperfect, just like
is very imperfect
wide-midnight-7859807/16/2022, 6:50 PM
goal, and what the constraints there are, so coming up with loose rules here seems reasonable - with all the effort that has gone into this so far
hundreds-father-40407/16/2022, 6:52 PM
./pants help goals
check Run type checking or the lightest variant of compilation available for a language.
fmt Autoformat source code.
lint Run all linters and/or formatters in check mode.
tailor Auto-generate BUILD file targets for new source files.
update-build-files Format and fix safe deprecations in BUILD files.
bitter-ability-3219007/16/2022, 7:01 PM
happy-kitchen-8948207/17/2022, 1:18 AM
? I know it's a slight abuse of naming, but in practice maybe it's fine?
bitter-ability-3219007/17/2022, 1:21 AM
The fact that we haven't already probably says something as well?
happy-kitchen-8948207/17/2022, 1:48 AM
is a good name for semantic fixes (and apparently there is prior art in go and rust and maybe scala in calling it that).
in perpetuity? Not sure I was convinced that we need to deprecate it.
is changes you don't need to eyeball,
is for changes you probably should
bitter-ability-3219007/17/2022, 10:32 AM
flat-zoo-3195207/17/2022, 1:36 PM
that are too general as well and it seems people don't love those) and prior art disagrees a bit on what's included. (Rust vs Go)
style "update API" actions, it would be confusing to have a verb mismatch there, e.g. "to run
you need to run
or `./pants update-sources`" or whatever the naming would be for that.
Basically if we want to use
./pants fix --update-api
I think we need to be sure that it can sensibly incorporate all ideas of the native tooling that uses that that we're targeting. Right now I think Scala and Go are the only supported languages that have this command. So
should do at least what
does on Go targets and at least what Scala fix does on Scala targets.
? I don't have a great answer to that question, and it's kinda academic anyways since that doesn't really exist. But it highlights my concern about prior art having different ideas of what this word should mean
bitter-ability-3219007/17/2022, 1:53 PM
in this goal?
hundreds-father-40407/17/2022, 1:54 PM
to be included in
. You can use
if you want to ignore it
./pants fix --only=pyupgrade
staying separate. I originally was proposing merging them
flat-zoo-3195207/17/2022, 2:58 PM
fits in their workflow, and if that jives with what we've discussed around this topic
wide-midnight-7859807/17/2022, 5:02 PM
I think it is a reasonable assumption that if you're a user of said language, that piping
down to that language's native(ish) version of that command is fair game - and you, as the developer, would understand the consequences. It's more about the languages that don't have that concept where I'm a bit more suss.
./pants fix cpplib
- not sure what to expect.
./pants fix pythonlib
bitter-ability-3219007/17/2022, 6:30 PM
and tools like
wide-midnight-7859807/17/2022, 7:37 PM
In my mind,
might end up being any auto-correctable lint warning/error (like clang-tidy --fix, eslint --fix, etc). By virtue of adding the
add-in, you're essentially stating that anything pyupgrade finds is a lint error, and since we can fix it - we will
it. So, I view
as coupled goals (nothing wrong with that). Is there the chance that a
goal would make changes that wouldn't otherwise show up as
bitter-ability-3219007/17/2022, 7:42 PM
rule, 100% of things
would change would cause a
hundreds-father-40407/17/2022, 9:27 PM
can just run one command for all statically determined issues.Sort of,
also is necessary; womp womp weirdness
wide-midnight-7859807/18/2022, 12:09 AM
witty-crayon-2278607/19/2022, 3:56 AM
due to the growing convention of rust, go, scala, etc. the line between
being “syntactic vs semantic” changes is reasonably easy to explain.
remaining separate is important i think, although we need to continue to sharpen the line between them: to the extent that tools using transitive deps are in
) they should probably be in
instead… they’re closer to being compilers than the traditional expectations of a linter.