Skip to content

Commit 10df29e

Browse files
authored
Update rust toolchain to 1.84 (#3945)
* chore: Remove deprecated `Makefile.toml` which really should have been deleted as part of #2012. This hasn't been updated for more than 2 years now and I don't expect anyone to still use this. Our build process is now managed by `cargo xtask`. * Cargo: Update the Rust toolchain to 1.84.0 from 1.75.0 which has been deprecated for a while now. Along with this change, the `wasm32-wasi` target is no longer available (see subsequent commit for additional info). * chore: Rename `wasm32-wasi` to `wasm32-wasip1` as required by the Rust project. The `wasm32-wasi` target name has been retired and will likely be reused at a later time, although to express an entirely different target (i.e. implementation of the WASI standard). For additional information, see: - https://blog.rust-lang.org/2024/04/09/updates-to-rusts-wasi-targets.html - https://blog.rust-lang.org/2024/09/05/Rust-1.81.0.html#wasi-01-target-naming-changed * chore: Drop `rust-analysis` component from the `rust-toolchain.toml` definition. This was added way back in 2021 via 8688569, and while I'm not sure what it expressed back then, nowadays it refers to [Metadata for RLS][1], which apparently was an early language server implementation and has long since been replaced by *rust-analyzer*. We don't want to propose or enforce the use of a specific toolchain and in any case, setting this up properly is the job of a developers IDE/Editor. [1]: https://github.com/rust-lang/rustup/blob/1f06e3b31d444f3649dd51225a9d38362f7313e0/doc/user-guide/src/concepts/components.md#previous-components * chore: Adhere to type rename from `std::panic::PanicInfo` to `std::panic::PanicHookInfo`, which was introduced in Rust 1.81.0. For additional information, see: - https://releases.rs/docs/1.81.0/#compatibility-notes - rust-lang/rust#115974 * fix(utils/data): Adhere to expected case in match arm patterns, since the expression being matched against has been modified using `to_ascii_lowercase`. Hence, we cannot have upper case ASCII chars in the expressions (these arms were previously no-ops). * fix(utils): Derive `Hash` manually in `input/layout` since the `PartialEq` trait is also implemented manually. Previously the `Hash` impl wasn't consistent with the `Eq` impl, which can have weird effects when using these types in e.g. `HashMap`s or similar types. For additional information, see: - https://rust-lang.github.io/rust-clippy/master/index.html#derived_hash_with_manual_eq - https://doc.rust-lang.org/stable/std/hash/trait.Hash.html#hash-and-eq * fix(utils): Derive `Hash` manually in `pane_size` since the `PartialEq` trait is also implemented manually. Previously the `Hash` impl wasn't consistent with the `Eq` impl, which can have weird effects when using these types in e.g. `HashMap`s or similar types. For additional information, see: - https://rust-lang.github.io/rust-clippy/master/index.html#derived_hash_with_manual_eq - https://doc.rust-lang.org/stable/std/hash/trait.Hash.html#hash-and-eq * fix(server): Don't redeclare variables with their same names. Latest rust toolchains reject this code. * chore(actions): Use non-archived toolchain setup for the Rust toolchain. The previously used action has been archived over a year ago. The new one should also support reading our `rust-toolchain.toml`, so we no longer have to keep track of the toolchain in multiple places. * chore(actions): Add some space to YAML files to make them better visually parsable. * ci: Remove toolchain update Job since as far as I can tell, this isn't used any more. * ci: Fix invalid actions specification and only request an action without running other code. * CHANGELOG: Add PR #3945.
1 parent fe79264 commit 10df29e

File tree

26 files changed

+88
-372
lines changed

26 files changed

+88
-372
lines changed

.github/workflows/e2e.yml

+10-7
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,29 @@ jobs:
3030
options: -v ${{ github.workspace }}/target:/usr/src/zellij --name ssh
3131
steps:
3232
- uses: actions/checkout@v3
33+
3334
- name: Install Protoc
3435
uses: arduino/setup-protoc@v2
3536
with:
3637
repo-token: ${{ secrets.GITHUB_TOKEN }}
37-
- name: Add WASM target
38-
run: rustup target add wasm32-wasi
38+
3939
- name: Install musl-tools
4040
run: sudo apt-get install -y --no-install-recommends musl-tools
41-
- name: Add musl target
42-
run: rustup target add x86_64-unknown-linux-musl
43-
#run: cargo install --debug cargo-make
44-
- uses: Swatinem/rust-cache@v2
45-
# ensure the target folder exists, otherwise fixtures won't be in the right place
41+
42+
- name: Install Rust
43+
uses: actions-rust-lang/setup-rust-toolchain@v1
44+
with:
45+
rustflags: ""
46+
4647
- name: Create target folder
4748
run: mkdir -p ${{ github.workspace }}/target
4849
# we copy this manually into the target folder instead of mounting it because
4950
# github actions creates the service first, and if it has a mount that is part
5051
# of your yet unchecked out code, you cannot checkout the code after the mount
52+
5153
- name: Copy fixtures folder to target
5254
run: cp -r ${{ github.workspace }}/src/tests/fixtures ${{ github.workspace }}/target
55+
5356
- name: Restart ssh container
5457
# we need to do this because otherwise the volume will not be mounted
5558
# on the docker container, since it was created before the folder existed

.github/workflows/release.yml

+14-24
Original file line numberDiff line numberDiff line change
@@ -53,28 +53,18 @@ jobs:
5353
with:
5454
repo-token: ${{ secrets.GITHUB_TOKEN }}
5555

56-
- name: Install Rust
57-
uses: actions-rs/toolchain@v1
58-
with:
59-
toolchain: ${{ matrix.rust }}
60-
profile: minimal
61-
override: true
62-
target: ${{ matrix.target }}
63-
64-
- name: Add WASM target
65-
run: rustup target add wasm32-wasi
66-
6756
- name: Install musl-tools
6857
if: matrix.os == 'ubuntu-latest'
6958
run: sudo apt-get install -y --no-install-recommends musl-tools
70-
71-
# Workaround for <https://github.com/actions/virtual-environments/issues/2557>
72-
- name: Switch Xcode SDK
73-
if: runner.os == 'macos'
74-
run: |
75-
cat <<EOF >> "$GITHUB_ENV"
76-
SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
77-
EOF
59+
60+
- name: Install Rust
61+
uses: actions-rust-lang/setup-rust-toolchain@v1
62+
with:
63+
toolchain: ${{ matrix.rust }}
64+
target: "${{ matrix.target }},wasm32-wasip1"
65+
# Just to make sure the cache doesn't interfere with the build here
66+
cache: false
67+
rustflags: ""
7868

7969
- name: Build release binary
8070
run: cargo xtask ci cross ${{ matrix.target }}
@@ -109,7 +99,7 @@ jobs:
10999
env:
110100
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
111101
with:
112-
upload_url: ${{ needs.create-release.outputs.upload_url }}
102+
upload_url: ${{ needs.create-release.outputs.upload_url }}
113103
asset_path: ./target/${{ matrix.target }}/release/${{ steps.make-artifact.outputs.name }}
114104
asset_name: zellij-${{matrix.target}}.tar.gz
115105
asset_content_type: application/octet-stream
@@ -119,17 +109,17 @@ jobs:
119109
env:
120110
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
121111
with:
122-
upload_url: ${{ needs.create-release.outputs.upload_url }}
112+
upload_url: ${{ needs.create-release.outputs.upload_url }}
123113
asset_path: ./target/${{ matrix.target }}/release/${{ steps.make-checksum.outputs.name }}
124114
asset_name: zellij-${{matrix.target}}.sha256sum
125115
asset_content_type: text/plain
126116

127117
create-release:
128118
runs-on: ubuntu-latest
129-
outputs:
119+
outputs:
130120
upload_url: ${{ steps.create_release.outputs.upload_url }}
131121
steps:
132-
- name: create_release
122+
- name: create_release
133123
id: create_release
134124
uses: actions/create-release@v1
135125
env:
@@ -138,5 +128,5 @@ jobs:
138128
tag_name: ${{ github.event_name == 'workflow_dispatch' && '' || github.ref }}
139129
release_name: Release ${{ github.event_name == 'workflow_dispatch' && 'main' || github.ref }}
140130
draft: ${{ github.event_name == 'workflow_dispatch' }}
141-
prerelease: false
131+
prerelease: false
142132

.github/workflows/rust.yml

+16-5
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,17 @@ jobs:
2222

2323
steps:
2424
- uses: actions/checkout@v3
25+
2526
- name: Install Protoc
2627
uses: arduino/setup-protoc@v2
2728
with:
2829
repo-token: ${{ secrets.GITHUB_TOKEN }}
2930

3031
- name: Setup toolchain
31-
run: rustup show
32-
- uses: Swatinem/rust-cache@v2
32+
uses: actions-rust-lang/setup-rust-toolchain@v1
33+
with:
34+
rustflags: ""
35+
3336
- name: Build
3437
run: cargo xtask build
3538

@@ -45,13 +48,17 @@ jobs:
4548

4649
steps:
4750
- uses: actions/checkout@v3
51+
4852
- name: Install Protoc
4953
uses: arduino/setup-protoc@v2
5054
with:
5155
repo-token: ${{ secrets.GITHUB_TOKEN }}
56+
5257
- name: Setup toolchain
53-
run: rustup show
54-
- uses: Swatinem/rust-cache@v2
58+
uses: actions-rust-lang/setup-rust-toolchain@v1
59+
with:
60+
rustflags: ""
61+
5562
- name: Test
5663
run: cargo xtask test
5764

@@ -61,7 +68,11 @@ jobs:
6168

6269
steps:
6370
- uses: actions/checkout@v3
71+
6472
- name: Setup toolchain
65-
run: rustup show
73+
uses: actions-rust-lang/setup-rust-toolchain@v1
74+
with:
75+
rustflags: ""
76+
6677
- name: Check Format
6778
run: cargo xtask format --check

.github/workflows/update-rust-toolchain.yml

-25
This file was deleted.

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
2020
* feat(terminal): mouse AnyEvent tracking (https://github.com/zellij-org/zellij/pull/3538)
2121
* fix(terminal): support setting kitty keyboard protocol with `CSI=` (https://github.com/zellij-org/zellij/pull/3942)
2222
* fix(floating-panes): handle various errors (https://github.com/zellij-org/zellij/pull/3944)
23+
* chore(rust): Update Rust toolchain to 1.84.0 (https://github.com/zellij-org/zellij/pull/3945)
2324

2425
## [0.41.2] - 2024-11-19
2526
* fix(input): keypresses not being identified properly with kitty keyboard protocol in some terminals (https://github.com/zellij-org/zellij/pull/3725)

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ repository = "https://github.com/zellij-org/zellij"
99
homepage = "https://zellij.dev"
1010
include = ["src/**/*", "assets/layouts/*", "assets/config/*", "LICENSE.md", "README.md", "!**/*_test.*", "!**/tests/**/*"]
1111
# NOTE: When updating this, modify `channel` in `rust-toolchain.toml` accordingly
12-
rust-version = "1.75"
12+
rust-version = "1.84"
1313

1414
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1515

0 commit comments

Comments
 (0)