Skip to content

Commit 1ca3e62

Browse files
authored
Merge pull request #5 from epage/flags
Document feature flags drawbacks
2 parents 1f62468 + 01d37b2 commit 1ca3e62

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
@@ -189,6 +189,17 @@ Furthermore, usernames are not immutable, and that can lead to a whole host of i
189189

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

192+
## Feature Flags
193+
194+
This proposal allows for optional subsystems. This can be created today with feature flags by adding a dependency as optional and re-exporting it.
195+
196+
Draw backs to feature flags
197+
- Solutions for documenting feature flags are limited
198+
- Feature flags can be cumbersome to work with for users
199+
- A semver breakage in the optional-subsystem crate is a semver breakage in the namespace crate
200+
- The optional-subsystem crate cannot depend on the namespace crate
201+
- 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)
202+
192203
# Prior art
193204

194205
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)