bazelbuild / bazel-skylib

Common useful functions and rules for Bazel
https://bazel.build/
Apache License 2.0
376 stars 179 forks source link

Mark `modules.as_extension` as `reproducible` #497

Closed fmeum closed 3 months ago

fmeum commented 3 months ago

WORKSPACE macros are fully deterministic and thus a prime example of a reproducible module extension. This reduces clutter in MODULE.bazel.lock.

fmeum commented 3 months ago

@tetromino Could we get this into 1.6.0? It's a follow-up to #456 that, to be honest, I had given up on in the meantime.

CC @Wyverald for a review from the Bzlmod perspective.

tetromino commented 3 months ago

Maybe I'm missing something obvious, but how can you a priori say that a macro is deterministic when it may fetch from a non-deterministic external resource? Consider, for example, an http_archive pointing at some git repo's master HEAD.

Misunderstanding corrected by @Wyverald