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

Fix an issue where multiple AnalyzerResolvers instances lead to incorrect behavior #3580

Merged
merged 2 commits into from
Sep 20, 2023

Conversation

jakemac53
Copy link
Contributor

@jakemac53 jakemac53 commented Sep 20, 2023

Deprecate the unnamed AnalyzerResolvers constructor, replace it with a static instance getter and AnalyzerResolvers.custom factory constructor.

These new APIs guarantee a 1:1 relationship between the BuildAssetUriResolver and an analysis engine, which is necessary to ensure changeFile is always called on each analysis engine when needed.

Note that the deprecated constructor does not uphold this invariant, it remains backwards compatible with its old implementation, and uses the same BuildAssetUriResolver as the shared resolver.

…a static instance getter and custom factory constructor
build_resolvers/CHANGELOG.md Outdated Show resolved Hide resolved
build_resolvers/lib/src/resolver.dart Show resolved Hide resolved
build_resolvers/pubspec.yaml Outdated Show resolved Hide resolved
build_runner_core/pubspec.yaml Outdated Show resolved Hide resolved
build_test/pubspec.yaml Outdated Show resolved Hide resolved
@auto-submit auto-submit bot merged commit 292a623 into master Sep 20, 2023
72 checks passed
@auto-submit auto-submit bot deleted the unique-uri-resolver branch September 20, 2023 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants