···43 # Always assume all markers valid (this is needed because we remove markers; they are non-deterministic).
44 # Also, don't clean up environment variables (so that NIX_ environment variables are passed to compilers).
45, enableNixHacks ? false
46-, version ? "7.0.2",
47}:
4849let
···5152 src = fetchurl {
53 url = "https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-dist.zip";
54- hash = "sha256-3qK5BXXUPvPkHEAvZMJIGETsvwtA+FSLdaIEpNUE4DU=";
55 };
5657 # Use builtins.fetchurl to avoid IFD, in particular on hydra
···43 # Always assume all markers valid (this is needed because we remove markers; they are non-deterministic).
44 # Also, don't clean up environment variables (so that NIX_ environment variables are passed to compilers).
45, enableNixHacks ? false
46+, version ? "7.1.0",
47}:
4849let
···5152 src = fetchurl {
53 url = "https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-dist.zip";
54+ hash = "sha256-HiDQyJ98nRtKOBqMWGtKQ1qWv8Qfu880osKUlOs4Z6E=";
55 };
5657 # Use builtins.fetchurl to avoid IFD, in particular on hydra
···1diff --git a/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java b/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java
2-index 845c8b6aa3..6f07298bd0 100644
3--- a/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java
4+++ b/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java
5-@@ -171,14 +171,8 @@ public final class RepositoryDelegatorFunction implements SkyFunction {
6-7- DigestWriter digestWriter = new DigestWriter(directories, repositoryName, rule);
8- if (shouldUseCachedRepos(env, handler, repoRoot, rule)) {
9-- // Make sure marker file is up-to-date; correctly describes the current repository state
10-- byte[] markerHash = digestWriter.areRepositoryAndMarkerFileConsistent(handler, env);
11-- if (env.valuesMissing()) {
12-- return null;
13-- }
14-- if (markerHash != null) {
15-- return RepositoryDirectoryValue.builder().setPath(repoRoot).setDigest(markerHash).build();
16-- }
17-+ // Nix hack: Always consider cached dirs as up-to-date
18-+ return RepositoryDirectoryValue.builder().setPath(repoRoot).setDigest(digestWriter.writeMarkerFile()).build();
19- }
00002021- /* At this point: This is a force fetch, a local repository, OR The repository cache is old or
22-@@ -512,11 +506,12 @@ public final class RepositoryDelegatorFunction implements SkyFunction {
23 builder.append(escape(key)).append(" ").append(escape(value)).append("\n");
24 }
25 String content = builder.toString();
···1diff --git a/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java b/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java
2+index 4d8c46f8d5..ed311226f0 100644
3--- a/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java
4+++ b/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java
5+@@ -178,18 +178,8 @@ public final class RepositoryDelegatorFunction implements SkyFunction {
6+ }
7+ }
8+ if (shouldUseCachedRepos(env, handler, repoRoot, rule)) {
9+- // Make sure marker file is up-to-date; correctly describes the current repository state
10+- byte[] markerHash = digestWriter.areRepositoryAndMarkerFileConsistent(handler, env);
11+- if (env.valuesMissing()) {
12+- return null;
13+- }
14+- if (markerHash != null) { // repo exist & up-to-date
15+- return RepositoryDirectoryValue.builder()
16+- .setPath(repoRoot)
17+- .setDigest(markerHash)
18+- .setExcludeFromVendoring(shouldExcludeRepoFromVendoring(handler, rule))
19+- .build();
20+- }
21++ // Nix hack: Always consider cached dirs as up-to-date
22++ return RepositoryDirectoryValue.builder().setPath(repoRoot).setDigest(digestWriter.writeMarkerFile()).build();
23+ }
2425+ /* At this point: This is a force fetch, a local repository, OR The repository cache is old or
26+@@ -610,11 +600,12 @@ public final class RepositoryDelegatorFunction implements SkyFunction {
27 builder.append(escape(key)).append(" ").append(escape(value)).append("\n");
28 }
29 String content = builder.toString();