-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Possible bug in the null migration tool #47363
Comments
I am also seeing this same exception when running the migration tool. The good news is it's reproducible in a public repo https://github.com/Workiva/webdev_proxy. This happens with Dart versions of 2.12.4 up to 2.18.7. I suspect it may have to do with the version of analyzer? The project recently had dependencies updated to allow analyzer version >= 1. In webdev_proxy 0.1.7 analyzer resolved to 0.41.2 and in 0.1.8 and master it resolves to 1.7.2.
|
Update: it seems that adding |
As of 1c7fe71, the null safety migration tool has been removed from active development and retired. No further work on the tool is planned. If you still need help, or you believe this issue has been closed in error, please feel free to reopen. |
Dart SDK version (2.15.0-154.0.dev)
Exception details:
Never.substitute(Never | {T: int?(type argument 0 of supertype of PubCommand (command.dart:48:43))}) at offset 3428 in /usr/local/google/home/zarah/pub/lib/src/command/add.dart (usageException('Must specify a package to be added.'))
#0 DecoratedType._substitute (package:nnbd_migration/src/decorated_type.dart:468:5)
#1 DecoratedType._substituteFunctionAfterFormals (package:nnbd_migration/src/decorated_type.dart:496:25)
#2 DecoratedType._substitute (package:nnbd_migration/src/decorated_type.dart:447:14)
#3 DecoratedType.substitute (package:nnbd_migration/src/decorated_type.dart:328:12)
#4 EdgeBuilder.getOrComputeElementType (package:nnbd_migration/src/edge_builder.dart:365:32)
#5 EdgeBuilder.visitMethodInvocation (package:nnbd_migration/src/edge_builder.dart:1368:20)
#6 MethodInvocationImpl.accept (package:analyzer/src/dart/ast/ast.dart:7193:50)
#7 EdgeBuilder._dispatch (package:nnbd_migration/src/edge_builder.dart:2305:24)
#8 EdgeBuilder.visitExpressionStatement (package:nnbd_migration/src/edge_builder.dart:879:25)
#9 ExpressionStatementImpl.accept (package:analyzer/src/dart/ast/ast.dart:3623:50)
#10 EdgeBuilder._dispatch (package:nnbd_migration/src/edge_builder.dart:2305:24)
#11 EdgeBuilder.visitNode (package:nnbd_migration/src/edge_builder.dart:1501:9)
#12 GeneralizingAstVisitor.visitStatement (package:analyzer/dart/ast/visitor.dart:545:40)
#13 GeneralizingAstVisitor.visitBlock (package:analyzer/dart/ast/visitor.dart:165:32)
#14 BlockImpl.accept (package:analyzer/src/dart/ast/ast.dart:1046:50)
#15 EdgeBuilder._dispatch (package:nnbd_migration/src/edge_builder.dart:2305:24)
#16 EdgeBuilder.visitIfStatement. (package:nnbd_migration/src/edge_builder.dart:1120:25)
#17 ScopedSet.doScoped (package:nnbd_migration/src/utilities/scoped_set.dart:44:13)
#18 EdgeBuilder.visitIfStatement (package:nnbd_migration/src/edge_builder.dart:1119:28)
#19 IfStatementImpl.accept (package:analyzer/src/dart/ast/ast.dart:5751:50)
#20 EdgeBuilder._dispatch (package:nnbd_migration/src/edge_builder.dart:2305:24)
#21 EdgeBuilder.visitNode (package:nnbd_migration/src/edge_builder.dart:1501:9)
#22 GeneralizingAstVisitor.visitStatement (package:analyzer/dart/ast/visitor.dart:545:40)
#23 GeneralizingAstVisitor.visitBlock (package:analyzer/dart/ast/visitor.dart:165:32)
#24 BlockImpl.accept (package:analyzer/src/dart/ast/ast.dart:1046:50)
#25 EdgeBuilder._dispatch (package:nnbd_migration/src/edge_builder.dart:2305:24)
#26 EdgeBuilder.visitNode (package:nnbd_migration/src/edge_builder.dart:1501:9)
#27 GeneralizingAstVisitor.visitFunctionBody (package:analyzer/dart/ast/visitor.dart:330:46)
#28 GeneralizingAstVisitor.visitBlockFunctionBody (package:analyzer/dart/ast/visitor.dart:168:56)
#29 BlockFunctionBodyImpl.accept (package:analyzer/src/dart/ast/ast.dart:1001:50)
#30 EdgeBuilder._dispatch (package:nnbd_migration/src/edge_builder.dart:2305:24)
#31 EdgeBuilder._handleExecutableDeclaration (package:nnbd_migration/src/edge_builder.dart:2603:7)
#32 EdgeBuilder.visitMethodDeclaration (package:nnbd_migration/src/edge_builder.dart:1327:5)
#33 MethodDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:7046:50)
#34 EdgeBuilder._dispatch (package:nnbd_migration/src/edge_builder.dart:2305:24)
#35 EdgeBuilder._dispatchList (package:nnbd_migration/src/edge_builder.dart:2323:7)
#36 EdgeBuilder.visitClassOrMixinOrExtensionDeclaration (package:nnbd_migration/src/edge_builder.dart:674:7)
#37 EdgeBuilder.visitClassDeclaration (package:nnbd_migration/src/edge_builder.dart:641:5)
#38 ClassDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:1487:50)
#39 EdgeBuilder._dispatch (package:nnbd_migration/src/edge_builder.dart:2305:24)
#40 EdgeBuilder.visitNode (package:nnbd_migration/src/edge_builder.dart:1501:9)
#41 GeneralizingAstVisitor.visitCompilationUnit (package:analyzer/dart/ast/visitor.dart:202:52)
#42 CompletenessTracker.visitCompilationUnit. (package:nnbd_migration/src/utilities/completeness_tracker.dart:52:24)
#43 PermissiveModeVisitor.reportExceptionsIfPermissive (package:nnbd_migration/src/utilities/permissive_mode.dart:26:24)
#44 CompletenessTracker.visitCompilationUnit (package:nnbd_migration/src/utilities/completeness_tracker.dart:43:5)
#45 CompilationUnitImpl.accept (package:analyzer/src/dart/ast/ast.dart:2076:50)
#46 NullabilityMigrationImpl.processInput (package:nnbd_migration/src/nullability_migration_impl.dart:231:12)
#47 NonNullableFix.processUnit (package:nnbd_migration/src/front_end/non_nullable_fix.dart:164:16)
#48 _FixCodeProcessor.runLaterPhases. (package:nnbd_migration/migration_cli.dart:1092:20)
#49 _FixCodeProcessor.runLaterPhases. (package:nnbd_migration/migration_cli.dart:1090:28)
#50 _FixCodeProcessor.processResources (package:nnbd_migration/migration_cli.dart:1024:26)
#51 _FixCodeProcessor.runLaterPhases (package:nnbd_migration/migration_cli.dart:1090:5)
#52 MigrationCliRunner.run (package:nnbd_migration/migration_cli.dart:697:24)
#53 MigrateCommand.run (package:dartdev/src/commands/migrate.dart:37:7)
#54 CommandRunner.runCommand (package:args/command_runner.dart:209:13)
#55 DartdevRunner.runCommand (package:dartdev/dartdev.dart:223:18)
#56 runDartdev (package:dartdev/dartdev.dart:66:16)
#57 main (file:///b/s/w/ir/cache/builder/sdk/pkg/dartdev/bin/dartdev.dart:11:3)
The text was updated successfully, but these errors were encountered: