Unverified Commit d97629ac authored by Mario Rodas's avatar Mario Rodas Committed by GitHub
Browse files

Merge pull request #295615 from Strum355/bazel-7.1.0

bazel: 7.0.2 -> 7.1.0
parents f9565232 1e01835f
Loading
Loading
Loading
Loading
+1435 −313

File changed.

Preview size limit exceeded, changes collapsed.

+651 −714

File changed.

Preview size limit exceeded, changes collapsed.

+2 −2
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@
  # Always assume all markers valid (this is needed because we remove markers; they are non-deterministic).
  # Also, don't clean up environment variables (so that NIX_ environment variables are passed to compilers).
, enableNixHacks ? false
, version ? "7.0.2",
, version ? "7.1.0",
}:

let
@@ -51,7 +51,7 @@ let

  src = fetchurl {
    url = "https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-dist.zip";
    hash = "sha256-3qK5BXXUPvPkHEAvZMJIGETsvwtA+FSLdaIEpNUE4DU=";
    hash = "sha256-HiDQyJ98nRtKOBqMWGtKQ1qWv8Qfu880osKUlOs4Z6E=";
  };

  # Use builtins.fetchurl to avoid IFD, in particular on hydra
+22 −18
Original line number Diff line number Diff line
diff --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
index 845c8b6aa3..6f07298bd0 100644
index 4d8c46f8d5..ed311226f0 100644
--- 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
@@ -171,14 +171,8 @@ public final class RepositoryDelegatorFunction implements SkyFunction {
 
     DigestWriter digestWriter = new DigestWriter(directories, repositoryName, rule);
@@ -178,18 +178,8 @@ public final class RepositoryDelegatorFunction implements SkyFunction {
         }
       }
       if (shouldUseCachedRepos(env, handler, repoRoot, rule)) {
-        // Make sure marker file is up-to-date; correctly describes the current repository state
-        byte[] markerHash = digestWriter.areRepositoryAndMarkerFileConsistent(handler, env);
-        if (env.valuesMissing()) {
-          return null;
-        }
-      if (markerHash != null) {
-        return RepositoryDirectoryValue.builder().setPath(repoRoot).setDigest(markerHash).build();
-        if (markerHash != null) { // repo exist & up-to-date
-          return RepositoryDirectoryValue.builder()
-              .setPath(repoRoot)
-              .setDigest(markerHash)
-              .setExcludeFromVendoring(shouldExcludeRepoFromVendoring(handler, rule))
-              .build();
-        }
+        // Nix hack: Always consider cached dirs as up-to-date
+        return RepositoryDirectoryValue.builder().setPath(repoRoot).setDigest(digestWriter.writeMarkerFile()).build();
       }
 
       /* At this point: This is a force fetch, a local repository, OR The repository cache is old or
@@ -512,11 +506,12 @@ public final class RepositoryDelegatorFunction implements SkyFunction {
@@ -610,11 +600,12 @@ public final class RepositoryDelegatorFunction implements SkyFunction {
         builder.append(escape(key)).append(" ").append(escape(value)).append("\n");
       }
       String content = builder.toString();
+709 −349

File changed.

Preview size limit exceeded, changes collapsed.