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

mir-json does not work with cargo workspaces #51

Open
TomMD opened this issue Aug 3, 2023 · 2 comments
Open

mir-json does not work with cargo workspaces #51

TomMD opened this issue Aug 3, 2023 · 2 comments
Labels

Comments

@TomMD
Copy link

TomMD commented Aug 3, 2023

$ cargo crux-test
thread 'main' panicked at 'error building workspace: failed to parse manifest at `/..../crucible/crux-mir/example/ffs/Cargo.toml`', src/bin/cargo_test_common.rs:86:29
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

From:

diff --git a/crux-mir/example/ffs/Cargo.toml b/crux-mir/example/ffs/Cargo.toml
index dee0e1310..a7dece731 100644
--- a/crux-mir/example/ffs/Cargo.toml
+++ b/crux-mir/example/ffs/Cargo.toml
@@ -7,6 +7,7 @@ edition = "2018"
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

 [dependencies]
+byteorder = { workspace = true }

 [lib]
 path = "lib.rs"

And a new file at example/Cargo.toml of:

[workspace]
members = [ "ffs" ]

[workspace.dependencies]
byteorder = "1.4.3"
@RyanGlScott
Copy link
Contributor

Curiously, this is the part of mir-json that is panicking:

    let ws = args.workspace(&config)
        .unwrap_or_else(|e| panic!("error building workspace: {}", e));

I'd need to look more closely at what workspace() is doing to tell why it's misbehaving. (Sadly, this function lacks any doc comments.)

@RyanGlScott
Copy link
Contributor

I'll go ahead and transfer this issue over to the mir-json repo, as I'm fairly confident the issue lies in mir-json rather than in Crux.

I tried reading the source code for workspace() a bit, but I wasn't able to get much insight into what is going on. I'll likely need to build cargo from source (+ some additional debug printing) to figure out why workspace() is returning Err here.

@RyanGlScott RyanGlScott transferred this issue from GaloisInc/crucible Aug 15, 2023
@RyanGlScott RyanGlScott changed the title crux-mir does not work with cargo workspaces mir-json does not work with cargo workspaces Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants