-
Notifications
You must be signed in to change notification settings - Fork 6
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
Move templating to the client side. #76
Move templating to the client side. #76
Conversation
9420577
to
2576863
Compare
2576863
to
ffb5cfe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previous comments still stand regarding ResolvedCode and moving the template expansion completely out to the JSON macro itself
@@ -9,7 +9,7 @@ import 'package:analyzer/src/summary2/macro_declarations.dart' as analyzer; | |||
import 'package:analyzer/src/summary2/macro_injected_impl.dart' as injected; | |||
import 'package:dart_model/dart_model.dart'; | |||
import 'package:macro_service/macro_service.dart'; | |||
import 'package:macros/macros.dart' hide Code; | |||
import 'package:macros/macros.dart' as injected; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I generally would prefer prefixes named after the package, so just macros
in this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmmm are you sure? This is intentionally the same as the macro_injected_impl.dart
and executor.dart
prefixes, so it's easy to pick out all the types destined for injection into the analyzer. Whereas "macros" would not say which of the two macros worlds it's from :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The word injected
I think in this case is also just super confusing to me? I think because the whole situation is so complicated, I don't really understand what is injected into what or how, and so this term is just confusing... at least for macros
I know its the package:macros stuff?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also did not realize we were using overlapping prefixes, that is just even more confusing haha. I would call the other one analyzer_macros
or something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From discussion: macros_api_v1
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, I had pending comments that I failed to publish, that's why you didn't get the review again. My bad.
I dropped them since we already discussed since I wrote those comments, what I'm publishing now is brand new fresh comments, PTAL ;)
@@ -9,7 +9,7 @@ import 'package:analyzer/src/summary2/macro_declarations.dart' as analyzer; | |||
import 'package:analyzer/src/summary2/macro_injected_impl.dart' as injected; | |||
import 'package:dart_model/dart_model.dart'; | |||
import 'package:macro_service/macro_service.dart'; | |||
import 'package:macros/macros.dart' hide Code; | |||
import 'package:macros/macros.dart' as injected; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmmm are you sure? This is intentionally the same as the macro_injected_impl.dart
and executor.dart
prefixes, so it's easy to pick out all the types destined for injection into the analyzer. Whereas "macros" would not say which of the two macros worlds it's from :)
Notes from our discussion:
|
42a0844
to
dcdd740
Compare
dcdd740
to
b6498e4
Compare
Pretty sure there's more to add to the
Augmentation
model representation for other TODOs, but this PR just adds the simplest things that allows the templating to move client side: a split into "resolved strings" and identifiers.