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

Cannot build node_binary depending on firebase module. #62

Open
iphydf opened this issue Feb 18, 2018 · 2 comments
Open

Cannot build node_binary depending on firebase module. #62

iphydf opened this issue Feb 18, 2018 · 2 comments

Comments

@iphydf
Copy link

iphydf commented Feb 18, 2018

WORKSPACE:

RULES_NODE_COMMIT = "56eadbd6e7545411e740d97fe1741c56dab42285"

http_archive(
    name = "org_pubref_rules_node",
    sha256 = "9ed54e5fda5154aeff7b5ed51b85b83cbb630f70178ca1a1798af671c6cf945c",
    strip_prefix = "rules_node-%s" % RULES_NODE_COMMIT,
    url = "https://github.com/pubref/rules_node/archive/%s.zip" % RULES_NODE_COMMIT,
)

load("@org_pubref_rules_node//node:rules.bzl", "node_repositories", "yarn_modules")

node_repositories()

yarn_modules(
    name = "yarn_firebase",
    deps = {"firebase": "4.9.1"},
)

BUILD: any node_binary with deps = ["@yarn_firebase//:_all_"].

@iphydf
Copy link
Author

iphydf commented Feb 18, 2018

_bin/build-runfiles (args bazel-out/k8-fastbuild/bin/cedar/backend/run.runfiles_manifest bazel-out/k8-fastbuild/bin/cedar/backend/run.runfiles): link or target filename contains space on line 6: 'toktok/cedar/backend/run_files/node_modules/@firebase/app/coverage/browser/HeadlessChrome 0.0.0 (Linux 0.0.0)/lcov.info /usr/local/home/iphy/.cache/bazel/_bazel_iphy/87c462f2b35b8d3dfe6f6c21308fd127/execroot/toktok/bazel-out/k8-fastbuild/bin/cedar/backend/run_files/node_modules/@firebase/app/coverage/browser/HeadlessChrome 0.0.0 (Linux 0.0.0)/lcov.info'

@pcj
Copy link
Contributor

pcj commented Feb 18, 2018

Known issue: bazelbuild/bazel#374

Wondering what the transitive dependency chain from firebase to headless chrome is. Clearly one does not actually need headless chrome to use the firebase node api. It may be a bug or design flaw in rules_node that puts the headless chrome dependency in _all_.

As a workaround, I'd try naming the deps more narrowly than _all_. You can query the available ones via bazel query @yarn_firebase//:* or less $(bazel info output_base)/external/yarn_firebase/BUILD.bazel

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

2 participants