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

Only run cargo build once when cargo libcnb package is run in monorepo root #649

Open
edmorley opened this issue Aug 19, 2023 · 0 comments
Labels
enhancement New feature or request faster compiles Things that improve compile times libcnb-cargo libcnb-package

Comments

@edmorley
Copy link
Member

edmorley commented Aug 19, 2023

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.

@edmorley edmorley added enhancement New feature or request libcnb-cargo libcnb-package faster compiles Things that improve compile times labels Aug 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request faster compiles Things that improve compile times libcnb-cargo libcnb-package
Projects
None yet
Development

No branches or pull requests

1 participant