-
Notifications
You must be signed in to change notification settings - Fork 110
Add findType, and fix a bug in TypeChecker. #165
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
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 – waiting on @jakemac53
| /// because it relies on knowing the _absolute_ path (i.e. after resolved | ||
| /// `export` directives). You should ideally only use `fromUrl` when you know | ||
| /// the full path (likely you own/control the package) or it is in a stable | ||
| /// package like in the `dart:` SDK. |
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.
Maybe "stable package or the Dart SDK via dart: URLs.
| void main() { | ||
| LibraryElement library; | ||
|
|
||
| setUpAll(() async { |
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.
Just curious, I notice you use this setUpAll a lot but I don't understand what the value is over just regular setup in the top of main?
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.
setUpAll is only invoked once, not once per test.
The body of this function (doing analysis) is expensive, and doesn't change between tests, so this makes the test take ~20s instead of minutes.
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.
main is only invoked once as well :).
I talked with @kevmoo and I guess you get better errors if the setup fails at least so there is that advantage. Also if all tests end up skipped then it wouldn't execute this code.
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.
Yeah, also it makes the use of async a little cleaner.
Closes #160.
Also added test cases, which in turn found a bug. Whad'ya know @jakemac53 🐑
Closes #161.