-
Notifications
You must be signed in to change notification settings - Fork 19
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
Dependencies can be more than imports or used binaries #6
Comments
Hmm, that's interesting. I don't see this as an issue because if you are using package c's API through package b you are really just using package b's API. And it would be up to package b to not introduce breaking changes when consuming those API members that it exposes through package c. |
There are definitely multiple ways to view this. If we consider that It's also interesting to note that with small tweaks to the code the import to The following snippets are equivalent: b.someBMethod().someCMethod(); var c = b.someBMethod();
c.someCMethod(); C c = b.someBMethod();
c.someCMethod(); Only the last requires the import to |
From the README:
Based on this sentence I'm assuming that only
import
statements are found programatically. There is another way that a dependency can sneak in that you might want to consider, or at least warn in the readme so it can be treated the same way as executables.If a class is returned from an API that isn't defined in the package, you can silently be depending on a method signature defined in some other package that you might not import.
Here
package:b
could plausibly move to a new version ofpackage:c
without a breaking change version bump.With type inference this 'type leaking' can happen in sneaker ways:
The text was updated successfully, but these errors were encountered: