-
Notifications
You must be signed in to change notification settings - Fork 111
Start adding LibraryReader.prefixForType. #296
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
lib/src/library.dart
Outdated
| /// const b = const bar.Bar(); | ||
| /// ``` | ||
| /// | ||
| /// ... we'd assume that `b`'s element has a prefix of `bar`. |
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 still confused by this. There isn't anywhere we'd have the code bar.b - so why is it that b is considered to have a prefix?
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 this isn't an accurate example anymore. I'll update it.
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.
test/library_reader_test.dart
Outdated
| }); | ||
|
|
||
| test('should read the prefix of a type', () { | ||
| expect(testingPrefixForType(b, topLevelFieldTypes[0]), 'a_prefixed'); |
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.
Can we look for specific variables rather than rely on the ordering?
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.
Sure.
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.
* Start adding LibraryReader.prefixForType. * Update docs. * More stable testing.
* Start adding LibraryReader.prefixForType. * Update docs. * More stable testing.
Work towards #292.
I've made the feature package-private so we can iterate. It's possible we won't even be able to launch this as-is (if
computeNode()explodes), but at least we will have the test case(s) when we have a replacement API, so I think it's worth checking (most) of this in.