No more base_workspace in Bazel 0.1.5?

76 views
Skip to first unread message

Erik Kuefler

unread,
Feb 11, 2016, 7:26:36 PM2/11/16
to bazel-discuss
Just tried switching from 0.1.4 to 0.1.5 and stuff's breaking now with messages like this:

ERROR: error loading package 'src/test/java/com/mypackage': Extension file not found. Unable to load file '//:tools/build_defs/groovy/groovy.bzl': file doesn't exist or isn't a file.

Poking around the Bazel installation directory, I don't see base_workspace under lib/bazel any more, which explains the breakage since my .bazelrc was setting that in the package path.

Is there a new way to reference the build rules defined in the Bazel repo? Doesn't look like the 0.1.5 notes mention anything about this.

Alex Humesky

unread,
Feb 11, 2016, 7:34:43 PM2/11/16
to Erik Kuefler, bazel-discuss
I believe the way to do this now is through @bazel_tools, e.g.:

load("@bazel_tools//tools/build_defs/groovy:groovy.bzl", "groovy_repositories")

--
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/8d495ba5-1574-49f9-a1ec-18a1a9994466%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Erik Kuefler

unread,
Feb 12, 2016, 1:36:33 PM2/12/16
to bazel-discuss, ekue...@gmail.com
Hmm this doesn't seem to be working as documented; it doesn't like that line in WORKSPACE. I tried creating a minimal repo containing only a WORKSPACE file with that line and running bazel info on it. In 0.1.5 I get this error:

$ bazel info
ERROR: Configuration creation failed.

In 0.1.4 I get a stack trace:

# bazel info
....
java.lang.IllegalStateException: topLevelKey: TRANSITIVE_TARGET:@bazel_tools//tools/cpp:toolchain
alreadyReported: false
path to cycle:
TRANSITIVE_TARGET:@bazel_tools//tools/cpp:toolchain
TARGET_MARKER:@bazel_tools//tools/cpp:toolchain
PACKAGE:@bazel_tools//tools/cpp
PACKAGE_LOOKUP:@bazel_tools//tools/cpp
cycle:
REPOSITORY:@bazel_tools
PACKAGE:external
WORKSPACE_FILE:[/xperiel/local/tmp]/[WORKSPACE]
SKYLARK_IMPORTS_LOOKUP:com.google.devtools.build.lib.skyframe.SkylarkImportLookupValue$SkylarkImportLookupKey@ac359b97
AST_FILE_LOOKUP:@bazel_tools//tools/build_defs/groovy:groovy.bzl
PACKAGE_LOOKUP:@bazel_tools//tools/build_defs/groovy

at com.google.common.base.Preconditions.checkState(Preconditions.java:174)
at com.google.devtools.build.lib.util.Preconditions.checkState(Preconditions.java:188)
at com.google.devtools.build.skyframe.CyclesReporter.reportCycles(CyclesReporter.java:82)
at com.google.devtools.build.lib.skyframe.SkyframeLabelVisitor.sync(SkyframeLabelVisitor.java:91)
at com.google.devtools.build.lib.runtime.CommandEnvironment.loadForConfigurations(CommandEnvironment.java:253)
at com.google.devtools.build.lib.runtime.CommandEnvironment.getConfigurations(CommandEnvironment.java:236)
at com.google.devtools.build.lib.runtime.commands.InfoCommand$1.get(InfoCommand.java:207)
at com.google.devtools.build.lib.runtime.commands.InfoCommand$1.get(InfoCommand.java:191)
at com.google.devtools.build.lib.runtime.commands.InfoCommand.exec(InfoCommand.java:257)
at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.exec(BlazeCommandDispatcher.java:371)
at com.google.devtools.build.lib.runtime.BlazeRuntime$3.exec(BlazeRuntime.java:1016)
at com.google.devtools.build.lib.server.RPCService.executeRequest(RPCService.java:65)
at com.google.devtools.build.lib.server.RPCServer.executeRequest(RPCServer.java:434)
at com.google.devtools.build.lib.server.RPCServer.serve(RPCServer.java:229)
at com.google.devtools.build.lib.runtime.BlazeRuntime.serverMain(BlazeRuntime.java:975)
at com.google.devtools.build.lib.runtime.BlazeRuntime.main(BlazeRuntime.java:772)
at com.google.devtools.build.lib.bazel.BazelMain.main(BazelMain.java:55)

Doesn't look Groovy specific, I tried with Rust and got the same thing.

Brian Silverman

unread,
Feb 12, 2016, 2:09:16 PM2/12/16
to Erik Kuefler, bazel-discuss
Have you tried with a version compiled from master? There have been some recent bug fixes in this area. If master doesn't work, I8bd7f7b00bec58a7157507595421bc50c81b404c should fix it (I'm going to upload a new patch set rebased on current master in a bit).

Reply all
Reply to author
Forward
0 new messages