Open flutterrausch opened 5 months ago
interesting issue. I've tried to recreate it on my side but wasn't able to. Could you share the exact scenario where you're seeing this behavior?
Hope this helps
It happens with sortOnSave
feature enabled, everytime you refactor a file (renaming, moving to a different folder...)
I can show you an example of the unexpected changes automatically made in one of my files:
It looks to be adding new "random"(it may follow some logic but I have no clue) imports, replacing the top lines of the file.
1st: love the ext, love the sort on save feature.
But I had to switch it off - too annoying too often. If I e.g. rename a function, I get a block of imports (most probably the last sorted ones) on top of current file - often leads to a lot of confusing project errors. I can Cmd-Z it away, but it totally breaks my flow.
Here is what I think happens: The refactor does an auto-save itself. Somehow import-sorter is hooked in and applies cached imports. It may only apply, if multiple files get changed thru the refactoring.
Please fix :)