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

universal2-apple-darwin panics under workspace #230

Open
elringus opened this issue Mar 6, 2024 · 2 comments
Open

universal2-apple-darwin panics under workspace #230

elringus opened this issue Mar 6, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@elringus
Copy link

elringus commented Mar 6, 2024

When building with --target=universal2-apple-darwin under workspace:

thread 'main' panicked at src/build.rs:79:48:
Should have a root package                   
stack backtrace:                             
   0: rust_begin_unwind                                                                            
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:645:5 
   1: core::panicking::panic_fmt                                                                   
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:72:14
   2: core::panicking::panic_display                                                               
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:178:5
   3: core::panicking::panic_str                                                                   
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:152:5
   4: core::option::expect_failed
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/option.rs:1985:5
   5: cargo_zigbuild::build::Build::execute
   6: cargo_zigbuild::main

This is probably due to universal2-apple-darwin being handled separately from other targets and it expects root package, which doesn't exist in workspace projects:

let root_pkg = metadata.root_package().expect("Should have a root package");

@messense messense added the bug Something isn't working label Mar 7, 2024
@messense
Copy link
Member

messense commented Mar 7, 2024

This doesn't look like an easy fix, does passing --manifest-path work for you?

@elringus
Copy link
Author

elringus commented Mar 7, 2024

This doesn't look like an easy fix, does passing --manifest-path work for you?

This works, but each crate in the workspace has to be build separately, as only one manifest can be specified at a time. Not a big deal though, thanks for the hint!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants