fix: refactor annotation retrieval - #207
Merged
Merged
Conversation
Collaborator
Author
|
@petercinibulk Please throw an eye on this, once you get a minute 🙏 It's a blocker for 1.3.9. |
petercinibulk
approved these changes
Sep 13, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The test suite started failing when dependency resolution selected
analyzer 14.4.0(see CI run 34732754518). TheEnviedGeneratorwas still invoked, butgenerateForAnnotatedElementthen re-scannedelement.metadata.annotationsand identified Envied annotations with:With Analyzer 14.4.0, that secondary lookup no longer matched the
@Enviedannotations. The resulting annotation list was empty, so generation produced only the standard header with an emptygenerated_from:value. This caused generated output, workspace asset tracking, and hidden-env-file tests to fail. The same code passed with Analyzer 14.3.0; the previous successful run (32518422640) resolved Analyzer 14.1.0.Change
Collect annotations through
source_gen's type checker instead:This matches annotations by their resolved type and package rather than depending on Analyzer's annotation element display name. It also preserves support for multiple
@Enviedannotations.This fixes the compatibility issue without narrowing the existing dependency constraint (
analyzer: ">=8.0.0 <15.0.0"). Nobuild_runner,build_test, or Melos changes are required.Verification
melos testpasses for both packages.melos run validatepasses.