frewsxcv / cargo-all-features

A Cargo subcommand to build and test all feature flag combinations.
Apache License 2.0
146 stars 20 forks source link

build-all-features uses all disk space in github actions #39

Open rbtcollins opened 1 year ago

rbtcollins commented 1 year ago

You can see in this run here : https://github.com/rust-lang/rustup/actions/runs/4909419719/jobs/8765812125?pr=3340 - cargo build-all-features used all the available disk space building rustup.

Different feature combinations turn on different feature sets for dependencies like tokio, and this results in many built-once, reused-never dependencies. Which apparently when repeated for enough features, used up all the disk space.

I realise it would be slower, but having an option to clean between builds would be super valuable for us at least

rbtcollins commented 1 year ago

I think this is due to rustup having a root package, and also explains what I see in issue 32

The current packages to test logic is only correct for a virtual manifest.

thenorili commented 12 months ago

I think this is due to rustup having a root package, and also explains what I see in issue 32

The current packages to test logic is only correct for a virtual manifest.

You're exactly right here. The Cargo Book doesn't explicitly say that a root package is implicitly added to the package list but it is.

I think it would be good to check the root manifest for package and add it to the package list if present, that way the typical -p rustup type syntax works just as well as the --root-only sugar. What do you think about that?

rbtcollins commented 6 months ago

That might work - ultimately though I do expect that some situations will have too many permutations to test without cleaning; so the -p rustup support would fix #32 , but not this one. I think.