Only run cargo build
once when cargo libcnb package
is run in monorepo root
#649
Labels
enhancement
New feature or request
faster compiles
Things that improve compile times
libcnb-cargo
libcnb-package
Currently if
cargo libcnb package
is run in the root of a CNB monorepo,cargo build
is called multiple times - since it's run inside each buildpack directory, rather than being run once at the root of the repo.As seen in eg:
https://github.com/heroku/buildpacks-jvm/actions/runs/5808991441/job/15746907911#step:9:14
This:
(a) causes Cargo to have to do extra work (since when building in single-crate mode, some things are repeated),
(b) likely means there is less efficient concurrent compilation, given that the Cargo job scheduler can't balance all crate compiles at once, but only groups of them in isolation.
The text was updated successfully, but these errors were encountered: