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

Bump MSRV to Rust 1.63.0 #102

Merged
merged 1 commit into from
Sep 9, 2024
Merged

Conversation

tcharding
Copy link
Member

@tcharding tcharding commented Sep 4, 2024

Rust 1.63.0 is in Debian stable, lets use it as our MSRV.

Includes:

  • move of msrv field in clippy.toml to rust-version field in Cargo.toml
  • required fuzz changes (toolchain, bump of hongfuzz version)
  • gets fields by grepping when generating the fuzz manifest
  • removes now unneeded pinning in CI script

And includes unrelated fix by adding unexpected_cfgs.

@tcharding
Copy link
Member Author

Needs #103

@tcharding tcharding mentioned this pull request Sep 4, 2024
@tcharding
Copy link
Member Author

Woops, the date in the branch name is wrong, I did not do this PR in the future.

@tcharding tcharding marked this pull request as draft September 4, 2024 02:12
@tcharding tcharding force-pushed the 09-04-bump-msrv branch 2 times, most recently from 9272e14 to 62c60f7 Compare September 4, 2024 02:19
Copy link
Collaborator

@Kixunil Kixunil left a comment

Choose a reason for hiding this comment

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

Concept ACK

@tcharding
Copy link
Member Author

Bloody hell, will try to fix tomorrow.

@tcharding tcharding force-pushed the 09-04-bump-msrv branch 3 times, most recently from 3073bb1 to 60fb573 Compare September 5, 2024 23:13
@tcharding
Copy link
Member Author

tcharding commented Sep 5, 2024

f**king generate-files.sh bit me again.

@tcharding
Copy link
Member Author

This fucking PR is starting to piss me off.

@tcharding
Copy link
Member Author

Compiler is version 1.58 even over in #106. Just kill me already :)

@tcharding
Copy link
Member Author

tcharding commented Sep 6, 2024

Phew, finally found it, all I needed was a breather and a good feed. FTR it was buried in the fuzz/Cargo.toml output of generate-files.sh.

clippy.toml Outdated
@@ -1 +1 @@
msrv = "1.56.1"
msrv = "1.63.0"
Copy link
Collaborator

Choose a reason for hiding this comment

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

This file should be no longer needed, clippy can read Cargo.toml

Copy link
Member Author

Choose a reason for hiding this comment

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

Cool, we can remove this all over the place if that is the case.

@@ -3,7 +3,7 @@
set -ex

FEATURES="std alloc serde"
MSRV="1\.48\.0"
MSRV="1\.63\.0"
Copy link
Collaborator

Choose a reason for hiding this comment

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

SSOT break. This should just read Cargo.toml.

Copy link
Member Author

Choose a reason for hiding this comment

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

If #106 gets support this doesn't matter because the file is deleted, can we leave it for now?

Copy link
Collaborator

Choose a reason for hiding this comment

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

OK, concept ACK doing #106

@@ -1,6 +1,7 @@
[package]
name = "hex-fuzz"
edition = "2018"
edition = "2021"
rust-version = "1.63.0"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wish we could pull these from workspace already... It's just one version away.


[lints.rust]
unexpected_cfgs = { level = "deny", check-cfg = ['cfg(fuzzing)'] }
EOF
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is unrelated but not a big deal.

Copy link
Member Author

@tcharding tcharding Sep 6, 2024

Choose a reason for hiding this comment

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

Ah yes, you are correct, my bad. Will leave them in now.

@@ -11,7 +11,8 @@ source "$REPO_DIR/fuzz/fuzz-util.sh"
cat > "$REPO_DIR/fuzz/Cargo.toml" <<EOF
[package]
name = "hex-fuzz"
edition = "2018"
edition = "2021"
rust-version = "1.63.0"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since this is generated we should pull the value from single source.

Copy link
Member Author

Choose a reason for hiding this comment

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

Unrelated to this PR, right? Can we just put this in, I spent way too long on this extremely annoying PR already.

Copy link
Collaborator

Choose a reason for hiding this comment

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

It's literally just replacing the line with $(grep '^rust-version ' "$REPO_DIR/Cargo.toml")

@tcharding
Copy link
Member Author

Please see new PR description.

Rust 1.63.0 is in Debian stable, lets use it as our MSRV.

Includes:

- removal of clippy config file, allegedly no longer needed
- required fuzz changes (toolchain, bump of `hongfuzz` version)
- gets fields by grepping when generating the fuzz manifest
- removes now unneeded pinning in CI script

And includes unrelated fix by adding `unexpected_cfgs`.
@Kixunil
Copy link
Collaborator

Kixunil commented Sep 9, 2024

I've modified the description to better describe what's going on.

Copy link
Collaborator

@Kixunil Kixunil left a comment

Choose a reason for hiding this comment

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

ACK 5cd37e3

runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout Crate
uses: actions/checkout@v3
- name: Checkout Toolchain
uses: dtolnay/rust-toolchain@1.56.1
uses: dtolnay/rust-toolchain@1.63.0
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not going to hold this because the PR is blocking a bunch of other work but this should be read from Cargo.toml in a previous step.

Copy link
Member Author

Choose a reason for hiding this comment

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

Holla if you can think of a better way of tracking issues across "core crates": rust-bitcoin/rust-bitcoin#3335

Copy link
Collaborator

Choose a reason for hiding this comment

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

There are org-wide "projects" but I'm not sure if it's the right tool.

@tcharding
Copy link
Member Author

tcharding commented Sep 9, 2024

Thanks, FWIW I did try to look up the clippy thing and couldn't find any docs, I did not want to claim something that I had not verified.

@Kixunil
Copy link
Collaborator

Kixunil commented Sep 9, 2024

I could find it easily: https://doc.rust-lang.org/nightly/clippy/lint_configuration.html#msrv

I just put rust clippy configuration "rust-version" to google to verify that clippy is reading the field and the reason I came up with the idea to check it directly is that it's absolutely sensible/expected for clippy to read it.

@tcharding
Copy link
Member Author

Lol, my search-foo needs improving.

@tcharding
Copy link
Member Author

Oh and its because we didn't have a rust-version until we started using edition 2021.

@Kixunil
Copy link
Collaborator

Kixunil commented Sep 9, 2024

It's not tied to edition, just to Rust version. But I don't remember which stabilized it and don't care to check.

Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

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

ACK 5cd37e3 successfully ran local tests

@apoelstra apoelstra merged commit 9c82121 into rust-bitcoin:master Sep 9, 2024
11 checks passed
@apoelstra
Copy link
Member

Updated my local CI so that it will use rust-version from Cargo.toml if it's present, and only if it's not, fall back to msrv in clippy.toml (and use 1.56.1 if that's missing).

@apoelstra
Copy link
Member

Hmm, this is gonna kill my performance for multi-workspace repos if I can't determine my compiler set until after I've split into multiple workspaces.

But ok, we can discuss that when we try to make that change for rust-bitcoin.

@tcharding tcharding deleted the 09-04-bump-msrv branch October 15, 2024 01:03
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.

3 participants