aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java
diff options
context:
space:
mode:
authorGravatar Nathan Harmata <nharmata@google.com>2016-05-24 15:27:18 +0000
committerGravatar Yue Gan <yueg@google.com>2016-05-25 08:34:17 +0000
commit6b253faa5a4bf33f3a5a60230aacfababa54cedc (patch)
tree29d55017e169333e3126bf10d157241ad3883149 /src/main/java
parentc3fb0b1f2742a81fe6010e804037cbd4459b572e (diff)
Remove Package.LegacyBuilder (unneeded as of commit 3a95f353704dc2f7061e2c0786c2459ac1db0fd1).
-- MOS_MIGRATED_REVID=123107954
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/packages/Package.java48
-rw-r--r--src/main/java/com/google/devtools/build/lib/packages/PackageFactory.java38
-rw-r--r--src/main/java/com/google/devtools/build/lib/packages/WorkspaceFactory.java9
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/PackageFunction.java32
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java8
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/WorkspaceFileFunction.java3
6 files changed, 57 insertions, 81 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/packages/Package.java b/src/main/java/com/google/devtools/build/lib/packages/Package.java
index fc2a1931ba..dd0df6a4dd 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/Package.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/Package.java
@@ -666,41 +666,8 @@ public class Package {
}
}
- /**
- * Builder class for {@link Package} that does its own globbing.
- *
- * <p>Despite its name, this is the normal builder used when parsing BUILD files.
- */
- // TODO(bazel-team): This class is no longer needed and can be removed.
- public static class LegacyBuilder extends Builder {
- LegacyBuilder(PackageIdentifier packageId, String runfilesPrefix) {
- super(packageId, runfilesPrefix);
- }
-
- /**
- * Derive a LegacyBuilder from a normal Builder.
- */
- LegacyBuilder(Builder builder) {
- super(builder.pkg);
- if (builder.getFilename() != null) {
- setFilename(builder.getFilename());
- }
- }
-
- /**
- * Removes a target from the {@link Package} under construction. Intended to be used only by
- * {@link com.google.devtools.build.lib.skyframe.PackageFunction} to remove targets whose
- * labels cross subpackage boundaries.
- */
- public void removeTarget(Target target) {
- if (target.getPackage() == pkg) {
- this.targets.remove(target.getName());
- }
- }
- }
-
- public static LegacyBuilder newExternalPackageBuilder(Path workspacePath, String runfilesPrefix) {
- LegacyBuilder b = new LegacyBuilder(Label.EXTERNAL_PACKAGE_IDENTIFIER, runfilesPrefix);
+ public static Builder newExternalPackageBuilder(Path workspacePath, String runfilesPrefix) {
+ Builder b = new Builder(Label.EXTERNAL_PACKAGE_IDENTIFIER, runfilesPrefix);
b.setFilename(workspacePath);
b.setMakeEnv(new MakeEnvironment.Builder());
return b;
@@ -1269,6 +1236,17 @@ public class Package {
return beforeBuild();
}
+ /**
+ * Removes a target from the {@link Package} under construction. Intended to be used only by
+ * {@link com.google.devtools.build.lib.skyframe.PackageFunction} to remove targets whose
+ * labels cross subpackage boundaries.
+ */
+ public void removeTarget(Target target) {
+ if (target.getPackage() == pkg) {
+ this.targets.remove(target.getName());
+ }
+ }
+
/** Intended for use by {@link com.google.devtools.build.lib.skyframe.PackageFunction} only. */
public Package finishBuild() {
if (alreadyBuilt) {
diff --git a/src/main/java/com/google/devtools/build/lib/packages/PackageFactory.java b/src/main/java/com/google/devtools/build/lib/packages/PackageFactory.java
index f86931571c..9b56e57d1b 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/PackageFactory.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/PackageFactory.java
@@ -108,7 +108,7 @@ public final class PackageFactory {
}
private void convertAndProcess(
- Package.LegacyBuilder pkgBuilder, Location location, Object value)
+ Package.Builder pkgBuilder, Location location, Object value)
throws EvalException {
T typedValue = type.convert(value, "'package' argument", pkgBuilder.getBuildFileLabel());
process(pkgBuilder, location, typedValue);
@@ -122,7 +122,7 @@ public final class PackageFactory {
* @param value the value of the argument. Typically passed to {@link Type#convert}
*/
protected abstract void process(
- Package.LegacyBuilder pkgBuilder, Location location, T value)
+ Package.Builder pkgBuilder, Location location, T value)
throws EvalException;
}
@@ -160,7 +160,7 @@ public final class PackageFactory {
}
@Override
- protected void process(Package.LegacyBuilder pkgBuilder, Location location,
+ protected void process(Package.Builder pkgBuilder, Location location,
List<Label> value) {
pkgBuilder.setDefaultVisibility(getVisibility(pkgBuilder.getBuildFileLabel(), value));
}
@@ -172,7 +172,7 @@ public final class PackageFactory {
}
@Override
- protected void process(Package.LegacyBuilder pkgBuilder, Location location,
+ protected void process(Package.Builder pkgBuilder, Location location,
Boolean value) {
pkgBuilder.setDefaultTestonly(value);
}
@@ -184,7 +184,7 @@ public final class PackageFactory {
}
@Override
- protected void process(Package.LegacyBuilder pkgBuilder, Location location,
+ protected void process(Package.Builder pkgBuilder, Location location,
String value) {
pkgBuilder.setDefaultDeprecation(value);
}
@@ -196,7 +196,7 @@ public final class PackageFactory {
}
@Override
- protected void process(Package.LegacyBuilder pkgBuilder, Location location,
+ protected void process(Package.Builder pkgBuilder, Location location,
List<String> value) {
pkgBuilder.addFeatures(value);
}
@@ -208,7 +208,7 @@ public final class PackageFactory {
}
@Override
- protected void process(Package.LegacyBuilder pkgBuilder, Location location,
+ protected void process(Package.Builder pkgBuilder, Location location,
License value) {
pkgBuilder.setDefaultLicense(value);
}
@@ -220,7 +220,7 @@ public final class PackageFactory {
}
@Override
- protected void process(Package.LegacyBuilder pkgBuilder, Location location,
+ protected void process(Package.Builder pkgBuilder, Location location,
Set<DistributionType> value) {
pkgBuilder.setDefaultDistribs(value);
}
@@ -236,7 +236,7 @@ public final class PackageFactory {
}
@Override
- protected void process(Package.LegacyBuilder pkgBuilder, Location location,
+ protected void process(Package.Builder pkgBuilder, Location location,
List<Label> value) {
pkgBuilder.setDefaultCompatibleWith(value, Package.DEFAULT_COMPATIBLE_WITH_ATTRIBUTE,
location);
@@ -253,7 +253,7 @@ public final class PackageFactory {
}
@Override
- protected void process(Package.LegacyBuilder pkgBuilder, Location location,
+ protected void process(Package.Builder pkgBuilder, Location location,
List<Label> value) {
pkgBuilder.setDefaultRestrictedTo(value, Package.DEFAULT_RESTRICTED_TO_ATTRIBUTE, location);
}
@@ -687,7 +687,7 @@ public final class PackageFactory {
static Runtime.NoneType callExportsFiles(Object srcs, Object visibilityO, Object licensesO,
FuncallExpression ast, Environment env) throws EvalException, ConversionException {
- Package.LegacyBuilder pkgBuilder = getContext(env, ast).pkgBuilder;
+ Package.Builder pkgBuilder = getContext(env, ast).pkgBuilder;
List<String> files = Type.STRING_LIST.convert(srcs, "'exports_files' operand");
RuleVisibility visibility = EvalUtils.isNullOrNone(visibilityO)
@@ -1080,7 +1080,7 @@ public final class PackageFactory {
public Object call(Object[] arguments, FuncallExpression ast, Environment env)
throws EvalException {
- Package.LegacyBuilder pkgBuilder = getContext(env, ast).pkgBuilder;
+ Package.Builder pkgBuilder = getContext(env, ast).pkgBuilder;
// Validate parameter list
if (pkgBuilder.isPackageFunctionUsed()) {
@@ -1189,7 +1189,7 @@ public final class PackageFactory {
* {@code globber.onInterrupt()} on an {@link InterruptedException}.
*/
// Used outside of bazel!
- public Package.LegacyBuilder createPackageFromPreprocessingResult(
+ public Package.Builder createPackageFromPreprocessingResult(
Package externalPkg,
PackageIdentifier packageId,
Path buildFile,
@@ -1227,7 +1227,7 @@ public final class PackageFactory {
return buildFileAST;
}
- public Package.LegacyBuilder createPackageFromPreprocessingAst(
+ public Package.Builder createPackageFromPreprocessingAst(
Package externalPkg,
PackageIdentifier packageId,
Path buildFile,
@@ -1393,14 +1393,14 @@ public final class PackageFactory {
* footprint when making changes here!
*/
public static class PackageContext {
- final Package.LegacyBuilder pkgBuilder;
+ final Package.Builder pkgBuilder;
final Globber globber;
final EventHandler eventHandler;
private final Function<RuleClass, AttributeContainer> attributeContainerFactory;
@VisibleForTesting
public PackageContext(
- Package.LegacyBuilder pkgBuilder,
+ Package.Builder pkgBuilder,
Globber globber,
EventHandler eventHandler,
Function<RuleClass, AttributeContainer> attributeContainerFactory) {
@@ -1510,7 +1510,7 @@ public final class PackageFactory {
* @see PackageFactory#PackageFactory
*/
@VisibleForTesting // used by PackageFactoryApparatus
- public Package.LegacyBuilder evaluateBuildFile(
+ public Package.Builder evaluateBuildFile(
Package externalPkg,
PackageIdentifier packageId,
BuildFileAST buildFileAST,
@@ -1523,7 +1523,7 @@ public final class PackageFactory {
Map<String, Extension> imports,
ImmutableList<Label> skylarkFileDependencies)
throws InterruptedException {
- Package.LegacyBuilder pkgBuilder = new Package.LegacyBuilder(
+ Package.Builder pkgBuilder = new Package.Builder(
packageId, ruleClassProvider.getRunfilesPrefix());
StoredEventHandler eventHandler = new StoredEventHandler();
@@ -1611,7 +1611,7 @@ public final class PackageFactory {
.setPhase(Phase.LOADING)
.build();
- Package.LegacyBuilder pkgBuilder = new Package.LegacyBuilder(packageId,
+ Package.Builder pkgBuilder = new Package.Builder(packageId,
ruleClassProvider.getRunfilesPrefix());
pkgBuilder.setFilename(buildFilePath)
diff --git a/src/main/java/com/google/devtools/build/lib/packages/WorkspaceFactory.java b/src/main/java/com/google/devtools/build/lib/packages/WorkspaceFactory.java
index 625e3fe8fd..29275f74d7 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/WorkspaceFactory.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/WorkspaceFactory.java
@@ -27,7 +27,6 @@ import com.google.devtools.build.lib.events.Event;
import com.google.devtools.build.lib.events.NullEventHandler;
import com.google.devtools.build.lib.events.StoredEventHandler;
import com.google.devtools.build.lib.packages.Package.Builder;
-import com.google.devtools.build.lib.packages.Package.LegacyBuilder;
import com.google.devtools.build.lib.packages.Package.NameConflictException;
import com.google.devtools.build.lib.packages.PackageFactory.EnvironmentExtension;
import com.google.devtools.build.lib.skylarkinterface.SkylarkSignature;
@@ -74,7 +73,7 @@ public class WorkspaceFactory {
"DEFAULT_SERVER_JAVABASE", // serializable so optional
PackageFactory.PKG_CONTEXT);
- private final LegacyBuilder builder;
+ private final Builder builder;
private final Path installDir;
private final Path workspaceDir;
@@ -103,7 +102,7 @@ public class WorkspaceFactory {
* @param mutability the Mutability for the current evaluation context
*/
public WorkspaceFactory(
- LegacyBuilder builder,
+ Builder builder,
RuleClassProvider ruleClassProvider,
ImmutableList<EnvironmentExtension> environmentExtensions,
Mutability mutability) {
@@ -120,7 +119,7 @@ public class WorkspaceFactory {
* @param workspaceDir the workspace directory
*/
public WorkspaceFactory(
- LegacyBuilder builder,
+ Builder builder,
RuleClassProvider ruleClassProvider,
ImmutableList<EnvironmentExtension> environmentExtensions,
Mutability mutability,
@@ -337,7 +336,7 @@ public class WorkspaceFactory {
try {
nameLabel = Label.parseAbsolute("//external:" + name);
try {
- LegacyBuilder builder = PackageFactory.getContext(env, ast).pkgBuilder;
+ Builder builder = PackageFactory.getContext(env, ast).pkgBuilder;
RuleClass ruleClass = ruleFactory.getRuleClass("bind");
builder
.externalPackageData()
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/PackageFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/PackageFunction.java
index e4ccd1ed23..467b7a73f8 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/PackageFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/PackageFunction.java
@@ -86,7 +86,7 @@ public class PackageFunction implements SkyFunction {
private final PackageFactory packageFactory;
private final CachingPackageLocator packageLocator;
- private final Cache<PackageIdentifier, CacheEntryWithGlobDeps<Package.LegacyBuilder>>
+ private final Cache<PackageIdentifier, CacheEntryWithGlobDeps<Package.Builder>>
packageFunctionCache;
private final Cache<PackageIdentifier, CacheEntryWithGlobDeps<AstAfterPreprocessing>> astCache;
private final AtomicBoolean showLoadingProgress;
@@ -103,7 +103,7 @@ public class PackageFunction implements SkyFunction {
PackageFactory packageFactory,
CachingPackageLocator pkgLocator,
AtomicBoolean showLoadingProgress,
- Cache<PackageIdentifier, CacheEntryWithGlobDeps<Package.LegacyBuilder>> packageFunctionCache,
+ Cache<PackageIdentifier, CacheEntryWithGlobDeps<Package.Builder>> packageFunctionCache,
Cache<PackageIdentifier, CacheEntryWithGlobDeps<AstAfterPreprocessing>> astCache,
AtomicInteger numPackagesLoaded,
@Nullable SkylarkImportLookupFunction skylarkImportLookupFunctionForInlining) {
@@ -459,7 +459,7 @@ public class PackageFunction implements SkyFunction {
List<Statement> preludeStatements =
astLookupValue.lookupSuccessful()
? astLookupValue.getAST().getStatements() : ImmutableList.<Statement>of();
- CacheEntryWithGlobDeps<Package.LegacyBuilder> packageBuilderAndGlobDeps =
+ CacheEntryWithGlobDeps<Package.Builder> packageBuilderAndGlobDeps =
loadPackage(
externalPkg,
replacementContents,
@@ -473,8 +473,8 @@ public class PackageFunction implements SkyFunction {
if (packageBuilderAndGlobDeps == null) {
return null;
}
- Package.LegacyBuilder legacyPkgBuilder = packageBuilderAndGlobDeps.value;
- legacyPkgBuilder.buildPartial();
+ Package.Builder pkgBuilder = packageBuilderAndGlobDeps.value;
+ pkgBuilder.buildPartial();
try {
// Since the Skyframe dependencies we request below in
// markDependenciesAndPropagateInconsistentFilesystemExceptions are requested independently of
@@ -483,7 +483,7 @@ public class PackageFunction implements SkyFunction {
// bother checking for missing values and instead piggyback on the env.missingValues() call
// for the former. This avoids a Skyframe restart.
handleLabelsCrossingSubpackagesAndPropagateInconsistentFilesystemExceptions(
- packageLookupValue.getRoot(), packageId, legacyPkgBuilder, env);
+ packageLookupValue.getRoot(), packageId, pkgBuilder, env);
} catch (InternalInconsistentFilesystemException e) {
packageFunctionCache.invalidate(packageId);
throw new PackageFunctionException(
@@ -491,12 +491,12 @@ public class PackageFunction implements SkyFunction {
e.isTransient() ? Transience.TRANSIENT : Transience.PERSISTENT);
}
Set<SkyKey> globKeys = packageBuilderAndGlobDeps.globDepKeys;
- Map<Label, Path> subincludes = legacyPkgBuilder.getSubincludes();
+ Map<Label, Path> subincludes = pkgBuilder.getSubincludes();
boolean packageShouldBeConsideredInError;
try {
packageShouldBeConsideredInError =
markDependenciesAndPropagateInconsistentFilesystemExceptions(
- env, globKeys, subincludes, packageId, legacyPkgBuilder.containsErrors());
+ env, globKeys, subincludes, packageId, pkgBuilder.containsErrors());
} catch (InternalInconsistentFilesystemException e) {
packageFunctionCache.invalidate(packageId);
throw new PackageFunctionException(
@@ -507,12 +507,12 @@ public class PackageFunction implements SkyFunction {
return null;
}
- Event.replayEventsOn(env.getListener(), legacyPkgBuilder.getEvents());
+ Event.replayEventsOn(env.getListener(), pkgBuilder.getEvents());
if (packageShouldBeConsideredInError) {
- legacyPkgBuilder.setContainsErrors();
+ pkgBuilder.setContainsErrors();
}
- Package pkg = legacyPkgBuilder.finishBuild();
+ Package pkg = pkgBuilder.finishBuild();
// We know this SkyFunction will not be called again, so we can remove the cache entry.
packageFunctionCache.invalidate(packageId);
@@ -699,7 +699,7 @@ public class PackageFunction implements SkyFunction {
}
private static void handleLabelsCrossingSubpackagesAndPropagateInconsistentFilesystemExceptions(
- Path pkgRoot, PackageIdentifier pkgId, Package.LegacyBuilder pkgBuilder, Environment env)
+ Path pkgRoot, PackageIdentifier pkgId, Package.Builder pkgBuilder, Environment env)
throws InternalInconsistentFilesystemException {
Set<SkyKey> containingPkgLookupKeys = Sets.newHashSet();
Map<Target, SkyKey> targetToKey = new HashMap<>();
@@ -778,7 +778,7 @@ public class PackageFunction implements SkyFunction {
}
private static boolean maybeAddEventAboutLabelCrossingSubpackage(
- Package.LegacyBuilder pkgBuilder, Path pkgRoot, Label label, @Nullable Location location,
+ Package.Builder pkgBuilder, Path pkgRoot, Label label, @Nullable Location location,
@Nullable ContainingPackageLookupValue containingPkgLookupValue) {
if (containingPkgLookupValue == null) {
return true;
@@ -1081,7 +1081,7 @@ public class PackageFunction implements SkyFunction {
* preprocessing.
*/
@Nullable
- private CacheEntryWithGlobDeps<Package.LegacyBuilder> loadPackage(
+ private CacheEntryWithGlobDeps<Package.Builder> loadPackage(
Package externalPkg,
@Nullable String replacementContents,
PackageIdentifier packageId,
@@ -1092,7 +1092,7 @@ public class PackageFunction implements SkyFunction {
Path packageRoot,
Environment env)
throws InterruptedException, PackageFunctionException {
- CacheEntryWithGlobDeps<Package.LegacyBuilder> packageFunctionCacheEntry =
+ CacheEntryWithGlobDeps<Package.Builder> packageFunctionCacheEntry =
packageFunctionCache.getIfPresent(packageId);
if (packageFunctionCacheEntry == null) {
profiler.startTask(ProfilerTask.CREATE_PACKAGE, packageId.toString());
@@ -1173,7 +1173,7 @@ public class PackageFunction implements SkyFunction {
buildFilePath.getParentDirectory(), packageId, packageLocator);
SkyframeHybridGlobber skyframeGlobber = new SkyframeHybridGlobber(packageId, packageRoot,
env, legacyGlobber);
- Package.LegacyBuilder pkgBuilder = packageFactory.createPackageFromPreprocessingAst(
+ Package.Builder pkgBuilder = packageFactory.createPackageFromPreprocessingAst(
externalPkg, packageId, buildFilePath, astAfterPreprocessing, importResult.importMap,
importResult.fileDependencies, defaultVisibility, skyframeGlobber);
Set<SkyKey> globDepsRequested = ImmutableSet.<SkyKey>builder()
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java
index c542e24335..201000d195 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java
@@ -81,7 +81,7 @@ import com.google.devtools.build.lib.packages.BuildFileContainsErrorsException;
import com.google.devtools.build.lib.packages.NoSuchPackageException;
import com.google.devtools.build.lib.packages.NoSuchThingException;
import com.google.devtools.build.lib.packages.Package;
-import com.google.devtools.build.lib.packages.Package.LegacyBuilder;
+import com.google.devtools.build.lib.packages.Package.Builder;
import com.google.devtools.build.lib.packages.PackageFactory;
import com.google.devtools.build.lib.packages.Preprocessor;
import com.google.devtools.build.lib.packages.Preprocessor.AstAfterPreprocessing;
@@ -194,7 +194,7 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory {
// package twice (first time loading to find subincludes and declare value dependencies).
// TODO(bazel-team): remove this cache once we have skyframe-native package loading
// [skyframe-loading]
- private final Cache<PackageIdentifier, CacheEntryWithGlobDeps<Package.LegacyBuilder>>
+ private final Cache<PackageIdentifier, CacheEntryWithGlobDeps<Package.Builder>>
packageFunctionCache = newPkgFunctionCache();
private final Cache<PackageIdentifier, CacheEntryWithGlobDeps<AstAfterPreprocessing>> astCache =
newAstCache();
@@ -417,7 +417,7 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory {
PackageFactory pkgFactory,
PackageManager packageManager,
AtomicBoolean showLoadingProgress,
- Cache<PackageIdentifier, CacheEntryWithGlobDeps<LegacyBuilder>> packageFunctionCache,
+ Cache<PackageIdentifier, CacheEntryWithGlobDeps<Builder>> packageFunctionCache,
Cache<PackageIdentifier, CacheEntryWithGlobDeps<AstAfterPreprocessing>> astCache,
AtomicInteger numPackagesLoaded,
RuleClassProvider ruleClassProvider) {
@@ -665,7 +665,7 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory {
}
}
- protected Cache<PackageIdentifier, CacheEntryWithGlobDeps<Package.LegacyBuilder>>
+ protected Cache<PackageIdentifier, CacheEntryWithGlobDeps<Package.Builder>>
newPkgFunctionCache() {
return CacheBuilder.newBuilder().build();
}
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/WorkspaceFileFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/WorkspaceFileFunction.java
index ea6f4dc544..c84e42049f 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/WorkspaceFileFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/WorkspaceFileFunction.java
@@ -18,7 +18,6 @@ import com.google.common.collect.ImmutableMap;
import com.google.devtools.build.lib.analysis.BlazeDirectories;
import com.google.devtools.build.lib.cmdline.PackageIdentifier;
import com.google.devtools.build.lib.packages.Package;
-import com.google.devtools.build.lib.packages.Package.LegacyBuilder;
import com.google.devtools.build.lib.packages.Package.NameConflictException;
import com.google.devtools.build.lib.packages.PackageFactory;
import com.google.devtools.build.lib.packages.RuleClassProvider;
@@ -68,7 +67,7 @@ public class WorkspaceFileFunction implements SkyFunction {
}
Path repoWorkspace = workspaceRoot.getRoot().getRelative(workspaceRoot.getRelativePath());
- LegacyBuilder builder =
+ Package.Builder builder =
Package.newExternalPackageBuilder(repoWorkspace, ruleClassProvider.getRunfilesPrefix());
if (workspaceASTValue.getASTs().isEmpty()) {