Skip to content

Commit 01d37b2

Browse files
committed
Document feature flags drawbacks
This tries to summarize #3243 (comment).
1 parent 42046f8 commit 01d37b2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

text/0000-packages-as-optional-namespaces.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,17 @@ Furthermore, usernames are not immutable, and that can lead to a whole host of i
175175

176176
The primary goal of this RFC is for _project_ ownership, not _org_ ownership, so it doesn't map cleanly anyway.
177177

178+
## Feature Flags
179+
180+
This proposal allows for optional subsystems. This can be created today with feature flags by adding a dependency as optional and re-exporting it.
181+
182+
Draw backs to feature flags
183+
- Solutions for documenting feature flags are limited
184+
- Feature flags can be cumbersome to work with for users
185+
- A semver breakage in the optional-subsystem crate is a semver breakage in the namespace crate
186+
- The optional-subsystem crate cannot depend on the namespace crate
187+
- There is limited tooling for crate authors to test feature combinations especially in workspaces with feature unification and its slow (re-running all tests even if they aren't relevant)
188+
178189
# Prior art
179190

180191
This proposal is basically the same as https://internals.rust-lang.org/t/pre-rfc-packages-as-namespaces/8628 and https://internals.rust-lang.org/t/pre-rfc-idea-cratespaces-crates-as-namespace-take-2-or-3/11320 .

0 commit comments

Comments
 (0)