Closed bartekpacia closed 3 years ago
Another nice solution would be removing all logic related to removing generated_plugin_registrant.dart
and just advising users to add it to ignored_files
in pubspec.yaml
.
Hey @bartekpacia! Thank you so much for the PR! Sorry to hear that you were having an issue. Looks like you've added some pretty cool things here. I'll take a look after I finish school today :)
This is now out in import_sorter v4.6.0. Thanks for the PR!
Wow, finally! I've lost a few hours in the last few days tracking a very strange error with this package, which led to my GitHub Action (which was using
import_sorter
to check if imports are sorted) failing for seemingly no reason.What was wrong
generated_plugin_registrant.dart
file was not being ignored by import_sorter - the logic was flawed. We want to check ifdependencies
inpubspec.yaml
containflutter
, notflutter/
!Also, if
import_sorter
failed, it now prints which file caused that.Now it's fixed and works just fine. Please release
v4.5.2
ASAP, I want to be able to use it finally in my GH Actions :DTrivia
Why were my GitHub Actions failing? Because I've set up
import_sorter
to run automatically on save on my computers. It formatted all files, includinggenerated_plugin_registrant.dart
. But on GitHub Actions, aftergenerated_plugin_registrant.dart
was generated, nothing was sorting its imports, so this tool was failing.I hope I described it clearly and that nobody before had lost theirs time because of this bug:)