Skip to content

add collapsing features to debcargo/debcargo-conf

just brainstormed a bit with @silwol-guest on the train back home from FOSDEM. it might be nice to add functionality to debcargo (and subsequently use it for debcargo-conf) to handle crates with feature-bloat like web-sys better:

crate A with lots of features:

  • set 'collapse_features_for_debian' in debcargo.toml
  • will keep Cargo.toml as is, but only generate one binary package with provides for a fake feature with a special name instead of all the regular ones

crate B that depends on crate A:

  • set 'depends_with_collapsed_features: ["crate A"]
  • will keep Cargo.toml as is, but generate depends on just the one fake/injected feature package for crate A instead of all the automatically generated ones

obviously, this only works if all the features can be collapsed into a single one (but that could still be helped along if incompatibilities can be resolved by partial patching out of features). it would be possible to just collapse some features, but that would require keeping that mapping on both sides current, which is not much less hassle than just doing the collapsing by patching directly on both sides.

would that make sense or is it overkill since it is needed rarely, and manually patching is fine for those few cases even if they could be automatically handled like above?

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information