Skip to content
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

Replace clipboard with copypasta #606

Closed
wants to merge 3 commits into from
Closed

Conversation

nibon7
Copy link
Contributor

@nibon7 nibon7 commented Jul 18, 2023

This PR tries to replace clipboard with copypasta. clipboard is unmaintained and xcb that clipboard depends on has a rustsec advisory.

Crate:     xcb
Version:   0.8.2
Title:     Multiple soundness issues
Date:      2021-02-04
ID:        RUSTSEC-2021-0019
URL:       https://rustsec.org/advisories/RUSTSEC-2021-0019
Solution:  Upgrade to >=1.0
Dependency tree:
xcb 0.8.2
└── x11-clipboard 0.3.3
    └── clipboard 0.5.0
        └── reedline 0.21.0

Crate:     clipboard
Version:   0.5.0
Warning:   unmaintained
Title:     clipboard is Unmaintained
Date:      2022-06-25
ID:        RUSTSEC-2022-0056
URL:       https://rustsec.org/advisories/RUSTSEC-2022-0056
Dependency tree:
clipboard 0.5.0
└── reedline 0.21.0

Crate:     xcb
Version:   0.8.2
Warning:   unsound
Title:     Soundness issue with base::Error
Date:      2020-12-10
ID:        RUSTSEC-2020-0097
URL:       https://rustsec.org/advisories/RUSTSEC-2020-0097
Severity:  5.5 (medium)

Copy link
Member

@amtoine amtoine left a comment

Choose a reason for hiding this comment

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

this looks like a super simple change!
if that's a more maintained library that does basically the same thing with the same API and that others are ok with it, then i'm ok with it 😌

@sholderbach
Copy link
Member

Mhh what gives me pause is that this adds a ton of dependencies (I understand that there may be additional work to support wayland as well but that list seems a bit excessive)

From a pure nushell perspective we could simply drop the system clipboard support in reedline as we don't actually use it or enable the feature. Not sure if the community at large depends on it.

@nibon7
Copy link
Contributor Author

nibon7 commented Jul 19, 2023

Most of the dependencies are pulled by wayland feature.

crate features # dependencies
clipboard N/A 135
copypasta x11 141
copypasta x11+wayland 159

@fdncred
Copy link
Collaborator

fdncred commented Jan 14, 2024

We're close to landing #689 so we're going to need some type of replacement so nushell's CI will go green. Also mentioned here nushell/nushell#11535. There's also a failing test with the system_clipboard feature that I noticed the other day.

Maybe @Tastaturtaste and/or @nibon7 can figure out which is the best clipboard replacement for our needs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants