Skip to content

Include evaluation errors in UnresolvedAnnotationException#807

Merged
kevmoo merged 4 commits into
masterfrom
b489415807_crash_better_error
Mar 13, 2026
Merged

Include evaluation errors in UnresolvedAnnotationException#807
kevmoo merged 4 commits into
masterfrom
b489415807_crash_better_error

Conversation

@kevmoo

@kevmoo kevmoo commented Mar 11, 2026

Copy link
Copy Markdown
Member
  • Extracts constantEvaluationErrors from the analyzer's ElementAnnotation.
  • Updates UnresolvedAnnotationException to display underlying constant evaluation errors, making it easier to diagnose invalid constants in annotations (e.g., using a final variable instead of a const variable in an annotation).
  • Bumps version to 4.2.1.

@natebosch natebosch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not be landing arbitrary unrelated changes that AI agents happen to make unprompted in the repo...

Comment thread example/pubspec.yaml Outdated
Comment thread source_gen/pubspec.yaml Outdated
Comment thread source_gen/pubspec.yaml
Comment thread source_gen/pubspec.yaml
@kevmoo

kevmoo commented Mar 11, 2026

Copy link
Copy Markdown
Member Author

@natebosch - the dep bumps were just from tighten. Since they wouldn't solve either way.

@kevmoo

kevmoo commented Mar 11, 2026

Copy link
Copy Markdown
Member Author

We should not be landing arbitrary unrelated changes that AI agents happen to make unprompted in the repo...

these were done by ME! Using tighten to make sure we don't fall back to versions of packages that aren't resolvable.

Needed to use newer build features which crash in older SDKs
Also bump two other deps using `tighten`
@kevmoo

kevmoo commented Mar 12, 2026

Copy link
Copy Markdown
Member Author

Will land #808 first so the diff is more clear

@kevmoo
kevmoo force-pushed the b489415807_crash_better_error branch from f9b019d to c99975e Compare March 12, 2026 18:24
- Extracts `constantEvaluationErrors` from the analyzer's `ElementAnnotation`.
- Updates `UnresolvedAnnotationException` to display underlying constant evaluation errors, making it easier to diagnose invalid constants in annotations (e.g., using a `final` variable instead of a `const` variable in an annotation).
- Bumps version to 4.2.1.
- Tiny bump to dependencies
@kevmoo
kevmoo force-pushed the b489415807_crash_better_error branch from c99975e to 21797d2 Compare March 12, 2026 18:25
@kevmoo
kevmoo changed the base branch from master to require_dart_39 March 12, 2026 18:25
@kevmoo

kevmoo commented Mar 12, 2026

Copy link
Copy Markdown
Member Author

PTAL @natebosch

@kevmoo

kevmoo commented Mar 13, 2026

Copy link
Copy Markdown
Member Author

@natebosch – can you look at 808 first? Going to land that before this.

Base automatically changed from require_dart_39 to master March 13, 2026 02:57
@kevmoo
kevmoo merged commit 982f780 into master Mar 13, 2026
13 checks passed
@kevmoo
kevmoo deleted the b489415807_crash_better_error branch March 13, 2026 03:03
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

Successfully merging this pull request may close these issues.

2 participants