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

Minimise recipe.json when cargo chef prepare is called with a --bin flag #208

Open
LukeMathWalker opened this issue Apr 19, 2023 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@LukeMathWalker
Copy link
Owner

cargo-chef slims down the workspace members to just the specified binary when cargo chef prepare is invoked with a --bin flag.
At the moment (see #207) we still keep around ALL other local manifests, in case the binary depends on another one of the local crates via a path dependency.
To maximise cache reuse, we could be more sophisticated: only include in the recipe.json file the manifests of the local crates that are in the dependency closure of the specified binary target.

@LukeMathWalker LukeMathWalker added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Apr 19, 2023
@markdingram
Copy link
Contributor

I think this would follow on nicely from #169

An earlier version had a "collect_local_packages" that walked down from the workspace_packages collecting all local manifests
585a0f5

Realised that wasn't necessary for #169, but it could serve as the basis for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants