-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discussion about automated fixes #35550
Comments
I look at dartfmt and dartfix as being mostly complementary tools with also probably some overlap. As long as we don't waste a ton of time re-implementing the same fixes twice, I don't think the overlap is hugely problematic. I care more that users get shipped the fix at all than I care which tools ships it. I also think there are many non-overlapping cases for the tools:
Pragmatically, people are using and like the fixes dartfmt supports. It's a well-known tool that users trust and know how to run. I don't think it will make users happy to remove these features now in the name of abstract ideals of orthogonality, so we're stuck with them. |
I understand your arguments, but I still think it could be confusing to new users who have no opinion where this feature should live. Having a single feature split between two tools just seems wrong to me. Perhaps a better time to tackle this would be if we move to a single command with sub-commands, such as |
Will dartfix support fixes that can be applied to code containing static errors? If so, and the performance is good enough, I'd be fine with removing the fixes from dartfmt and putting them only in dartfix if it seems like our users are OK with it. |
Yes. At least one of the fixes it already supports depends on looking for a semantic error in order to figure out which code to fix. |
It'll be easier for me to explain if there's only one tool that makes these kinds of fixes. |
@munificent @danrubel
I think it's great that we added some updating support to
dartfmt
to help our users. However, we have now started working ondartfix
as a tool for automating code changes. I think it's worth having a discussion about what the best path forward is from our users perspective.Should we have a single tool that automates code changes? If so, should that be
dartfmt
ordartfix
, or should we have two tools that apply fixes, withdartfmt
performing syntactic fixes whiledartfix
performs semantic fixes?Personally, I think all of the fixes should be implemented in one tool, but I'm interested to know other people's thoughts.
(This might impact dart-lang/dart_style#753 and #57860.)
The text was updated successfully, but these errors were encountered: