-
Notifications
You must be signed in to change notification settings - Fork 319
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
Bazel: Support archive_override
#8809
Comments
These are very common. My understanding was that this is the "old way" of doing things (aka "workspace") and it is at least discouraged for bzlmod. But now I'm not so sure this is accurate. And in practice it is unlikely that people will migrate this to bzlmod if they have to maintain a custom registry in addition. This concrete example is for a Bazel rules module, which I think is exactly the use case for bzlmod and it most likely is in or will be added to BCR. But in general ORT might have to support |
@haikoschol is it fair to assume that the content of the archive file is identical with the content of the file from the registry? |
The registry does not contain source archives, only metadata about them. For the If bzlmod was used instead of
Then ORT needs to figure out what registry to query to get the information in |
Thanks for your feedback @haikoschol The key sentence for me is:
If this configuration is used, IMO ORT should support it, even if this is the legacy way of doing things. |
In any case, the underlying question still remains IIUC: Is the archive override only used to use an alternative location to obtain the source code from, while the actual obtained sources remain identical. Or is it used to provide a different / alternative implementation for a dependency? |
It could be anything and I assume replacing the actual bits is a common use case, especially for |
I should have tried this sooner, but did just now:
Looks like edit: It's an override so I guess it only makes sense if there is a |
The scope for the initial implementation was limited to bzlmod. Without that, Bazel can't be considered a dependency manager (and with it IMHO still isn't a package manager). Of course, those pesky "real world projects" don't care about that. IMHO, the only way to make progress on Bazel support in general is on a case by case basis. Basing the implementation on speculation about how people use the bazillion ways of skinning cats in Bazel doesn't seem promising to me. |
This is exactly the reason I was asking this question. Would support for |
Hum the customer project I am working on has this in its
The first line is |
Yes, I spoke too soon. Just updated my comment above. |
Since @nnobelis has a concrete project with this constellation, I'd say no. |
So this is replacing version 0.1.1 of |
Something quite weird:
No version is outputted for this package ?! |
Weird indeed and unclear how to handle it in ORT. But better than hiding the fact that 0.1.1 was replaced. |
Correct. Though coming up with a solution (like applying patches pn-the-fly before scanning, or creating custom source archives for source code with the patches applied) could become useful in the context of BitBake support as well. |
Archive overrides are dependencies for which the sourcecode comes from a given URL instead of the location present in the registry's metadata. When such dependency is present, ORT won't query the registry at all for it and will also suppress the package version in the dependency tree like Bazel does in the output of "mod graph". Fixes oss-review-toolkit#8809. [1]: https://bazel.build/rules/lib/globals/module#archive_override Signed-off-by: Nicolas Nobelis <nicolas.nobelis@bosch.com>
Archive overrides are dependencies for which the sourcecode comes from a given URL instead of the location present in the registry's metadata. When such dependency is present, ORT won't query the registry at all for it and will also suppress the package version in the dependency tree like Bazel does in the output of "mod graph". Fixes oss-review-toolkit#8809. [1]: https://bazel.build/rules/lib/globals/module#archive_override Signed-off-by: Nicolas Nobelis <nicolas.nobelis@bosch.com>
Archive overrides are dependencies for which the source code comes from a given URL instead of the location present in the registry's metadata. When such dependency is present, ORT should not query the registry at all for it and will also suppress the package version in the dependency tree like Bazel does in the output of `mod graph`. Fixes oss-review-toolkit#8809. [1]: https://bazel.build/rules/lib/globals/module#archive_override Signed-off-by: Nicolas Nobelis <nicolas.nobelis@bosch.com>
The user can specify that a dependency should come from an archive file (zip, gzip, etc) at a certain location, instead of from a registry.
See https://bazel.build/rules/lib/globals/module#archive_override.
Example in
MODULE.bazel
:ORT should support this alternate locations for downloading the source code.
@haikoschol FYI
The text was updated successfully, but these errors were encountered: