Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ exclude = ["data"]
resolver = "2"

[features]
default = ["recovery", "log-trace"]
default = ["recovery", "log-trace", "crossbeam-channel"]
recovery = ["sysinfo"]
log-trace = [] # test only
log-debug = [] # test only
crossbeam-channel = ["notify/default"]
no-crossbeam-channel = ["notify/macos_kqueue"]

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, what has made me a bit uneasy was this: every time we compile for a MacOS target we would have to use this no-crossbeam-feature? Could we use [target.'cfg(target_os = "macos")'.dependencies] instead? (I have googled and it says this is a bit broken, but at least worth a shot. Else, could we use. cfg in the code directly?)

@raphaelcoeffic raphaelcoeffic Feb 24, 2024

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about that at first, and it did work as well, but I believe it is actually related to using the tokio runtime rather than macOS. I did not test this under Linux though to confirm if this really the case.

The reason why it is needed to require kqueue is because notify does not provide a default for macOS if you don't use the default feature.


[dependencies]
notify = "5.1.0"
notify = { version = "5.1.0", default-features = false }
log = "0.4.17"
sysinfo = { version = "0.28.0", default-features = false, optional = true }
futures = "0.3.26"
Expand Down