-
Notifications
You must be signed in to change notification settings - Fork 810
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
plugin/populate: avoid loops on non top-level packages #357
Conversation
💛 |
Beautiful :) Could you just regenerate the code, because the diff check is failing. |
Heh, turns out that one-line diff was actually pointing out that my new approach was (still) wrong. Type names can include the names of other types, so simply stripping off the last component isn't sufficient to determine the package either. Updated with a new approach which plumbs the package name from the file descriptor. I'm hopeful that's bulletproof. |
Is it possible to also include your example as a test?
…On Thu, 30 Nov 2017, 21:07 Nikhil Benesch, ***@***.***> wrote:
Heh, turns out that one-line diff was actually pointing out that my new
approach was (still) wrong. Type names can include the names of other
types, so simply stripping off the last component isn't sufficient to
determine the package either.
Updated with a new approach which plumbs the package name from the file
descriptor. I'm hopeful that's bulletproof.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#357 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABvsLWdfljzKNyOmOpMtqnvG6G3snQeoks5s7wrugaJpZM4QxBYH>
.
|
The previous scheme for detecting when a type belonged to a different package only considered the topmost component of the type name, but this is not a sufficiently general means of determining a type's package, as package names can themselves contain dots. Get the package name from the file descriptor instead, which is guaranteed to be correct. Also add a test to ensure this doesn't break in the future. Fix #207 (again).
Indeed, the ref I just pushed does exactly that :) |
Awesome I'll be at a computer soon.
…On Thu, 30 Nov 2017, 21:10 Nikhil Benesch, ***@***.***> wrote:
Indeed, the ref I just pushed does exactly that :)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#357 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABvsLY1d3VaaLz-cNQe6RLDiUcgjZw7vks5s7wvOgaJpZM4QxBYH>
.
|
Whew, it's green! Thanks for the crazy fast response time, @awalterschulze. |
Perfect :) |
Any time :) |
The previous scheme for detecting when a type belonged to a different
package only considered the topmost component of the type name, when it
in fact needs to consider all but the last component of the type name.
Fix #207 (again).