Closed RajithaAppit closed 4 years ago
This bug has occurred at least two other times (see also #34576 and #34898). Previously we closed it based on the assumption that the user was doing something weird (like upgrading Flutter) that caused the Dart SDK to disappear. But I think we need to gather more information to figure out definitively what's happening. We should add some instrumentation logic tracking information like:
And we should add code to TypeProviderForLink._buildInterfaceType
to dump out this info in the event that the failure occurs again.
facing the same exception when building fuchsia os
`/usr/bin/env ../../build/dart/run_analysis.py --source-file /root/source/fuchsia/out/x64/dartlang/gen/topaz/app/spinning_cube/spinning_cube_dart_library.sources --dot-packages /root/source/fuchsia/out/x64/dartlang/gen/topaz/app/spinning_cube/spinning_cube_dart_library.packages --dartanalyzer /root/source/fuchsia/topaz/tools/prebuilt-dart-sdk/linux-x64/bin/dartanalyzer --dart-sdk /root/source/fuchsia/topaz/tools/prebuilt-dart-sdk/linux-x64 --options /root/source/fuchsia/topaz/app/spinning_cube/analysis_options.yaml --stamp /root/source/fuchsia/out/x64/dartlang/gen/topaz/app/spinning_cube/spinning_cube_dart_library_analysis.analyzed --depname dartlang/gen/topaz/app/spinning_cube/spinning_cube_dart_library_analysis.analyzed --depfile /root/source/fuchsia/out/x64/dartlang/gen/topaz/app/spinning_cube/spinning_cube_dart_library_analysis.analysis.d
Analyzing /root/source/fuchsia/topaz/app/spinning_cube/lib/spinning_cube_gem.dart, /root/source/fuchsia/topaz/app/spinning_cube/lib/main.dart... Unhandled exception:
type 'DynamicTypeImpl' is not a subtype of type 'InterfaceType'
0 TypeProviderForLink._buildInterfaceType (package:analyzer/src/summary/link.dart:5428:5)
1 TypeProviderForLink.objectType (package:analyzer/src/summary/link.dart:5397:23)
2 ClassElementForLink_Class._computeInterfaceType (package:analyzer/src/summary/link.dart:928:67)
3 ClassElementForLink_Class.supertype (package:analyzer/src/summary/link.dart:826:27)
4 InstanceMemberInferrer._inferClass (package:analyzer/src/task/strong_mode.dart:294:33)
5 InstanceMemberInferrer._inferClasses (package:analyzer/src/task/strong_mode.dart:326:9)
6 InstanceMemberInferrer.inferCompilationUnit (package:analyzer/src/task/strong_mode.dart:55:5)
7 CompilationUnitElementInBuildUnit.link (package:analyzer/src/summary/link.dart:1622:7)
8 LibraryElementInBuildUnit.link (package:analyzer/src/summary/link.dart:3780:12)
9 LibraryCycleNode.link (package:analyzer/src/summary/link.dart:3486:15)
10 LibraryCycleDependencyWalker.evaluate (package:analyzer/src/summary/link.dart:3426:7)
11 DependencyWalker.walk.strongConnect (package:analyzer/src/summary/link.dart:2199:13)
12 DependencyWalker.walk.strongConnect (package:analyzer/src/summary/link.dart:2165:24)
13 DependencyWalker.walk.strongConnect (package:analyzer/src/summary/link.dart:2165:24)
14 DependencyWalker.walk.strongConnect (package:analyzer/src/summary/link.dart:2165:24)
15 DependencyWalker.walk.strongConnect (package:analyzer/src/summary/link.dart:2165:24)
16 DependencyWalker.walk (package:analyzer/src/summary/link.dart:2218:18)
17 LibraryCycleForLink.ensureLinked (package:analyzer/src/summary/link.dart:3459:42)
18 Linker.link (package:analyzer/src/summary/link.dart:3982:35)
19 _relink (package:analyzer/src/summary/link.dart:302:57)
20 link (package:analyzer/src/summary/link.dart:120:3)
21 new LibraryContext.forSingleLibrary.
Note that this was reported as recently as Dart 2.4.0.
Any updates on this? Also, for reproducibility, here's a Travis build that causes the same error: https://travis-ci.com/schul-cloud/schulcloud-flutter/builds/131689054
Can you upgrade to latest analyzer, i.e. 0.38.5
currently? The exception in this issue is from the previous implementation of analyzer summaries, which was recently replaced with a new one.
If it still fails, it would be very useful if there were a way for me to reproduce the issue locally. Then I could debug it and fix any analyzer problem.
Did that and it works, thank you 😄
A quick side note: Because we use the stable
channel, flutter_test: any
requires analyzer: <0.37.0
.
We didn't write any tests yet, so I was able to ditch the dependency but it's a bit ironic that our CI works now because of removing the flutter_test
dependency.
Hm... It does not look that flutter_test
depends on analyzer
. I tried also the stable
channel, it also does not use analyzer
.
We removed summary1, this issue is stale.
Analyzer Feedback from IntelliJ
Version information
IDEA AI-173.4670197
2.1.0-dev.9.4
AI-173.4670197, JRE 1.8.0_152-release-1024-b02x64 JetBrains s.r.o, OS Windows 10(amd64) v10.0 , screens 1366x768
Exception
Please append the contents of: file://C:\Users\welcome\AppData\Local\Temp\report1.txt