-
Notifications
You must be signed in to change notification settings - Fork 542
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
feat: add ability to override hub name #1829
base: main
Are you sure you want to change the base?
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
59f00a6
to
fac08a7
Compare
@@ -421,6 +427,12 @@ A dict of labels to wheel names that is typically generated by the whl_modificat | |||
The labels are JSON config files describing the modifications. | |||
""", | |||
), | |||
"override": attr.bool( |
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 personally think this is OK since this works similarly to how archive overrides work, but I would like @rickeylev and @groodt to also weigh in here.
This is an obvious case where we may want to have an escape hatch and because it is a root module, we can do this.
However, I am wondering about what happens if a module like this gets published.
fac08a7
to
b3bb708
Compare
Thanks for the message. Could you explain, what is the reason for using a particular version of the python dependencies for rules_ros? Is it security, other type of compliance, or just need to fix bad behaviour in rules_ros?
The bzlmod APIs may still need a little bit of refinement before releasing 1.0 and I would like to understand if the feature you'd like is just a workaround a different design flaw that you are experiencing. In order to ensure that we get the right primitives in place I would like to analyse each request separately.
…On 25 July 2024 15:49:20 EEST, Markus Hofbauer ***@***.***> wrote:
I think I ran exactly into this issue when I want to consume [rules_ros](https://github.com/mvukov/rules_ros) which defines [this hub](https://github.com/mvukov/rules_ros/blob/049418ec41397080ec2fdff1e76eb7e95d9a0d57/MODULE.bazel#L65). But I want to override the pip deps with the onces we define to have a single version used for all dependencies.
--
Reply to this email directly or view it on GitHub:
#1829 (comment)
You are receiving this because you commented.
Message ID: ***@***.***>
|
The reason for overriding the versions of the Python dependencies is that we want to have the same version for all targets. If we don't do that, we could end up in a target that uses the same python package at 2 different versions |
@aignas Is there any information that we can provide to help you clarifying this? |
Thanks for bringing this back to the top of my inbox. Could you clarify why you would like to use the same version everywhere?
…On 30 July 2024 15:41:26 EEST, Markus Hofbauer ***@***.***> wrote:
@aignas Is there any information that we can provide to help you clarifying this?
--
Reply to this email directly or view it on GitHub:
#1829 (comment)
You are receiving this because you were mentioned.
Message ID: ***@***.***>
|
So that we can follow https://opensource.google/documentation/reference/thirdparty/oneversion |
It would match what WORKSPACE files do in that if you defined the python libraries before the third party dependency, you can override your thirdparty dependency's python libraries. |
Coming back to this after thinking about how the I am going to write some thoughts here to explore the problem a little bit more Merging the overrides with the initial definition. Since the initial definition Supporting only overriding - the root module user will have to specify all of I am not fully sure if the current implementation does not have a bug around What is more, I don't think that storing a single python_attrs = {python_attr.python_version: pip_attr} To sum up, I think I am happy to merge an implementation that has:
|
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.
Needs further changes
Allows the user to override pip dependencies:
#1791
This primarily helps solve the issue whereby if your python project
A
depends on python projectB
and python projectC
such thatA -> B, A -> C
, we can now create pip files which resolve for all three repositories. Currently the dependencies in eitherB
orC
will override pip dependencies inA
.