You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use Rudra on a project structured in a workspace. In this workspace there are libraries that have dependencies to libraries from the same workspace. These are specified with relative paths. This causes Rudra to fail. The problem seems to be the dependencies that are specified by a path.
Minimal example: cargo new library --lib ; cargo new user
In user/Cargo.toml add
[dependencies]
library = { path = "../library" }
Running Rudra causes this error where erroneously library is assumed to be in /tmp?
vogel@cloud1:/opt/tmp/vogel/static-analysis/Rudra/docker-helper$ ./docker-cargo-rudra /opt/tmp/vogel/static-analysis/hello_world/user/
2021-09-03 11:25:52.536262 |INFO | [rudra-progress] Running cargo rudra
2021-09-03 11:25:52.871481 |ERROR| [rudra-progress] Could not obtain Cargo metadata
Error during execution of `cargo metadata`: error: failed to get `library` as a dependency of package `user v0.1.0 (/tmp/rudra)`
Caused by:
failed to load source for dependency `library`
Caused by:
Unable to update /tmp/library
Caused by:
failed to read `/tmp/library/Cargo.toml`
Caused by:
No such file or directory (os error 2)
When specifying the library dependency as a absolute path (library = { path = "/opt/tmp/vogel/static-analysis/hello_world/library" }) I get the same error without the /tmp issue. It still fails to read the library Cargo.toml, even though it should exist (see cat output).
vogel@cloud1:/opt/tmp/vogel/static-analysis/Rudra/docker-helper$ ./docker-cargo-rudra /opt/tmp/vogel/static-analysis/hello_world/user/
2021-09-03 11:21:57.305532 |INFO | [rudra-progress] Running cargo rudra
2021-09-03 11:21:57.973875 |ERROR| [rudra-progress] Could not obtain Cargo metadata
Error during execution of `cargo metadata`: error: failed to get `library` as a dependency of package `user v0.1.0 (/tmp/rudra)`
Caused by:
failed to load source for dependency `library`
Caused by:
Unable to update /opt/tmp/vogel/static-analysis/hello_world/library
Caused by:
failed to read `/opt/tmp/vogel/static-analysis/hello_world/library/Cargo.toml`
Caused by:
No such file or directory (os error 2)
vogel@cloud1:/opt/tmp/vogel/static-analysis/Rudra/docker-helper$ cat /opt/tmp/vogel/static-analysis/hello_world/library/Cargo.toml
[package]
name = "library"
version = "0.1.0"
authors = ["Arne Vogel <>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
The text was updated successfully, but these errors were encountered:
Hmm, docker-cargo-rudra is not really meant to handle relative dependencies (it only mounts the crate folder under Docker). For this use case I'd suggest installing rudra on the host machine as per these instructions and trying with that: https://github.com/sslab-gatech/Rudra/blob/master/DEV.md
I am trying to use Rudra on a project structured in a workspace. In this workspace there are libraries that have dependencies to libraries from the same workspace. These are specified with relative paths. This causes Rudra to fail. The problem seems to be the dependencies that are specified by a path.
This might be related to #11
Minimal example:
cargo new library --lib ; cargo new user
In
user/Cargo.toml
addRunning Rudra causes this error where erroneously library is assumed to be in
/tmp
?When specifying the library dependency as a absolute path (
library = { path = "/opt/tmp/vogel/static-analysis/hello_world/library" }
) I get the same error without the/tmp
issue. It still fails to read the libraryCargo.toml
, even though it should exist (see cat output).The text was updated successfully, but these errors were encountered: