-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Using optional dependency features (`package?/feature`) in Cargo is not too well supported, see: rust-lang/cargo#10801 So instead we now always enable needed features of optional dependencies. This fixes #656. I thought this would be a harder trade-off (e.g. I thought that we'd have to enable a bunch of sub-dependencies for each dependency, and that wouldn't be nice since I'd prefer to have each crate as explicitly imported as possible), but it actually turned out to not be too bad, only a few crates actually enable sub-crates of their dependencies, and then it's usually `objc2-core-foundation`. Additionally, I've cleaned up a lot of our feature handling, which: - Fixes dependent features. - Removes unnecessary imports. - Fixes the last part of #640. There are still a few errors found by `check_framework_features` (esp. regarding the `objc2` feature), but those can be fixed later.
- Loading branch information
Showing
116 changed files
with
3,205 additions
and
4,184 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ authors = ["Mads Marquart <[email protected]>", "Mary <[email protected]>"] | |
workspace = true | ||
|
||
[dependencies] | ||
bitflags = { version = "2.5.0", default-features = false } | ||
bitflags = { version = "2.5.0", default-features = false, features = ["std"] } | ||
block2 = { path = "../block2", version = "0.5.1", default-features = false, optional = true, features = ["alloc"] } | ||
libc = { version = "0.2.80", default-features = false, optional = true } | ||
objc2 = { path = "../objc2", version = "0.5.2", default-features = false, optional = true, features = ["std"] } | ||
|
@@ -40,7 +40,7 @@ targets = [ | |
|
||
[features] | ||
default = ["std"] | ||
std = ["alloc", "bitflags/std"] | ||
std = ["alloc"] | ||
alloc = [] | ||
block2 = ["dep:block2"] | ||
libc = ["dep:libc"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.