diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/BzlmodRepoRuleFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/BzlmodRepoRuleFunction.java index 3311cdf513fb83..c9076034e60a6c 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/BzlmodRepoRuleFunction.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/BzlmodRepoRuleFunction.java @@ -39,7 +39,6 @@ import com.google.devtools.build.lib.cmdline.RepositoryMapping; import com.google.devtools.build.lib.cmdline.RepositoryName; import com.google.devtools.build.lib.packages.NoSuchPackageException; -import com.google.devtools.build.lib.packages.Package; import com.google.devtools.build.lib.packages.Rule; import com.google.devtools.build.lib.packages.RuleClass; import com.google.devtools.build.lib.packages.RuleClassProvider; @@ -148,10 +147,7 @@ public SkyValue compute(SkyKey skyKey, Environment env) return BzlmodRepoRuleValue.REPO_RULE_NOT_FOUND_VALUE; } RepoSpec extRepoSpec = extensionEval.getGeneratedRepoSpecs().get(internalRepo); - Package pkg = createRuleFromSpec(extRepoSpec, starlarkSemantics, env).getRule().getPackage(); - Preconditions.checkNotNull(pkg); - - return new BzlmodRepoRuleValue(pkg, repositoryName.getName()); + return createRuleFromSpec(extRepoSpec, starlarkSemantics, env); } private static Optional checkRepoFromNonRegistryOverrides(