guppy-rs/guppy

hakari: re-compilation problem about build-dependencies

xxchan opened this issue · 1 comments

xxchan commented

By default, hakari will produce [build-dependencies] (I haven't learned why yet), but I found this will probably make a dependency compiled twice (under --release). This is because build-dependencies have different build profile configs

To compile quickly, all profiles, by default, do not optimize build dependencies

https://doc.rust-lang.org/cargo/reference/profiles.html#build-dependencies

@sunshowers Are you aware of this issue? I'm wondering what's the best practice. Is it better to remove build-dependencies in workspace-hack, or set profile.release.build-override 🤔

Thanks for reporting this! That's definitely an annoying issue and I wasn't aware of it.

Hakari produces build dependencies because what it cares about is dependencies built on the host platform.

I don't plan to work on this unless my employer runs into it. However if you or someone else would like to think through and put together a plan, it would be really appreciated.