Skip to content

Commit

Permalink
Revert "Codify linting toolchain (linera-io#1251)"
Browse files Browse the repository at this point in the history
This reverts commit 7ec6f67.
  • Loading branch information
ma2bd committed Nov 20, 2023
1 parent a72336b commit 2cab376
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 39 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ jobs:
run: >
find linera-* -name '*.rs' -a -not -wholename '*/target/*' -print0
| xargs -0 -L1 ./scripts/target/release/check_copyright_header
- name: Put lint toolchain file in place
run: |
ln -sf rust-toolchain.lint.toml rust-toolchain.toml
- uses: Twey/setup-rust-toolchain@v1
working-directory: toolchains/lint
with:
toolchain: nightly-2023-10-22
target: wasm32-unknown-unknown
components: clippy rustfmt
- name: Install cargo-machete
run: |
cargo install cargo-machete --locked
Expand Down
30 changes: 15 additions & 15 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 8 additions & 10 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@
pkg-config
nodejs
];
rustBuildToolchain = (pkgs.rust-bin.fromRustupToolchainFile
./toolchains/build/rust-toolchain.toml);
rustLintToolchain = (pkgs.rust-bin.fromRustupToolchainFile
./toolchains/lint/rust-toolchain.toml);
rustToolchain = (pkgs.rust-bin.fromRustupToolchainFile
./rust-toolchain.toml);
rustPlatform = pkgs.makeRustPlatform {
rustc = rustToolchain;
cargo = rustToolchain;
};
in {
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
Expand All @@ -43,21 +45,17 @@
];
shellHook = ''
# For rust-analyzer 'hover' tooltips to work.
export RUST_SRC_PATH=${rustBuildToolchain.availableComponents.rust-src}
export RUST_SRC_PATH=${rustToolchain.availableComponents.rust-src}
export LIBCLANG_PATH=${pkgs.libclang.lib}/lib
export PATH=$PWD/target/release:~/.cargo/bin:$PATH
'';
buildInputs = nonRustDeps;
nativeBuildInputs = with pkgs; [
rustBuildToolchain
rustToolchain
rust-analyzer
];
};

devShells.lint = pkgs.mkShell {
nativeBuildInputs = [ rustLintToolchain ];
};

# Add your auto-formatters here.
# cf. https://numtide.github.io/treefmt/
treefmt.config = {
Expand Down
1 change: 0 additions & 1 deletion rust-toolchain.toml

This file was deleted.

5 changes: 5 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[toolchain]
channel = "1.73.0"
components = [ "clippy", "rustfmt", "rust-src" ]
targets = [ "wasm32-unknown-unknown" ]
profile = "minimal"
5 changes: 0 additions & 5 deletions toolchains/build/rust-toolchain.toml

This file was deleted.

4 changes: 0 additions & 4 deletions toolchains/lint/rust-toolchain.toml

This file was deleted.

0 comments on commit 2cab376

Please sign in to comment.