Skip to content

When changing from "#source" to "#import" the error-message in the imported file does not go away. #3155

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

Closed
stevemessick opened this issue May 21, 2012 · 7 comments
Assignees
Milestone

Comments

@stevemessick
Copy link
Contributor

floitsch: When changing from "#source" to "#import" the error-message in the imported file does not go away.

Say I have file A.dart and B.dart. Both are libraries with a "#library" line on top.
If A.dart #sources B.dart I get the error message "A source which was included by another source via a #source directive cannot itself contain directives: B.dart"
The error points to the #library directive inside B.dart.
This, by itself, is already annoying, since it doesn't tell me which other file actually did the #source, but that's not the bug.

Now if I go to A.dart and change the #source to an #import, the error should go away, but currently that does not happen. I have to 'force reanalyze' to remove the error-line.

@danrubel
Copy link

Set owner to @scheglov.

@scheglov
Copy link
Contributor

Isn't this Analysis Server problem?

I've added tweak for error message.
https://chromiumcodereview.appspot.com/10448054


cc @danrubel.
Added Started label.

@danrubel
Copy link

If you find that it is, feel free to reassign.

@scheglov
Copy link
Contributor

Such dangling/stale errors are by default Analysis Server problem.
Just because "force Re-Analyse" solves this.

Test.dart
//#import('LibB.dart', prefix: 'aaa');
#source('LibB.dart');

LibB.dart
#library("B");

When I compile this, I see AnalysisMarkerManager.parsed(AnalysisEvent) called with Test.dart and LibB.dart and then AnalysisMarkerManager.resolved(AnalysisEvent) with both. Error added to the LibB.dart

However when I then change Test.dart to
#import('LibB.dart', prefix: 'aaa');
//#source('LibB.dart');

I see that only Test.dart is parsed and resolved.
Not sure exactly why, I can just guess that because LibB.dart is not changed, so it was not parsed.


Set owner to @danrubel.

@danrubel
Copy link

danrubel commented Jun 5, 2012

Added this to the M1 milestone.

@danrubel
Copy link

danrubel commented Aug 5, 2012

@danrubel
Copy link

danrubel commented Aug 5, 2012

Added Fixed label.

@stevemessick stevemessick added this to the M1 milestone Aug 5, 2012
copybara-service bot pushed a commit that referenced this issue Sep 13, 2022
…8 revisions)

https://dart.googlesource.com/dartdoc/+log/c64f800bd6a7..b0b0d6ace017

2022-09-13 [email protected] Use toList(growable:false) more (#3151)
2022-09-13 [email protected] Make Warnable.package non-nullable (#3155)
2022-09-13 [email protected] Update scorecard action to v2.0.3 (#3162)
2022-09-13 [email protected] Bump to 6.1.1 (#3161)
2022-09-12 [email protected] Allow analyzer 5.0.0 (#3160)
2022-09-12 [email protected] Make Extension.typeParameters late final (#3150)
2022-09-12 [email protected] Fix HTML of features (#3147)
2022-09-12 [email protected] Improve assert of function typedef (#3158)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-doc-dart-sdk
Please CC [email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Dart Documentation Generator: https://github.com/dart-lang/dartdoc/issues
To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Tbr: [email protected]
Change-Id: I96e0843c13d07f35e1bab57cacaddd747f54e00b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259081
Commit-Queue: DEPS Autoroller <[email protected]>
Reviewed-by: Devon Carew <[email protected]>
Commit-Queue: Devon Carew <[email protected]>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants