Skip to content

Conversation

@fmeum
Copy link
Contributor

@fmeum fmeum commented May 16, 2024

No description provided.

@fmeum
Copy link
Contributor Author

fmeum commented May 16, 2024

@Wyverald

@@ -1,3 +1,5 @@
load("@bazel_skylib//lib:modules.bzl", "modules")
Copy link
Member

Choose a reason for hiding this comment

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

this would break WORKSPACE users. let's use mctx.extension_metadata directly (with hasattr)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But WORKSPACE users have no reason to load from extension.bzl, right? While we could feature detect mctx.extension_metadata, that would in turn break Bzlmod users on pre-Bazel 7.1.0 and thus no reproducible parameter.

Copy link
Member

@Wyverald Wyverald May 16, 2024

Choose a reason for hiding this comment

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

WORKSPACE users instantiate a host_platform_repo from this file (see local_config_platform.WORKSPACE in Bazel source) We could alternatively maybe separate the repo rule into a separate file, but that's messy in its own way...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, thanks for catching that. I submitted a new version that essentially inlines what skylib is doing.

@fmeum fmeum requested a review from Wyverald May 16, 2024 13:40
@Wyverald Wyverald merged commit 1b0d452 into bazelbuild:main May 16, 2024
@fmeum fmeum deleted the reproducible branch May 16, 2024 14:55
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.

2 participants