Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent installing
crossbeam-channel
withdefault-features="false"
#550Prevent installing
crossbeam-channel
withdefault-features="false"
#550Changes from all commits
ab0c6fd
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason for masquerading the notify features? We simply let user specify them in their own cargo toml until now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the past, debouncers used
notify
with default features, includingcrossbeam-channel
andmacos_fsevents
-- even if default features were disabled by the user on both the debouncer and the notify direct dependency.Users were effectively unable to disable
crossbeam-channel
onnotify
when using a debouncer.This change sets the debouncers'
notify
dependency todefault-features = false
, to allow users to even disable them at all.However, leaving it at that would break compatibility for MacOS users, as
macos_fsevent
would no longer be enabled by default.Therefore, this change to the debouncers' feature set makes
notify
's default features their own, to keep the existing behavior, where debouncers with default features includenotify
with default features.Some details - skip if you like:
The reasoning has two parts: 1. Not breaking MacOS use by enabling
macos_fsevent
by default, as it used to be, and 2. convenience of pass through for ease of configuration for library users.I made this change so that a missing
macos_fsevent
does not break MacOS use wherenotify
default features used to be enabled when using a debouncer:The debouncers now disable
notify
's default features to fix the described issue.However, this causes
macos_fsevents
to be disabled by default. For compatibility, it needs to be kept enabled.Therefore, the debouncers need to include
macos_fsevent
in their default features.As a library user, I would want
notify
default features (crossbeam-channel
+macos_fsevent
) to work as they did before, but be able to disable them.I made this change so that
macos_fsevent
andmacos_kqueue
can make use of the convenient feature pass-through which had previously been available only forcrossbeam-channel
:If a MacOS user depends on one of the debouncers, they can define e.g.
notify-debouncer-full = { version = "*", default-features = false, features = ["macos_kqueue"] }
without having to addnotify
as a direct dependency.The debouncers' and the underlying
notify
's features must match (seecrossbeam
feature). The easiest way to make them match is to make users define them only on the debouncers.If the
macos_fsevent
pass-through is removed (Breaking!), then probably themacos_kqueue
andcrossbeam
(Breaking!) pass-through features should be removed as well.To my mind, it seems intransparent and error prone to require users to add a second explicit dependency just to enable some feature flags. As a library user, I would prefer to have all three pass-throughs available.