onepub-dev / cli_tools_for_dart

Small collection of cli tools for management dart projects
Other
2 stars 3 forks source link

drtimport relative; Unhandled exception #5

Open markfili opened 3 years ago

markfili commented 3 years ago

Hi, what is going on here when running drtimport relative?

drtimport version: 2.0.0
Usage: 
relative
e.g. changes all local imports to relative imports.
-h, --help           Print this usage information.
    --root=<path>    The path to the root of your project.
                     (defaults to ".")
    --debug          Turns on debug ouput
-v, --version        Outputs the version of drtimport and exits.
Processing project foot in /Users/user/flutter/projects/test_project
Unhandled exception:
NoSuchMethodError: The getter 'isNotEmpty' was called on null.
Receiver: null
Tried calling: isNotEmpty
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:54:5)
#1      PosixStyle.rootLength (package:path/src/style/posix.dart:42:14)
#2      Context.isAbsolute (package:path/src/context.dart:193:41)
#3      Context._isWithinOrEquals (package:path/src/context.dart:573:30)
#4      Context.isWithin (package:path/src/context.dart:555:7)
#5      isWithin (package:path/path.dart:366:55)
#6      MakeRelativeCommand.process (package:drtimport/make_relative_command.dart:92:12)
#7      MakeRelativeCommand.run (package:drtimport/make_relative_command.dart:77:11)
#8      CommandRunner.runCommand (package:args/command_runner.dart:197:27)
#9      CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:112:25)
#10     new Future.sync (dart:async/future.dart:218:31)
#11     CommandRunner.run (package:args/command_runner.dart:112:14)
#12     main (file:///Users/user/.pub-cache/hosted/pub.dartlang.org/drtimport-2.0.0/bin/main.dart:21:16)
#13     _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:281:32)
NeatFastro commented 3 years ago

Look like the package needs migration to null safety. I'm not sure though