Skip to content

change autoToString to apply to the class instead of the method#3

Merged
jakemac53 merged 1 commit intomainfrom
apply-to-class
Apr 10, 2024
Merged

change autoToString to apply to the class instead of the method#3
jakemac53 merged 1 commit intomainfrom
apply-to-class

Conversation

@jakemac53
Copy link
Copy Markdown
Owner

cc @scheglov this causes the analyzer to fail when analyzing bin/auto_to_string.dart.

I wasn't able to get anything interesting out of the logs - and it doesn't crash the entire analyzer - but it does break analysis for this specific library.

@jakemac53
Copy link
Copy Markdown
Owner Author

Fwiw @scheglov I wanted to try migrating json_serializable to this style as well, to see if it makes it faster. It should, because we could share more introspection requests (related to fields) across toJson/fromJson, as well as eliminating duplicate diagnostics that we show sometimes right now.

@scheglov
Copy link
Copy Markdown

Yes, I was able to reproduce the issue, and will fix it.
Not all code in the analyzer is updated yet to work with augmentations.

@scheglov
Copy link
Copy Markdown

https://dart-review.googlesource.com/c/sdk/+/362184

copybara-service Bot pushed a commit to dart-lang/sdk that referenced this pull request Apr 10, 2024
jakemac53/macros_example#3

Change-Id: I65b5c515e78223c14371748f644905f57198b73e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/362184
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
@jakemac53
Copy link
Copy Markdown
Owner Author

Can confirm that fixed it, thanks!

@jakemac53 jakemac53 merged commit 889b6da into main Apr 10, 2024
@jakemac53 jakemac53 deleted the apply-to-class branch April 10, 2024 18:16
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