Skip to content
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

RangeError after executing flutter pub run import_sorter:main #37

Closed
KevinRohn opened this issue Nov 23, 2020 · 10 comments
Closed

RangeError after executing flutter pub run import_sorter:main #37

KevinRohn opened this issue Nov 23, 2020 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@KevinRohn
Copy link

Describe the bug
After executing the flutter pub run import_sorter:main command I get following error:

username@PC044-MacOS flutter_my_app % flutter pub run import_sorter:main

┏━━🗂  Sorting 94 dart files
┃  ┃
┃  ┣━━ ✅ Sorted 0 out of 7 imports in lib/drawer/drawer_navigation.dart
┃  ┣━━ ✅ Sorted 0 out of 1 imports in lib/drawer/naviagtion_router.dart
Unhandled exception:
RangeError (index): Invalid value: Not in inclusive range 0..1: 2
#0      List.[] (dart:core-patch/growable_array.dart:177:60)
#1      main (file:///Users/username/development/flutter/.pub-cache/hosted/pub.dartlang.org/import_sorter-4.4.0/bin/main.dart:97:149)
#2      _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:299:32)
#3      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
pub finished with exit code 255

To Reproduce
I installed the import_sorter package and did run flutter pub run import_sorter:main

Expected behavior
correct sorting, but it stopped after two files.

Screenshots
Bildschirmfoto 2020-11-23 um 17 25 56

Meta Information:

  • Dart Version: 2.10.4
  • import_sorter Version: 4.4.0
  • Is it a Flutter project? Yes
  • What version of Flutter are you using (if flutter project): 1.22.4
@KevinRohn KevinRohn added the bug Something isn't working label Nov 23, 2020
@KevinRohn KevinRohn changed the title RangeError after executing flutter pub run import_sorter:main RangeError after executing flutter pub run import_sorter:main Nov 23, 2020
@github-actions
Copy link

👋 Hello! Thanks for submitting a issue! @Matt-Gleich will try to respond as soon as possible.

@gleich
Copy link
Member

gleich commented Nov 23, 2020

Hello @KevinRohn! Sorry to hear you are having an issue with this. Would you mind sending me the file that you are having an error on so I can easily debug this? Thank you!

@gleich gleich self-assigned this Nov 23, 2020
@gleich
Copy link
Member

gleich commented Nov 23, 2020

Also, do you get this error if you use an older version of import_sorter?

@aseef17
Copy link

aseef17 commented Nov 23, 2020

Facing the same error with import_sorter 4.4.0

@aseef17
Copy link

aseef17 commented Nov 23, 2020

Also, do you get this error if you use an older version of import_sorter?

Works well with 4.2.2

@gleich
Copy link
Member

gleich commented Nov 23, 2020

@aseef17 could you send me the file you are getting an error for?

@gleich
Copy link
Member

gleich commented Nov 23, 2020

I was just able to reproduce this. Looking into a fix now

@gleich
Copy link
Member

gleich commented Nov 23, 2020

Just fixed. Releasing 4.4.1 now

@gleich
Copy link
Member

gleich commented Nov 23, 2020

This is now fixed in import_sorter v4.4.1!

@gleich gleich closed this as completed Nov 23, 2020
@KevinRohn
Copy link
Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants