-
-
Notifications
You must be signed in to change notification settings - Fork 166
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
Do not announce platform repos as module dependencies #763
base: main
Are you sure you want to change the base?
Conversation
There is not much we could do about this; we have to report what can imported by the module, and that includes platform specific repos as well. If bazel had a way to let us tell it what can be imported, then we could use that instead. |
Bazel already knows what can be imported: all repos generated by the extension. This is also how it calculates the indirect dependencies (all generated ones minus the direct ones). Is there any use case of using the platform specific repos over the general one (which use the platform specific ones as indirect dependency)? |
right, sorry.
Yes, if you want to build an image for a specific architecture without using transitions, eg you want to build a python image, and don't want to use transitions to get correct base image. So instead of |
This only works when using pure Python without any FFI pip dependencies, right? Maybe it might be better not to report anything? I think the currently state is quite bad. In one repo the platform specific stuff is added which we don't need and which confuses people. In the other repo we want to use the same (version of) a base image from another repo. There it is reported as indirect dependency and gets removed and breaks our build. So if there is no good way for the extension to determine which imports should be used, maybe leave it to be always manually specified by the user? |
Yes, but python is just an example, nodejs, java all can work on any platform similar to python, so we need to report these. I don't understand exactly how this is creating a problem for you. Right here we report deps if the extension was called from from the root module, so you shouldn't see any warnings from "other" repos, also we always add these to direct dependencies. Line 47 in a911e9e
As for the confusion part, as i said there is no way for the extension to know what you import and don't, there we can't conditionally report platform specific ones, what we need is bazel supporting auto removal of See when this was introduced and discussion around it #611 |
Fixes #727