Skip to content

[Nullsafety] Works when importing from local path but not git when importing to aqueduct #11

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

Open
j4qfrost opened this issue Mar 12, 2021 · 1 comment

Comments

@j4qfrost
Copy link

Since my nullsafety changes haven't been published I have been including the dependency into aqueduct via git. This caused an error in test/command/document_server_test.dart

Bad state: Unable to find the context to /Users/blah/.pub-cache/git/dart-isolate-executor-8b38833119195c4e854dd6e423c1ea2e47c0525f/lib/src/executable.dart
  **** Stacktrace
  * #0      AnalysisContextCollectionImpl.contextFor (package:analyzer/src/dart/analysis/analysis_context_collection.dart:85:5)
  * #1      SourceGenerator._getClass (package:isolate_executor/src/source_generator.dart:64:47)
  * <asynchronous suspension>
  * #2      StackZoneSpecification._registerUnaryCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart)
  * <asynchronous suspension>
  ****

If I use an override to import the dependency like ../../dart-isolate-executor, the error goes away.

Needless to say I haven't set up a proper import via the package system, because my nullsafety changes haven't been merged, so I don't know if that will work or not.

@j4qfrost
Copy link
Author

The culprit is that something is setting .pub-cache to be excluded from the context in the analyzer package. I haven't figured out a fix.

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

1 participant