chore: Add Cargo.lock for pythnet_sdk and renable pre-commit CI #2465
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.