question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't bazel build //...

See original GitHub issue
Starting local Bazel server and connecting to it...
INFO: SHA256 (https://github.com/google/jsinterop-generator/archive/master.zip) = 8a12f0247e51630e57f4e69849d739f4f60f0c2664f7d5ffc61be220d75b4ba8
INFO: SHA256 (https://github.com/google/jsinterop-base/archive/master.zip) = 1b3e51c7d0cecbda5ade78feeff93791639d7fa48922a7ca63220654c69c0ee4
ERROR: /Users/kostik/Projects/elemental2/third_party/BUILD:228:1: error loading package '@com_google_jsinterop_base//java/jsinterop/base': Extension file not found. Unable to load package for '@com_google_j2cl//build_defs:rules.bzl': The repository could not be resolved and referenced by '//third_party:jsinterop-base'
ERROR: Analysis of target '//third_party:jsinterop-base' failed; build aborted: error loading package '@com_google_jsinterop_base//java/jsinterop/base': Extension file not found. Unable to load package for '@com_google_j2cl//build_defs:rules.bzl': The repository could not be resolved
INFO: Elapsed time: 11.512s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (35 packages loaded)
    currently loading: @com_google_jsinterop_base//java/jsinterop/base

I wanted to import it to my project. I saw there’re errors, and decided to check whether it compiles. It obvious don’t. Could you help with fixing it?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
gkdncommented, Dec 4, 2018

Bazel calls the concept as recursive workspaces and they are working on proper support for it.

The design doc [1] discusses the current common practice under section called “The dependencies() pattern”.

[1] they have https://github.com/bazelbuild/proposals/blob/master/designs/2018-11-07-design-recursive-workspaces.md

1reaction
niloc132commented, Dec 1, 2018

I wouldn’t say they are not well supported, but they don’t nest nicely (i.e. one WORKSPACE per git repo?), and if you modify your own WORKSPACE to point at a local copy of some project “foo” instead of a remote one, you need to iterate over your other dependencies and also download and modify any of them which also point to that same “foo”. For this reason, it makes a lot more sense to just either have one big project, or maybe some kind of easy switch to toggle between local/development or remote/stable (I’ve seen lots of projects that move their deps into a bzl file instead of WORKSPACE, and generally assume that this is why that is done, so you can share those, like maven poms? https://docs.bazel.build/versions/master/external.html#transitive-dependencies and the rest of the file discuss this a bit, but I haven’t found any “best practices” docs that really dig in to this topic).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot 'bazel build' master · Issue #8053 - GitHub
I've worked around the issue by adding build --sandbox_block_path=/usr/local to my .bazelrc per @philwo above, but it seems suboptimal that ...
Read more >
Build programs with Bazel
This page covers how to build a program with Bazel, build command syntax, and target pattern syntax. Quickstart. To run Bazel, go to...
Read more >
unable to to run bazel build command - Stack Overflow
I m trying to execute handtracking android app using bazel and when I run the build command I get this error :.
Read more >
Problem getting bazel go rules to build projects in external ...
Because the project itself has a go_prefix set, the go protobuf project can't build the protoc-gen-go binary. That binary imports packages under ...
Read more >
IntelliJ IDEA Setup - Gerrit Code Review
If your project's Bazel build fails with Cannot run program "bazel": No such file or directory, then you may have to set the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found