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

Exception thrown by the migration tool #49964

Closed
mjimaz opened this issue Sep 14, 2022 · 2 comments
Closed

Exception thrown by the migration tool #49964

mjimaz opened this issue Sep 14, 2022 · 2 comments
Labels
area-migration (deprecated) Deprecated: this label is no longer actively used (was: issues with the `dart migrate` tool).

Comments

@mjimaz
Copy link

mjimaz commented Sep 14, 2022

Please include the SDK version (2.19.473941130-edge+google3-v2) in your bug report.

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

Exception details:

type 'MixinElementImpl' is not a subtype of type 'ClassElement' in type cast at offset 591 in /google/src/cloud/mjimaz/dart_migration/google3/blaze-bin/ads/awapps2/video/simple/construction/language_selector/testing/lib/language_selector_po.g.dart (PageLoaderElement $root)

#0 EdgeBuilder._handleFieldOverriddenDeclaration (package:nnbd_migration/src/edge_builder.dart:2854:63)
#1 EdgeBuilder.visitVariableDeclarationList (package:nnbd_migration/src/edge_builder.dart:2030:11)
#2 VariableDeclarationListImpl.accept (package:analyzer/src/dart/ast/ast.dart:13160:15)
#3 EdgeBuilder._dispatch (package:nnbd_migration/src/edge_builder.dart:2363:24)
#4 EdgeBuilder.visitNode (package:nnbd_migration/src/edge_builder.dart:1555:9)
#5 GeneralizingAstVisitor.visitAnnotatedNode (package:analyzer/dart/ast/visitor.dart:135:48)
#6 GeneralizingAstVisitor.visitDeclaration (package:analyzer/dart/ast/visitor.dart:251:44)
#7 GeneralizingAstVisitor.visitClassMember (package:analyzer/dart/ast/visitor.dart:197:44)
#8 GeneralizingAstVisitor.visitFieldDeclaration (package:analyzer/dart/ast/visitor.dart:318:54)
#9 FieldDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:4697:50)
#10 EdgeBuilder._dispatch (package:nnbd_migration/src/edge_builder.dart:2363:24)
#11 EdgeBuilder._dispatchList (package:nnbd_migration/src/edge_builder.dart:2381:7)
#12 EdgeBuilder.visitClassOrMixinOrExtensionDeclaration (package:nnbd_migration/src/edge_builder.dart:705:7)
#13 EdgeBuilder.visitClassDeclaration (package:nnbd_migration/src/edge_builder.dart:663:5)
#14 ClassDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:1888:50)
#15 EdgeBuilder._dispatch (package:nnbd_migration/src/edge_builder.dart:2363:24)
#16 EdgeBuilder.visitNode (package:nnbd_migration/src/edge_builder.dart:1555:9)
#17 GeneralizingAstVisitor.visitCompilationUnit (package:analyzer/dart/ast/visitor.dart:213:52)
#18 CompletenessTracker.visitCompilationUnit. (package:nnbd_migration/src/utilities/completeness_tracker.dart:52:24)
#19 PermissiveModeVisitor.reportExceptionsIfPermissive (package:nnbd_migration/src/utilities/permissive_mode.dart:26:24)
#20 CompletenessTracker.visitCompilationUnit (package:nnbd_migration/src/utilities/completeness_tracker.dart:43:5)
#21 CompilationUnitImpl.accept (package:analyzer/src/dart/ast/ast.dart:2396:50)
#22 NullabilityMigrationImpl.processInput (package:nnbd_migration/src/nullability_migration_impl.dart:223:12)
#23 NonNullableFix.processUnit (package:nnbd_migration/src/front_end/non_nullable_fix.dart:162:16)
#24 _FixCodeProcessor.runLaterPhases. (package:nnbd_migration/migration_cli.dart:1088:19)
#25 _FixCodeProcessor.processResources (package:nnbd_migration/migration_cli.dart:1020:26)

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

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

#28 startMigrationTool (package:dart.null_safety.migration/src/migration_runner.dart:416:5)

#29 main (package:dart.null_safety.migration/migration.dart:70:3)

#30 main (google3:///dart/null_safety/migration/bin/migration.dart:7:5)

Unhandled error: Instance of 'MigrationExit'
#0 MigrationCliRunner.onException (package:nnbd_migration/migration_cli.dart:583:9)
#1 NullabilityMigrationAdapter.reportException (package:nnbd_migration/src/front_end/non_nullable_fix.dart:549:21)
#2 PermissiveModeVisitor.reportExceptionsIfPermissive (package:nnbd_migration/src/utilities/permissive_mode.dart:28:19)
#3 CompletenessTracker.visitCompilationUnit (package:nnbd_migration/src/utilities/completeness_tracker.dart:43:5)
#4 CompilationUnitImpl.accept (package:analyzer/src/dart/ast/ast.dart:2396:50)
#5 NullabilityMigrationImpl.processInput (package:nnbd_migration/src/nullability_migration_impl.dart:223:12)
#6 NonNullableFix.processUnit (package:nnbd_migration/src/front_end/non_nullable_fix.dart:162:16)
#7 _FixCodeProcessor.runLaterPhases. (package:nnbd_migration/migration_cli.dart:1088:19)
#8 _FixCodeProcessor.processResources (package:nnbd_migration/migration_cli.dart:1020:26)

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

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

#11 startMigrationTool (package:dart.null_safety.migration/src/migration_runner.dart:416:5)

#12 main (package:dart.null_safety.migration/migration.dart:70:3)

#13 main (google3:///dart/null_safety/migration/bin/migration.dart:7:5)

@lrhn lrhn added the area-migration (deprecated) Deprecated: this label is no longer actively used (was: issues with the `dart migrate` tool). label Sep 19, 2022
@yanok
Copy link
Contributor

yanok commented Jan 20, 2023

@mjimaz I believe I've fixed this one, could you please verify?

@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

4 participants