-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed as not planned
Closed as not planned
Copy link
Labels
A-build-scriptsArea: build.rs scriptsArea: build.rs scriptsA-profilesArea: profilesArea: profilesC-bugCategory: bugCategory: bugS-needs-team-inputStatus: Needs input from team on whether/how to proceed.Status: Needs input from team on whether/how to proceed.
Description
Problem
I am compiling tag v1.121.0 of https://github.com/deltachat/deltachat-core-rust with command cargo build
. It compiles aho-corasick v1.0.2
dependency twice, once as a dependency and once as a build dependency, resulting in two .rlib
field being produced and actually slowing down the build process rather than speeding it up as intended by the build-override feature.
Steps
- Clone https://github.com/deltachat/deltachat-core-rust, tag v1.121.0, commit a8551510cdb5be7a35ebd3574df79d15a4fa471a
- Run
cargo build -v
. - Observe
aho-corasick v1.0.2
dependency being compiled twice. Once as a proper dependency with-C panic=abort
as specified in the manifest, and once as a build dependency without-C panic=abort
. - Try to specify
panic='abort'
in the[profile.dev.build-override]
section ofCargo.toml
as a workaround, it results in an error "panic
may not be specified in abuild-override
profile".
Possible Solution(s)
Do not apply build-override
to dependencies that are actual dependencies of the project? Or allow to disable build-override completely.
Notes
I wrote a longer thread with my observations of the build times and duplicate builds of dependencies at https://users.rust-lang.org/t/same-dependency-has-four-different-debug-fingerprints/99580
Version
$ cargo version --verbose
cargo 1.72.0
release: 1.72.0
host: x86_64-unknown-linux-gnu
libgit2: 1.6.4 (sys:0.17.2 vendored)
libcurl: 8.2.1 (sys:0.4.63+curl-8.1.2 system ssl:OpenSSL/3.1.2)
os: Arch Linux [64-bit]
kornelski
Metadata
Metadata
Assignees
Labels
A-build-scriptsArea: build.rs scriptsArea: build.rs scriptsA-profilesArea: profilesArea: profilesC-bugCategory: bugCategory: bugS-needs-team-inputStatus: Needs input from team on whether/how to proceed.Status: Needs input from team on whether/how to proceed.