Skip to content

Mark extension as reproducible#92

Merged
Wyverald merged 2 commits into
bazelbuild:mainfrom
fmeum:reproducible
May 16, 2024
Merged

Mark extension as reproducible#92
Wyverald merged 2 commits into
bazelbuild:mainfrom
fmeum:reproducible

Conversation

@fmeum

@fmeum fmeum commented May 16, 2024

Copy link
Copy Markdown
Contributor

No description provided.

@fmeum

fmeum commented May 16, 2024

Copy link
Copy Markdown
Contributor Author

@Wyverald

Comment thread host/extension.bzl Outdated
@@ -1,3 +1,5 @@
load("@bazel_skylib//lib:modules.bzl", "modules")

Copy link
Copy Markdown
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
Copy Markdown
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.

@Wyverald Wyverald May 16, 2024

Copy link
Copy Markdown
Member

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
Copy Markdown
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