-
Notifications
You must be signed in to change notification settings - Fork 104
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
build script support does not handle cargo: stdout msgs #160
Comments
@mobileink Recently the build script handling have been updated and this should now works. |
I recently encountered the same problem, where |
@d-asnaghi: with which version of rules_rust and cargo-raze? |
Below you can find WORKSPACE and cargo raze info. Thanks @damienmg WORKSPACE http_archive(
name = "io_bazel_rules_rust",
sha256 = "13592b2073a2d9b00bf246eecb7c0da8f4c80b072b52fb7243881b6409e89764",
strip_prefix = "rules_rust-69f71a92531f29eee032447098bc264eb9bece83",
urls = ["https://github.com/bazelbuild/rules_rust/archive/69f71a92531f29eee032447098bc264eb9bece83.tar.gz"],
)
http_archive(
name = "bazel_skylib",
sha256 = "9a737999532daca978a158f94e77e9af6a6a169709c0cee274f0a4c3359519bd",
strip_prefix = "bazel-skylib-1.0.0",
url = "https://github.com/bazelbuild/bazel-skylib/archive/1.0.0.tar.gz",
)
load("@io_bazel_rules_rust//rust:repositories.bzl", "rust_repositories")
rust_repositories()
load("@io_bazel_rules_rust//:workspace.bzl", "bazel_version")
bazel_version(name = "bazel_version") Cargo raze $> cargo show cargo-raze
---
id: cargo-raze
name: cargo-raze
description: A Cargo subcommand to generate Bazel BUILD files
documentation: None
homepage: None
repository: https://github.com/google/cargo-raze
max_version: 0.3.8
downloads: 10287
license: None
created: 2017-05-05T01:10:04.876511+00:00
updated: 2020-07-10T16:44:45.140499+00:00 |
Humm this is all very recent and should deal with that no issue, Can you share the cargo.toml (or even the files generated by cargo raze)? It is likely that the problem is the build.rs file stalling but I would need a repro to debug it. (also sorry for the delay, I am currently really busy with my main task at Google so my 20% have to be less than 20%). |
Here's the cargo [package]
name = "Application"
version = "0.0.1"
[lib]
path = "fake_lib.rs"
[dependencies]
rusb = "0.6"
byte_struct = "0.6.0"
[raze]
workspace_path = "//cargo"
output_buildfile_suffix = "BUILD.bazel"
default_gen_buildrs = true |
Hi sorry for the delay. I cannot make this cargo.toml works:
Got that on both Linux & macOS. |
The build hangs may have been caused by the issue fixed in bazelbuild/rules_rust#434 |
It looks like the current code is designed only to handle the case of passing files. Build scripts that emit e.g. cargo:rustc-env don't work. An example from crates.io is typenum 1.12.0.
Any plans to address this?
The text was updated successfully, but these errors were encountered: