Bazel crashes when changing local_repository to git_repository

28 views
Skip to first unread message

Onath Claridge

unread,
Feb 24, 2016, 8:12:50 PM2/24/16
to bazel-discuss
I'm trying to change a local_repository to a git_repository. None of the contents are changing, and it's always been a git repository -- I just finally realized that I could reference it as a remote.

After I make the switch, Bazel crashes with an error, below. If I "bazel clean --expunge", then rebuilding works OK. (However, the --expunge is necessary.)

Any thoughts?

Thanks,
Onath


java.lang.RuntimeException: Unrecoverable error while evaluating node 'PACKAGE:@third_party//avl' (requested by nodes 'TARGET_MARKER:@third_party//avl:avl')
at com.google.devtools.build.skyframe.ParallelEvaluator$Evaluate.run(ParallelEvaluator.java:992)
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.IllegalArgumentException: Invalid BUILD file name for package '@third_party//avl': /opt/makani/third_party/avl/BUILD
at com.google.devtools.build.lib.packages.Package.finishInit(Package.java:300)
at com.google.devtools.build.lib.packages.Package$Builder.finishBuild(Package.java:1292)
at com.google.devtools.build.lib.skyframe.PackageFunction.compute(PackageFunction.java:508)
at com.google.devtools.build.skyframe.ParallelEvaluator$Evaluate.run(ParallelEvaluator.java:943)
... 4 more

Brian Silverman

unread,
Feb 24, 2016, 10:05:18 PM2/24/16
to Onath Claridge, bazel-discuss
That's a bug. I can reproduce it with an older version, but not with the latest master (there have been a variety of bug fixes in that area recently). What version are you using?

--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/98bf6850-ce90-42f5-98fb-070391477a29%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Onath Claridge

unread,
Feb 24, 2016, 11:51:35 PM2/24/16
to Brian Silverman, bazel-discuss

We're on 0.1.5. Do you know if the bug is still present as of 0.2.0?

Brian Silverman

unread,
Feb 25, 2016, 12:18:08 AM2/25/16
to Onath Claridge, bazel-discuss
Seems to work *better* with 0.2.0. Upon further testing, I discovered that the newer versions spit out that same error if you have a git_repository, change it to a local_repository, and then change it back to git_repository again without shutting down. Also, once it's in that state, even a `bazel shutdown` still doesn't fix it. You want to file a bug about that?

Also, a workaround for all versions if you need one: rename the repository as you change its type.

Onath Claridge

unread,
Feb 25, 2016, 12:02:25 PM2/25/16
to Brian Silverman, bazel-discuss
Sure, I'll file a bug. I've reproduced it in our workspace.

Thanks for your help, Brian!

Onath Claridge

unread,
Feb 25, 2016, 12:12:09 PM2/25/16
to bazel-discuss, bsilve...@gmail.com

Damien Martin-guillerez

unread,
Feb 25, 2016, 12:25:48 PM2/25/16
to Onath Claridge, bazel-discuss, bsilve...@gmail.com
As said on the bug, it looks like the same bug uncovered by the test case in commit 26f7f4849d4f56d23d21111ee17248ab64065009

On Thu, Feb 25, 2016 at 6:12 PM 'Onath Claridge' via bazel-discuss <bazel-...@googlegroups.com> wrote:

--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages