-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Transitive workspace dependencies not working #2757
Comments
I can manually add the following to make the bazel_issue_repro/WORKSPACE file and it works, but I'm wondering if there's a better way to accomplish what I want without having users of the msp430 rules configure this in their WORKSPACE: (notice the
|
Unfortunately, heirarchical workspace files are not supported, yet (which is what you're trying to accomplish). See #1943 for the relevant bug. For now, you do have to specify all repositories. One thing you can do to make your users lives a little easier (possibly) is define a skylark function in msp430_rules like
Then the user can load() and execute that function in their WORKSPACE file. |
(As reference for others) def io_bazel_rules_closure():
native.local_repository(
name = "io_bazel_rules_closure",
path = ".../jart/code/rules_closure",
)
load("@io_bazel_rules_closure//closure:defs.bzl", "closure_repositories")
# Not going to work
closure_repositories(...) This is accounted for feature request #1943, as @kchodorow mentioned. |
Hi there! We're doing a clean up of old issues and will be closing this one. Please reopen (or ping me to reopen) if you’d like to discuss anything further. We’ll respond as soon as we have the bandwidth/resources to do so. |
Description of the problem / feature request / question:
I have a github repo/workspace where I define some new rules in https://github.com/sergiocampama/bazel-msp430. This github repo has 2 dependencies on external binaries using the new_http_archive repository rules, which can be seen in https://github.com/sergiocampama/bazel-msp430/blob/master/WORKSPACE.
I am trying to create a development WORKSPACE where I import the bazel-msp430 rules using the git_repository repository rule in https://github.com/sergiocampama/bazel_issue_repro/blob/master/WORKSPACE. I then load the Skylark extensions using
load("@msp430_rules//tools/msp430:build_defs/msp430.bzl", "msp430_library")
in https://github.com/sergiocampama/bazel_issue_repro/blob/master/BUILDWhen I run bazel build :test, the build fails with the error:
If possible, provide a minimal example to reproduce the problem:
The easiest way to repro is to
git clone git@github.com:sergiocampama/bazel_issue_repro.git && cd bazel_issue_repro && bazel build :test
Environment info
Operating System: macOS 10.12.4 Beta
Bazel version (output of
bazel info release
): release 0.4.5-homebrewHave you found anything relevant by searching the web?
I tried using the steps in https://bazel.build/versions/master/docs/external.html, but the following command generates empty WORKSPACE and BUILD files.
The text was updated successfully, but these errors were encountered: