Return repo_metadata from repository_rules#367
Conversation
This is used by bazel to determine that these rules are remotely cacheable with the remote repo contents cache.
c32fb78 to
f9d9c79
Compare
|
|
||
| repository_metadata = None | ||
| if hasattr(repository_ctx, "repo_metadata"): | ||
| repository_metadata = repository_ctx.repo_metadata(reproducible = True) |
There was a problem hiding this comment.
Is a local java repository necessarily reproducible?
We detect the java_home from environment variables if not explicitly set. Even with an explicit java_home, what if it points to a symlink (that can change under us)?
Does it even make sense to cache a local repo like this remotely?
There was a problem hiding this comment.
I believe a repo that has a symlink to a absolute on-host location will get cached in the local repo contents cache but not the remote one (but @fmeum can confirm!)
I do think it would be safer/more obviously correct not to cache this one, but I'd also hope that it's completely lazy and that we don't force/autoregister the autodetecting toolchain for this language the way rules_cc and others do, though I haven't verified :/
I don't mind closing mine if we get this one in quickly, if we think discussion of which repos to cache might drag on, then it might make sense to take the obviously correct ones upfront |
This is used by bazel to determine that these rules are remotely
cacheable with the remote repo contents cache.