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

sort: unknown lint clippy::suspicious_open_options on OpenBSD #6290

Closed
lcheylus opened this issue Apr 29, 2024 · 2 comments · Fixed by #6292
Closed

sort: unknown lint clippy::suspicious_open_options on OpenBSD #6290

lcheylus opened this issue Apr 29, 2024 · 2 comments · Fixed by #6292
Labels

Comments

@lcheylus
Copy link
Contributor

On OpenBSD stable (current version 7.5), Rust version = 1.76.0

During CI lint with cargo clippy, I have the error unknown lint: clippy::suspicious_open_options in src/uu/sort/src/sort.rs, line 254.

Indeed, the check for suspicious_open_options is supported only with Rust >= 1.77.0 => https://rust-lang.github.io/rust-clippy/master/index.html#/suspicious_open_options

On OpenBSD 7.5 with Rust 1.76, this check must be disabled in src/uu/sort/src/sort.rs.

@tertsdiepraam
Copy link
Member

This feels kind of like something we could just ignore for now. With clippy we just follow stable and even with this warning it still compiles and they might even upgrade fairly soon and then the warning will disappear.

@lcheylus
Copy link
Contributor Author

I'm working to add CI for OpenBSD, based on vmactions/openbsd-vm. This action uses OpenBSD stable (current = 7.5) version.

rustup is not supported on OpenBSD :( and I need to install the rustc/cargo packages from OpenBSD ports. rustc/cargo version = 1.76 on OpenBSD stable/7.5 and will not be updated before the next stable release (future version 7.6, release ~ October 2024).

To have a working "Style/Lint" job on OpenBSD, I need to disable clippy::suspicious_open_options in src/uu/sort/src/sort.rs on OpenBSD. Otherwise, my "Style/Lint" job fails on OpenBSD.

I will push a PR to fix this issue (tested on OpenBSD and FreeBSD in my forked repo).

lcheylus added a commit to lcheylus/rust-coreutils that referenced this issue Apr 30, 2024
- Avoid error on OpenBSD stable/7.5 with clippy (lint)
- suspicious_open_options added in Rust 1.77.0 (1.76 used on OpenBSD 7.5)
  https://rust-lang.github.io/rust-clippy/master/index.html#/suspicious_open_options

Fix uutils#6290

Signed-off-by: Laurent Cheylus <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants