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

NullPointerError while doing a build #891

Closed
endobson opened this issue Feb 13, 2016 · 1 comment
Closed

NullPointerError while doing a build #891

endobson opened this issue Feb 13, 2016 · 1 comment

Comments

@endobson
Copy link
Contributor

Repro steps:

git clone https://shekari@bitbucket.org/snippets/shekari/7ryL7/bazel-genrule-issue.git issue
cd issue
git co 6480b0b0d5a3171755826ff409e81ae2dc384f8c
cd repo2
bazel build //...

The contents of repo2 should just be a workspace file with the following content:

git_repository(
  name = "repo1",
  remote = "https://bitbucket.org/snippets/shekari/7ryL7/bazel-genrule-issue.git"
  commit = "68d3656952703e3200e87dc6a5204cb42a2a63dd"
)

This may be because the repository doesn't have a WORKSPACE file at the root.

Output:

Unhandled exception thrown during build; message: Unrecoverable error while evaluating node 'WORKSPACE_FILE:[/Users/endobson/tmp/issue/repo2]/[WORKSPACE]' (requested by nodes 'PACKAGE:external')
INFO: Elapsed time: 0.453s
java.lang.RuntimeException: Unrecoverable error while evaluating node 'WORKSPACE_FILE:[/Users/endobson/tmp/issue/repo2]/[WORKSPACE]' (requested by nodes 'PACKAGE:external')
        at com.google.devtools.build.skyframe.ParallelEvaluator$Evaluate.run(ParallelEvaluator.java:982)
        at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$WrappedRunnable.run(AbstractQueueVisitor.java:499)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
        at com.google.devtools.build.lib.packages.WorkspaceFactory.setImportedExtensions(WorkspaceFactory.java:157)
        at com.google.devtools.build.lib.skyframe.WorkspaceFileFunction.loadSkylarkImports(WorkspaceFileFunction.java:116)
        at com.google.devtools.build.lib.skyframe.WorkspaceFileFunction.parse(WorkspaceFileFunction.java:123)
        at com.google.devtools.build.lib.skyframe.WorkspaceFileFunction.compute(WorkspaceFileFunction.java:90)
        at com.google.devtools.build.skyframe.ParallelEvaluator$Evaluate.run(ParallelEvaluator.java:933)
        ... 4 more

bazel version

endobson@yggdrasil () ~/tmp/issue/repo2 % bazel version                                                                                                                                                                                (2)
.......
Build label: head (@b190ab0)
Build target: bazel-out/local_darwin-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Fri Feb 12 09:10:36 2016 (1455268236)
Build timestamp: 1455268236
Build timestamp as int: 1455268236
@endobson
Copy link
Contributor Author

Turns out that actually building from HEAD instead of just downloading HEAD and staying on the old checkout is not a good idea. I cannot reproduce with the version at HEAD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant