-
Notifications
You must be signed in to change notification settings - Fork 31
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
Fix building packages with bin targets #68
base: main
Are you sure you want to change the base?
Conversation
I have a cross-platform application that needs to build a bin target on Windows, macOS, and Linux (at minimum). `cargo-apk` attempts to build my bin target as a `cdylib`, and explodes after signing: ``` thread 'main' panicked at /home/jay/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-subcommand-0.12.0/src/artifact.rs:51:23: Bin is not compatible with Cdylib stack backtrace: 0: rust_begin_unwind 1: core::panicking::panic_fmt 2: cargo_subcommand::artifact::Artifact::file_name 3: cargo_subcommand::subcommand::Subcommand::artifact 4: cargo_apk::apk::ApkBuilder::build 5: cargo_apk::main note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. ``` This fixes the panic by filtering artifacts to only build libraries.
This should strictly be unrelated? That user/comment is trying to reuse the same target as multiple crate types, which is not valid. It sounds like you have multiple targets of differing types defined in the same crate instead? How are you invoking A few more thoughts:
|
Yes, this is what happens when you have both
I wasn't aware of this argument. Can I ask the corollary question to understand the purpose of I cannot answer your remaining questions because of this confusion:
The error makes it clear that passing the cargo-apk/cargo-apk/src/apk.rs Line 223 in caa8062
Furthermore, only Given this, I cannot fathom how |
That is however no longer an issue when (not if, because we've already proven this is possible)
Both |
I think I see. You are arguing to move the filtering into I still don’t know what it means to “translates |
I don't really care where the filtering happens - just explained why |
The reason examples are filtered is because Can you provide any existing code bases where |
I have a cross-platform application that needs to build a bin target on Windows, macOS, and Linux (at minimum).
cargo-apk
attempts to build my bin target as acdylib
, and explodes after signing the first artifact:This fixes the panic by filtering artifacts to only build libraries.
I couldn't find an open issue for this, but there is a related comment in #23 (comment)