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

dart migrate bug #50836

Closed
MuteMuty opened this issue Dec 23, 2022 · 1 comment
Closed

dart migrate bug #50836

MuteMuty opened this issue Dec 23, 2022 · 1 comment
Labels
area-migration (deprecated) Deprecated: this label is no longer actively used (was: issues with the `dart migrate` tool).

Comments

@MuteMuty
Copy link

When I wanted to migrate to null-safety an error occurred and it said to fill the report here, so this is what I am doing. I than proceeded to use the command dart migrate --ignore-exceptions to bypass this error.

x@1014-ubuntu-x:~/flutter/x$ dart migrate
`Migrating /home/x/flutter/x
See https://dart.dev/go/null-safety-migration for a migration guide.

Analyzing project...
[-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------/]No analysis issues found.

Generating migration suggestions...
[------------------------------------------------------------------------------------------------------ ]Aborting migration due to an exception. This most likely is due to a
bug in the migration tool. Please consider filing a bug report at:

https://github.com/dart-lang/sdk/issues/new
Please include the SDK version (2.18.4) in your bug report.

To attempt to perform migration anyway, you may re-run with
--ignore-exceptions.

Exception details:

Null check operator used on a null value at offset 1492 in /home/x/flutter/x/lib/src/blocs/language_bloc/language_bloc.dart (SharedPreferencesService?.instance)

#0 EdgeBuilder._handlePropertyAccessGeneralized (package:nnbd_migration/src/edge_builder.dart:3186:46)
#1 EdgeBuilder._handlePropertyAccess (package:nnbd_migration/src/edge_builder.dart:3124:12)
#2 EdgeBuilder.visitPropertyAccess (package:nnbd_migration/src/edge_builder.dart:1649:12)
#3 PropertyAccessImpl.accept (package:analyzer/src/dart/ast/ast.dart:9230:50)
#4 EdgeBuilder._dispatch (package:nnbd_migration/src/edge_builder.dart:2341:24)
#5 EdgeBuilder.visitAwaitExpression (package:nnbd_migration/src/edge_builder.dart:503:26)
#6 AwaitExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:981:50)
#7 EdgeBuilder._dispatch (package:nnbd_migration/src/edge_builder.dart:2341:24)
#8 EdgeBuilder._handleAssignment (package:nnbd_migration/src/edge_builder.dart:2470:20)
#9 EdgeBuilder.visitVariableDeclarationList (package:nnbd_migration/src/edge_builder.dart:2040:11)
#10 VariableDeclarationListImpl.accept (package:analyzer/src/dart/ast/ast.dart:11673:15)
#11 EdgeBuilder._dispatch (package:nnbd_migration/src/edge_builder.dart:2341:24)
#12 EdgeBuilder.visitNode (package:nnbd_migration/src/edge_builder.dart:1537:9)
#13 GeneralizingAstVisitor.visitStatement (package:analyzer/dart/ast/visitor.dart:560:40)
#14 GeneralizingAstVisitor.visitVariableDeclarationStatement (package:analyzer/dart/ast/visitor.dart:636:7)
#15 VariableDeclarationStatementImpl.accept (package:analyzer/src/dart/ast/ast.dart:11722:15)
#16 EdgeBuilder._dispatch (package:nnbd_migration/src/edge_builder.dart:2341:24)
#17 EdgeBuilder.visitNode (package:nnbd_migration/src/edge_builder.dart:1537:9)
#18 GeneralizingAstVisitor.visitStatement (package:analyzer/dart/ast/visitor.dart:560:40)
#19 GeneralizingAstVisitor.visitBlock (package:analyzer/dart/ast/visitor.dart:167:32)
#20 BlockImpl.accept (package:analyzer/src/dart/ast/ast.dart:1183:50)
#21 EdgeBuilder._dispatch (package:nnbd_migration/src/edge_builder.dart:2341:24)
#22 EdgeBuilder.visitNode (package:nnbd_migration/src/edge_builder.dart:1537:9)
#23 GeneralizingAstVisitor.visitFunctionBody (package:analyzer/dart/ast/visitor.dart:338:46)
#24 GeneralizingAstVisitor.visitBlockFunctionBody (package:analyzer/dart/ast/visitor.dart:170:56)
#25 BlockFunctionBodyImpl.accept (package:analyzer/src/dart/ast/ast.dart:1134:50)
#26 EdgeBuilder._dispatch (package:nnbd_migration/src/edge_builder.dart:2341:24)
#27 EdgeBuilder.visitFunctionExpression. (package:nnbd_migration/src/edge_builder.dart:1035:25)
#28 ScopedSet.doScoped (package:nnbd_migration/src/utilities/scoped_set.dart:48:13)
#29 EdgeBuilder.visitFunctionExpression (package:nnbd_migration/src/edge_builder.dart:1033:28)
#30 FunctionExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:5440:50)
#31 EdgeBuilder._dispatch (package:nnbd_migration/src/edge_builder.dart:2341:24)
#32 EdgeBuilder.visitFunctionDeclaration (package:nnbd_migration/src/edge_builder.dart:982:9)
#33 FunctionDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:5312:50)
#34 EdgeBuilder._dispatch (package:nnbd_migration/src/edge_builder.dart:2341:24)
#35 EdgeBuilder.visitNode (package:nnbd_migration/src/edge_builder.dart:1537:9)
#36 GeneralizingAstVisitor.visitCompilationUnit (package:analyzer/dart/ast/visitor.dart:204:52)
#37 CompletenessTracker.visitCompilationUnit. (package:nnbd_migration/src/utilities/completeness_tracker.dart:52:24)
#38 PermissiveModeVisitor.reportExceptionsIfPermissive (package:nnbd_migration/src/utilities/permissive_mode.dart:26:24)
#39 CompletenessTracker.visitCompilationUnit (package:nnbd_migration/src/utilities/completeness_tracker.dart:43:5)
#40 CompilationUnitImpl.accept (package:analyzer/src/dart/ast/ast.dart:2310:50)
#41 NullabilityMigrationImpl.processInput (package:nnbd_migration/src/nullability_migration_impl.dart:223:12)
#42 NonNullableFix.processUnit (package:nnbd_migration/src/front_end/non_nullable_fix.dart:162:16)
#43 _FixCodeProcessor.runLaterPhases. (package:nnbd_migration/migration_cli.dart:1088:20)
#44 _FixCodeProcessor.processResources (package:nnbd_migration/migration_cli.dart:1020:26)

#45 _FixCodeProcessor.runLaterPhases (package:nnbd_migration/migration_cli.dart:1086:5)

#46 MigrationCliRunner.run (package:nnbd_migration/migration_cli.dart:695:24)

#47 MigrateCommand.run (package:dartdev/src/commands/migrate.dart:37:7)

#48 CommandRunner.runCommand (package:args/command_runner.dart:209:13)

#49 DartdevRunner.runCommand (package:dartdev/dartdev.dart:231:18)

#50 runDartdev (package:dartdev/dartdev.dart:66:16)

#51 main (file:///b/s/w/ir/x/w/sdk/pkg/dartdev/bin/dartdev.dart:11:3)
`

@lrhn lrhn added the area-migration (deprecated) Deprecated: this label is no longer actively used (was: issues with the `dart migrate` tool). label Dec 24, 2022
@stereotype441
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-migration (deprecated) Deprecated: this label is no longer actively used (was: issues with the `dart migrate` tool).
Projects
None yet
Development

No branches or pull requests

3 participants