-
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
AnalysisDriver.getSourceKind can return outdated data #40546
Labels
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
Comments
simolus3
changed the title
AnalysisDriver.getSourceKind can return oudated data
AnalysisDriver.getSourceKind can return outdated data
Feb 8, 2020
vsmenon
added
the
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
label
Feb 9, 2020
dart-bot
pushed a commit
that referenced
this issue
Feb 10, 2020
R=brianwilkerson@google.com Bug: #40546 Change-Id: I68b3e0610960bfbad05d6d132d534cea9cfe5925 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135100 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Nevermind I forgot I need to update the package version of the analyzer and not rebuild the sdk :D. I have confirmed it fixes the issue if I pin the analyzer dep. |
This change causes internal build failures when
|
dart-bot
pushed a commit
that referenced
this issue
Feb 11, 2020
…maries. R=brianwilkerson@google.com Bug: #40546 Change-Id: I06f99175c9aee127e71b99ff7f0e70066965d6f1 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135280 Commit-Queue: Konstantin Shcheglov <scheglov@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
In
AnalysisDriver
,getSourceKind
appears to return outdated data after callingchangeFile
. This is causing issues with the build system in the following scenario/a/input.dart
, which has the following content. At this point, neither/a/input.a.dart
or/a/input.b.dart
exist.input.a.dart
with the contentpart of 'input.dart';
input.a.dart
.build_resolvers
will callchangeFile('/a/input.a.dart')
on the drivergetSourceKind('/a/input.a.dart')
returnsSourceKind.LIBRARY
.I'd expect that the last step should return
SourceKind.PART
, since the file has since been created and contains apart of
statement. Adding afile.refresh()
before this line fixes this problem, but I'm not sure if it's correct to make that change. MaybeAnalysisDriver
doesn't properly invalidate theFileSystemState
after callingchangeFile
?This is causing https://github.com/dart-lang/source_gen/issues/447. @jakemac53 wrote a smaller test that can be used to reproduce this behavior: dart-lang/build#2620. I'm using analyzer version
0.39.4
.The text was updated successfully, but these errors were encountered: