fix: Fix compilation failures when not enabling default features#1162
fix: Fix compilation failures when not enabling default features#1162
Conversation
Techassi
left a comment
There was a problem hiding this comment.
Blocking this for now, because I think this is the wrong approach to this issue.
|
These changes unblock I will do some research on how we can better detect this kind of stuff in the future. https://github.com/obi1kenobi/cargo-semver-checks might be the right tool for this job (and many others). |
|
I quickly tried My PR also simplified the features quite a bit, it e.g. removed the This PR solves all to me known problems and reduces complexity and is less error-prone. It also adds CI checks. So I personally would prefer to move along with it (happy to do some tweaks if needed). |
Techassi
left a comment
There was a problem hiding this comment.
Pretty much ready to go, just three minor comments.
This reverts commit 1e0cde4. It failed compilation, as it always compiles both branches, which fails when the crds feature is not enabled.
Needed for stackabletech/containerdebug#52
Problem
Some of our crates (notable stackable-operator) produce lot's of compilation errors when being pulled in with no default features, e.g.
produces
error: could not compile stackable-operator (lib) due to 237 previous errorsstackable-telemetry is even worse, as it is broken using default features:
causes
Fix
This PR fixes the stackable-operator and stackable-telemetry by making mandatory features actually mandatory.
I also added pre-commit checks to prevent this from happening again.
With this fix I can now pull in exactly what I need in containerdebug:
Definition of Done Checklist
Author
Reviewer
Acceptance