-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Commit(s) to merge
https://dart-review.googlesource.com/c/sdk/+/401865
Target
Stable
Prepared changelist for beta/stable
https://dart-review.googlesource.com/c/sdk/+/403380
Issue Description
All platforms are affected.
The dart fix command applies insertions for all files in the library after #55520. This means that in a library with two files if we have errors on both and one of them has an insertion fix (say adding const ), that insertion is added twice.
The desired behaviour is to only do so for the current file since it runs for every file anyway. The initial issue was about detecting the fixes needed for part files but it didn't consider only fixing for a single file at a time, as it was doing previously.
What is the fix
The fix removes the loop for all units in the library and only runs for the unit with the current path.
Why cherry-pick
It creates errors in code fixes.
Risk
The risk of merging is low.
Issue link(s)
Extra Info
CC @pq