Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Jade after breaking bazel cl #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@
import com.google.devtools.build.lib.skyframe.packages.BazelPackageLoader;
import com.google.devtools.build.lib.skyframe.packages.PackageLoader;
import com.google.devtools.build.lib.vfs.Path;
import com.google.devtools.build.lib.vfs.Root;

public class BazelPackageLoaderFactory implements PackageLoaderFactory {
private static final Reporter REPORTER =
new Reporter(new EventBus(), PrintingEventHandler.ERRORS_TO_STDERR);

@Override
public PackageLoader create(Path workspaceDir, Path installBase, Path outputBase) {
public PackageLoader create(Root workspaceDir, Path installBase, Path outputBase) {
return BazelPackageLoader.builder(workspaceDir, installBase, outputBase)
.useDefaultSkylarkSemantics()
.setReporter(REPORTER)
Expand Down
3 changes: 2 additions & 1 deletion java/com/google/devtools/javatools/jade/pkgloader/Lib.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.google.devtools.build.lib.packages.NoSuchPackageException;
import com.google.devtools.build.lib.skyframe.packages.PackageLoader;
import com.google.devtools.build.lib.vfs.FileSystem;
import com.google.devtools.build.lib.vfs.Root;
import com.google.protos.java.com.google.devtools.javatools.jade.pkgloader.services.Services.LoaderRequest;
import com.google.protos.java.com.google.devtools.javatools.jade.pkgloader.services.Services.LoaderResponse;
import java.util.HashMap;
Expand All @@ -41,7 +42,7 @@ static LoaderResponse load(
logger.info("Start of 'load'");
PackageLoader loader =
packageLoaderFactory.create(
fileSystem.getPath(request.getWorkspaceDir()),
Root.fromPath(fileSystem.getPath(request.getWorkspaceDir())),
fileSystem.getPath(request.getInstallBase()),
fileSystem.getPath(request.getOutputBase()));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@

import com.google.devtools.build.lib.skyframe.packages.PackageLoader;
import com.google.devtools.build.lib.vfs.Path;
import com.google.devtools.build.lib.vfs.Root;

public interface PackageLoaderFactory {
PackageLoader create(Path workspaceDir, Path installBase, Path outputBase);
PackageLoader create(Root workspaceDir, Path installBase, Path outputBase);
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import com.google.devtools.build.lib.vfs.FileSystem;
import com.google.devtools.build.lib.vfs.FileSystemUtils;
import com.google.devtools.build.lib.vfs.Path;
import com.google.devtools.build.lib.vfs.Root;
import com.google.devtools.build.lib.vfs.inmemoryfs.InMemoryFileSystem;
import com.google.protos.java.com.google.devtools.javatools.jade.pkgloader.messages.Messages;
import java.io.IOException;
Expand All @@ -52,7 +53,8 @@ public void setUp() throws IOException {
Path outputBase = fs.getPath("/output_base/");
MockWorkspace.create(workspaceRoot, installBase, outputBase);

packageLoader = PACKAGE_LOADER_FACTORY.create(workspaceRoot, installBase, outputBase);
packageLoader =
PACKAGE_LOADER_FACTORY.create(Root.fromPath(workspaceRoot), installBase, outputBase);
}

@Test
Expand Down