Skip to content

Commit 52d5086

Browse files
authored
Add Cargo.lock and renable pre-commit CI (#2465)
Summary pre-commit in CI was broken because (1) the latest version of a dependency of pythnet SDK needs a higher rust compiler version, and (2) there wasn't a Cargo.lock file for pythnet_sdk. Using Cargo.lock files for libraries is a bit controversial in the Rust community, as some argue that no Cargo.lock ensures that you keep your library up-to-date with the latest version of dependencies. However, this of course means you don't have repeatable builds, so CI and such are problems. In our case, I think CI is more important than keeping up to date with dependencies (as we're essentially the only people using the library.) How has this been tested? I ran the clippy command locally. Also, if pre-commit passes in CI, then it's good to go.
1 parent f5850b2 commit 52d5086

File tree

3 files changed

+5866
-2
lines changed

3 files changed

+5866
-2
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ repos:
110110
- id: cargo-clippy-pythnet-sdk
111111
name: Cargo clippy for pythnet SDK
112112
language: "rust"
113-
entry: cargo +1.82.0 clippy --manifest-path ./pythnet/pythnet_sdk/Cargo.toml -- --deny warnings
113+
entry: cargo +1.82.0 clippy --manifest-path ./pythnet/pythnet_sdk/Cargo.toml --tests -- --deny warnings
114114
pass_filenames: false
115115
files: pythnet/pythnet_sdk
116116
# Hooks for solana receiver contract

pythnet/pythnet_sdk/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
Cargo.lock

0 commit comments

Comments
 (0)