Replace clipboard with arboard, which is actively maintained #705
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.
Adresses #606 and this request
Replace
clipboard
dependency with arboard.Considerations
A look at crates.io shows that there are currently two major cross-platform clipboard crates to choose from:
copypasta
is maintained by thealacritty
project, which gives some confidence in the future maintenance story. Using this crate as a drop-in replacement forclipboard
works just from an API standpoint, but leads to failure ofcargo test --features system_clipboard core_editor::clip_buffer::tests::reads_back
on windows. This is due this bug andcopypasta
s outdated version ofclipboard-win
. While this issue could be worked around, it does not instill much confidence in me that future issues will be resolved and dependencies kept up-to-date.arboard
is actively maintained by a corporation depending on it and has roughly three times the number of downloads ofcopypasta
. While the API is not a drop-in replacement forclipboard
, the required changes are minimal.Dependencies
arboard
does pull in a few dependencies, mostly depending on the target OS. Many of the dependencies, likelog
,thiserror
,parking_lot
(on linux) are already present in reedline's dependency graph anyway. In additionHowever, as mentioned in #606, wayland support adds many dependencies to the list.
Number of unique dependencies for linux with system_clipboard enabled after cargo update:
current main: 53
arboard: 59
arboard + wayland: 99
Without having looked further into it
copypasta
also seems to pull in the majority of dependencies for wayland support. So I guess its mostly a wash in that department when comparing the alternatives.