From c7f734d8c1c288ea5fc48391a419c23ade441cac Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Mon, 25 Mar 2024 22:24:54 -0700 Subject: [PATCH 1/5] Explicitly install a Rust toolchain for cargo-outdated job Debugging a recent cargo-outdated bug, it would have been nice not to wonder whether a rustc version change in GitHub's runner image was a contributing factor. --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 50c14dc44..05df555b0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -179,6 +179,7 @@ jobs: timeout-minutes: 45 steps: - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable - uses: dtolnay/install@cargo-outdated - run: cargo outdated --workspace --exit-code 1 - run: cargo outdated --manifest-path fuzz/Cargo.toml --exit-code 1 From 6c7c709c40e10c319817f684e2632bebe3bf8459 Mon Sep 17 00:00:00 2001 From: BD103 <59022059+BD103@users.noreply.github.com> Date: Fri, 29 Mar 2024 22:06:58 -0400 Subject: [PATCH 2/5] refactor: use `dep:` prefix for `quote` dependency --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 16a8d4164..756e80927 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,7 @@ default = ["derive", "parsing", "printing", "clone-impls", "proc-macro"] derive = [] full = [] parsing = [] -printing = ["quote"] +printing = ["dep:quote"] visit = [] visit-mut = [] fold = [] From 694f6044a8351c99b392da9c252409d80adef085 Mon Sep 17 00:00:00 2001 From: BD103 <59022059+BD103@users.noreply.github.com> Date: Fri, 29 Mar 2024 22:15:08 -0400 Subject: [PATCH 3/5] feat: use optional dependency feature syntax `?` This syntax needs Rust 1.60, so it will require a MSRV bump. If this is not wanted, I would be willing to revert it. --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 756e80927..76422ec22 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,7 +31,7 @@ visit-mut = [] fold = [] clone-impls = [] extra-traits = [] -proc-macro = ["proc-macro2/proc-macro", "quote/proc-macro"] +proc-macro = ["proc-macro2/proc-macro", "quote?/proc-macro"] test = ["syn-test-suite/all-features"] [dependencies] From 4913ab2fe69d03a0a1821dc6c40fe6fabfc44d8f Mon Sep 17 00:00:00 2001 From: BD103 <59022059+BD103@users.noreply.github.com> Date: Fri, 29 Mar 2024 22:17:16 -0400 Subject: [PATCH 4/5] chore: bump msrv to 1.60 --- .github/workflows/ci.yml | 1 + Cargo.toml | 2 +- README.md | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 05df555b0..896f4f61a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,6 +37,7 @@ jobs: strategy: fail-fast: false matrix: + # TODO: Remove 1.56 CI rust: [stable, beta, 1.60.0, 1.56.0] include: - rust: nightly diff --git a/Cargo.toml b/Cargo.toml index 76422ec22..d1b564c4b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ include = [ keywords = ["macros", "syn"] license = "MIT OR Apache-2.0" repository = "https://github.com/dtolnay/syn" -rust-version = "1.56" +rust-version = "1.60" [features] default = ["derive", "parsing", "printing", "clone-impls", "proc-macro"] diff --git a/README.md b/README.md index e8d99abcf..04f9bf6cb 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ contains some APIs that may be useful more generally. [`syn::DeriveInput`]: https://docs.rs/syn/2.0/syn/struct.DeriveInput.html [parser functions]: https://docs.rs/syn/2.0/syn/parse/index.html -*Version requirement: Syn supports rustc 1.56 and up.* +*Version requirement: Syn supports rustc 1.60 and up.* [*Release notes*](https://github.com/dtolnay/syn/releases) From d7650b2af89274b94172e671e92bb72acfac3a37 Mon Sep 17 00:00:00 2001 From: BD103 <59022059+BD103@users.noreply.github.com> Date: Fri, 29 Mar 2024 22:43:05 -0400 Subject: [PATCH 5/5] chore: bump msrv to 1.60 (pt. 2) This change is using 6e8a372 for reference. I'm not entirely sure what the purpost of `manifestpath` was, so I may have done something incorrect. --- .github/workflows/ci.yml | 34 ++++++++++++++++------------------ tests/crate/Cargo.toml | 26 -------------------------- tests/crate/test.rs | 1 - 3 files changed, 16 insertions(+), 45 deletions(-) delete mode 100644 tests/crate/Cargo.toml delete mode 100644 tests/crate/test.rs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 896f4f61a..4bd0f723c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,8 +37,7 @@ jobs: strategy: fail-fast: false matrix: - # TODO: Remove 1.56 CI - rust: [stable, beta, 1.60.0, 1.56.0] + rust: [stable, beta, 1.60.0] include: - rust: nightly components: rustc-dev @@ -53,7 +52,6 @@ jobs: os: windows env: target: ${{matrix.target && format('--target={0}', matrix.target)}} - manifestpath: ${{matrix.rust == '1.56.0' && '--manifest-path tests/crate/Cargo.toml' || ''}} timeout-minutes: 45 steps: - uses: actions/checkout@v4 @@ -62,21 +60,21 @@ jobs: toolchain: ${{matrix.rust}} targets: ${{matrix.target}} components: ${{matrix.components}} - - run: cargo check ${{env.manifestpath}} ${{env.target}} --no-default-features - - run: cargo check ${{env.manifestpath}} ${{env.target}} - - run: cargo check ${{env.manifestpath}} ${{env.target}} --features full - - run: cargo check ${{env.manifestpath}} ${{env.target}} --features 'fold visit visit-mut' - - run: cargo check ${{env.manifestpath}} ${{env.target}} --features 'full fold visit visit-mut' - - run: cargo check ${{env.manifestpath}} ${{env.target}} --no-default-features --features derive - - run: cargo check ${{env.manifestpath}} ${{env.target}} --no-default-features --features 'derive parsing' - - run: cargo check ${{env.manifestpath}} ${{env.target}} --no-default-features --features 'derive printing' - - run: cargo check ${{env.manifestpath}} ${{env.target}} --no-default-features --features 'proc-macro parsing printing' - - run: cargo check ${{env.manifestpath}} ${{env.target}} --no-default-features --features full - - run: cargo check ${{env.manifestpath}} ${{env.target}} --no-default-features --features 'full parsing' - - run: cargo check ${{env.manifestpath}} ${{env.target}} --no-default-features --features 'full printing' - - run: cargo check ${{env.manifestpath}} ${{env.target}} --no-default-features --features 'full parsing printing' - - run: cargo check ${{env.manifestpath}} ${{env.target}} --no-default-features --features 'fold visit visit-mut parsing printing' - - run: cargo check ${{env.manifestpath}} ${{env.target}} --no-default-features --features 'full fold visit visit-mut parsing printing' + - run: cargo check ${{env.target}} --no-default-features + - run: cargo check ${{env.target}} + - run: cargo check ${{env.target}} --features full + - run: cargo check ${{env.target}} --features 'fold visit visit-mut' + - run: cargo check ${{env.target}} --features 'full fold visit visit-mut' + - run: cargo check ${{env.target}} --no-default-features --features derive + - run: cargo check ${{env.target}} --no-default-features --features 'derive parsing' + - run: cargo check ${{env.target}} --no-default-features --features 'derive printing' + - run: cargo check ${{env.target}} --no-default-features --features 'proc-macro parsing printing' + - run: cargo check ${{env.target}} --no-default-features --features full + - run: cargo check ${{env.target}} --no-default-features --features 'full parsing' + - run: cargo check ${{env.target}} --no-default-features --features 'full printing' + - run: cargo check ${{env.target}} --no-default-features --features 'full parsing printing' + - run: cargo check ${{env.target}} --no-default-features --features 'fold visit visit-mut parsing printing' + - run: cargo check ${{env.target}} --no-default-features --features 'full fold visit visit-mut parsing printing' - if: matrix.components == 'rustc-dev' run: cargo check --benches --all-features --release diff --git a/tests/crate/Cargo.toml b/tests/crate/Cargo.toml deleted file mode 100644 index 54a305fdb..000000000 --- a/tests/crate/Cargo.toml +++ /dev/null @@ -1,26 +0,0 @@ -[workspace] -[package] -name = "syn-test-suite" -version = "0.0.0" -authors = ["David Tolnay "] -edition = "2021" -publish = false - -[lib] -path = "test.rs" - -[dependencies] -syn = { path = "../..", default-features = false } - -[features] -default = ["derive", "parsing", "printing", "clone-impls", "proc-macro"] -derive = ["syn/derive"] -full = ["syn/full"] -parsing = ["syn/parsing"] -printing = ["syn/printing"] -visit = ["syn/visit"] -visit-mut = ["syn/visit-mut"] -fold = ["syn/fold"] -clone-impls = ["syn/clone-impls"] -extra-traits = ["syn/extra-traits"] -proc-macro = ["syn/proc-macro"] diff --git a/tests/crate/test.rs b/tests/crate/test.rs deleted file mode 100644 index 6c7766063..000000000 --- a/tests/crate/test.rs +++ /dev/null @@ -1 +0,0 @@ -pub use syn::*;