Skip to content
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

fix: return correct extension metadata #611

Merged
merged 1 commit into from
Jun 4, 2024
Merged

fix: return correct extension metadata #611

merged 1 commit into from
Jun 4, 2024

Conversation

thesayyn
Copy link
Collaborator

@thesayyn thesayyn commented Jun 4, 2024

fixes #529 #610

@thesayyn thesayyn requested a review from alexeagle June 4, 2024 19:48
@thesayyn thesayyn merged commit 98efaf8 into 2.x Jun 4, 2024
18 checks passed
@thesayyn thesayyn deleted the extension_metadata branch June 4, 2024 20:36
Comment on lines +47 to +48
for platform in pull.platforms:
deps.append("_".join([pull.name] + platform.split("/")))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, what would be the reason to include these deps here? rules_oci v1.7 works without me including them via use_repo and I am curious, why I am suddenly asked to include them via the bazel mod tidy command.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is it resolves an error like

WARNING: /builds/app/MODULE.bazel:38:20: The module extension oci defined in @rules_oci//oci:extensions.bzl reported incorrect imports of repositories via use_repo():
Not imported, but reported as direct dependencies by the extension (may cause the build to fail):
    java_base_debug_nonroot_debian12, java_base_nonroot_debian12
Imported, but reported as indirect dependencies by the extension:
    java_base_debug_nonroot_debian12_linux_amd64, java_base_debug_nonroot_debian12_linux_arm64_v8, java_base_nonroot_debian12_linux_amd64, java_base_nonroot_debian12_linux_arm64_v8
Fix the use_repo calls by running 'bazel mod tidy'.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bazel mod tidy could support something like absolutely neccesary repos vs could have if build requires it kind of use_repo calls.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but this what we have to do for now, if we want to avoid that annoying warning message. @fmeum probably has better ideas for this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like @thesayyn's idea of something similar to a root_module_optional_deps attribute that silences the warning without also adding use_repo arguments. Could you file an issue for this if you think it would be useful?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants