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

fix: verify msrv with rust-version fields (with cargo-msrv 0.16) #4941

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: fix rust-version
  • Loading branch information
eitsupi committed Oct 9, 2024
commit abaf89a8592ccdab45d898574dee8d4a0c06eea9
14 changes: 9 additions & 5 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -513,17 +513,21 @@ jobs:
runs-on: ubuntu-22.04
needs: rules
if: needs.rules.outputs.nightly == 'true'
strategy:
fail-fast: false
matrix:
working-directory:
- .
- prqlc/prqlc
- lutra/lutra
steps:
- name: 📂 Checkout code
uses: actions/checkout@v4
- uses: baptiste0928/cargo-install@v3
with:
crate: cargo-msrv
- name: Verify minimum rust version — prqlc
working-directory: prqlc/prqlc
run: cargo msrv verify
- name: Verify minimum rust version — lutra
working-directory: lutra/lutra
- name: Verify minimum rust version — ${{ matrix.working-directory }}
working-directory: ${{ matrix.working-directory }}
run: cargo msrv verify

test-deps-min-versions:
4 changes: 1 addition & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -20,9 +20,7 @@ authors = ["PRQL Developers"]
edition = "2021"
license = "Apache-2.0"
repository = "https://github.com/PRQL/prql"
# This isn't tested since `cargo-msrv` doesn't support workspaces; instead we
# test `metadata.msrv` in `prqlc`
rust-version = "1.70.0"
rust-version = "1.77.2"
Copy link
Member

Choose a reason for hiding this comment

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

If no crates have rust-version.workspace = true, does this have any effect?

Copy link
Member Author

Choose a reason for hiding this comment

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

What do you mean?
lutra has rust-version.workspace = true

Copy link
Member

Choose a reason for hiding this comment

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

OK I see. Possible we push that down to lutra, and leave this empty.

Hopefully we can have an MSRV for most of the workspace set here, and then lutra can have its own higher one. But possibly that won't work yet.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry, my understanding of MSRV was incorrect (foresterre/cargo-msrv#1023).

I will not work on it today so I will draft it and come back to it in a few days.

Copy link
Member

Choose a reason for hiding this comment

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

Ah great, thanks a lot for following up with that. I added a comment to the issue.

If that issue is resolved, I would vote to have an MSRV of something like 1.73.0 here, have most crates inherit it, and then Lutra has a different higher one.

version = "0.13.1"

[profile.release]
1 change: 1 addition & 0 deletions lutra/bindings/python/Cargo.toml
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@ publish = false
edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lib]
2 changes: 1 addition & 1 deletion lutra/lutra/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
description = "Query runner for PRQL"
name = "lutra"
rust-version = "1.77.2"

edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
version.workspace = true

[features]
2 changes: 1 addition & 1 deletion prqlc/bindings/elixir/native/prql/Cargo.toml
Original file line number Diff line number Diff line change
@@ -3,11 +3,11 @@ authors = ["Kasun Vithanage <[email protected]>"]
description = "Elixir NIF bindings for prqlc"
name = "prql"
publish = false
rust-version = "1.73.0"

edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lib]
2 changes: 1 addition & 1 deletion prqlc/bindings/java/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "prql-java"
publish = false
rust-version = "1.73.0"

edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lib]
2 changes: 1 addition & 1 deletion prqlc/bindings/js/Cargo.toml
Original file line number Diff line number Diff line change
@@ -2,11 +2,11 @@
description = "Javascript bindings for prqlc"
name = "prqlc-js"
publish = false
rust-version = "1.73.0"

edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lib]
2 changes: 1 addition & 1 deletion prqlc/bindings/prqlc-c/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "prqlc-c"
publish = false
rust-version = "1.73.0"

edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
version.workspace = true

# This means we can build with `--features=default`, which can make builds more generic
2 changes: 1 addition & 1 deletion prqlc/bindings/prqlc-python/Cargo.toml
Original file line number Diff line number Diff line change
@@ -3,11 +3,11 @@ build = "build.rs"
description = "Python bindings for prqlc"
name = "prqlc-python"
publish = false
rust-version = "1.73.0"

edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lib]
2 changes: 1 addition & 1 deletion prqlc/prqlc-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
description = "Macros for PRQL compilation at build time"
name = "prqlc-macros"
rust-version = "1.73.0"

edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lib]
2 changes: 1 addition & 1 deletion prqlc/prqlc-parser/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
description = "A parser for the PRQL query language."
name = "prqlc-parser"
rust-version = "1.73.0"

edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lib]
2 changes: 1 addition & 1 deletion prqlc/prqlc/examples/compile-files/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "compile-files"
publish = false
rust-version = "1.73.0"

edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
version.workspace = true

[[bin]]