-
Notifications
You must be signed in to change notification settings - Fork 5
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
Evaluate changes to generators for macros / augmentation libraries #14
Comments
Simplest things I could think of with mockito, mocking a macro-added field and a macro-added type, both seem to work without changes dart-lang/mockito@master...davidmorgan:mockito:built-with-macros although I did hit an issue with "asset" paths that I'll report over in the "build" repo, and an issue with augmenting a class that generics that I guess I'll add a language test for. |
Perhaps this is not a question about language specification documents, but rather about the behavior of code generators? In that case we might consider |
Yes, it's not spec related. It's about the effect of macro implementation details on existing code generators ... actually that specifically means the analyzer API, I'll tag it with that. Thanks. |
A related issue to this one is build performance of generators + macros. There are cases where external use of generators is pushing the limits of performance, one is mentioned here dart-lang/language#314 (comment) and another is here google/built_value.dart#1288 It would be useful to know what happens to these with macros thrown into the mix: is there a viable path to macros that goes via some mix of macros and generators, or is that going to be too slow, and they'll have to switch to macros in one shot? |
I noticed in the analyzer's element.dart that there are deprecations pointing to "augmented" getters that give the merged information with augmentations, e.g.:
So this is another type of updates generators will need if they should interact with augmentations as if they are pre-augmentation code. |
Macros will introduce augmentation libraries; what changes are needed to widely-used generators so that they continue to work?
The analyzer exposes new API that will need to be used in some cases, see e.g. mentions of "augmentation" in package:analyzer/dart/element/element.dart.
The text was updated successfully, but these errors were encountered: