-
Notifications
You must be signed in to change notification settings - Fork 108
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
Generate for directive #738
base: analyzer-element2
Are you sure you want to change the base?
Generate for directive #738
Conversation
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.
LGTM but I don't have too much context for this particular API so @kevmoo might want to look?
@scheglov – needs to do some tweaks here, it appears. |
dependency_overrides: | ||
analyzer: ^7.1.0 | ||
analyzer: | ||
path: /Users/scheglov/Source/Dart/sdk.git/sdk/pkg/analyzer | ||
build: | ||
git: | ||
url: https://github.com/dart-lang/build.git |
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.
Should just delete this section, right?
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.
Oh, definitely need to use an actual published analyzer.
I need to know if the general approach looks good to you.
If it is, I will publish the analyzer, and update the dependency.
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.
OK, I don't see any objections, so I will move forward with publishing the required analyzer version.
https://dart-review.googlesource.com/c/sdk/+/403264
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.
Uh...I haven't had time to reason about this change yet, honestly.
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.
What is ETA for reviewing this?
/// | ||
/// Implementations should return `null` when no content is generated. Empty | ||
/// or whitespace-only [String] instances are also ignored. | ||
dynamic generateForAnnotatedDirective( |
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.
What's the deal w/ this @scheglov ?
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'm sorry, i don't understand the question.
This method is invoked at the line 62
.
We cannot use the same method for elements and directive.
Continue #735
Note that it restores
applies to annotated directives
test, as discussed in the previous PR.This functionality is indeed used, by
package:checks
generator.The first version uses
analyzer
dependency override, because I want want you to look at the code before I publishanalyzer
.