Skip to content

Commit

Permalink
Attempt to fix Skyfocus
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeum committed Dec 19, 2024
1 parent 02e2e2c commit b713852
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ public class LabelConstants {
public static final PathFragment VENDOR_FILE_NAME = PathFragment.create("VENDOR.bazel");

public static final PathFragment MODULE_LOCKFILE_NAME = PathFragment.create("MODULE.bazel.lock");
public static final PathFragment MODULE_REPRODUCIBLE_LOCKFILE_NAME =
PathFragment.create("MODULE.bazel.reproducible_lock");

// With this prefix, non-main repositories are symlinked under
// $output_base/execution_root/__main__/external
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import com.google.common.collect.Sets;
import com.google.devtools.build.lib.actions.cache.ActionCache;
import com.google.devtools.build.lib.cmdline.Label;
import com.google.devtools.build.lib.cmdline.LabelConstants;
import com.google.devtools.build.lib.cmdline.PackageIdentifier;
import com.google.devtools.build.lib.cmdline.RepositoryName;
import com.google.devtools.build.lib.collect.PathFragmentPrefixTrie;
Expand Down Expand Up @@ -181,12 +182,17 @@ public static Optional<SkyfocusState> prepareWorkingSet(

ImmutableSet<RootedPath> workingSetRootedPaths =
Stream.concat(
skyfocusState.options().workingSet.stream(),
// The Bzlmod lockfile can be created after a build without having existed
// before
// and must always be kept in the working set if it is used.
Stream.of("MODULE.bazel.lock"))
.map(k -> toFileStateKey(pkgLocator, k))
Stream.concat(
skyfocusState.options().workingSet.stream(),
// The Bzlmod lockfile can be created after a build without having existed
// before
// and must always be kept in the working set if it is used.
Stream.of(LabelConstants.MODULE_LOCKFILE_NAME.toString()))
.map(k -> toFileStateKey(pkgLocator, k)),
Stream.of(
RootedPath.toRootedPath(
Root.fromPath(pkgLocator.getOutputBase()),
LabelConstants.MODULE_LOCKFILE_NAME)))
.collect(toImmutableSet());
evaluator
.getInMemoryGraph()
Expand Down

0 comments on commit b713852

Please sign in to comment.