Skip to content

Conversation

@nssalian
Copy link
Contributor

Rationale for this change

In #2928, the uv.lock wasn't generated correctly after a dependency change.
Adding the following changes:

  1. make uv-lock to generate one when modifying dependencies
  2. make uv-lock-check to check if the uv.lock is up to date
  3. Adding a pre-commit config to check the uv.lock and fail if not updated correctly (uses 2.)
  4. Documentation change in mkdocs/docs/contributing.md to add instructions for contributors.

Are these changes tested?

Locally.
Added some of the dependencies in #2928 without modifying the lock file and ran pre-commit run --all-files to observe the following failure message

uv lock file check.......................................................Failed
- hook id: uv-lock-check
- exit code: 2

uv lock --check 
Resolved 221 packages in 93ms
The lockfile at `uv.lock` needs to be updated, but `--check` was provided. To update the lockfile, run `uv lock`.
make: *** [uv-lock-check] Error 1

Are there any user-facing changes?

No. Useful for contributions that change versions/ dependencies.

@nssalian nssalian marked this pull request as ready for review January 20, 2026 05:48
Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great suggestion @nssalian Thanks for adding this. I left one minor comment 👍

@kevinjqliu
Copy link
Contributor

tested out the same scenario manually.

@kevinjqliu
Copy link
Contributor

i also noticed that git commit does not trigger pre-commit check, #2933 should fix this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants