Repo checker: a uv.lock locked for [tool.uv] environments shows false gaps on the platforms it leaves out (paperless-ngx: 52 on Windows)

オープン
#239 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
55/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
javascript, python
領域
devtools, web-dev

調査の方向性

Start in check() in site/check/driver.py, in the offline lockfile branch next to the pythons_outside_lock call, and read supported-markers with tomllib from the uv.lock. Mark targets where no marker can hold as outside_environments, then reuse the existing "not locked" tile path in tileText in site/check/check-logic.mjs. Done when tests/test_check_driver.py passes for a Linux-only lock with win-amd64 excluded and a lock without the key unchanged.

索引モデルが issue の本文から書いたものです。

説明

bug good first issue

A uv.lock made for [tool.uv] environments holds only the packages and wheels those environments need. uv writes them into the lock as supported-markers. On a platform the environments leave out, uv sync fails. The page, which runs wheelgap 0.13.0, reads the lock as if it covered every platform, and shows false gaps there.

Paste paperless-ngx/paperless-ngx. Its lock says:

supported-markers = [
    "platform_machine == 'arm64' and platform_python_implementation == 'CPython' and sys_platform == 'darwin'",
    "platform_machine == 'aarch64' and platform_python_implementation == 'CPython' and sys_platform == 'linux'",
    "platform_machine == 'x86_64' and platform_python_implementation == 'CPython' and sys_platform == 'linux'",
]

With Python 3.13 and Windows x64 picked, driver.check() gives 3 gaps on linux-x86_64 and 52 on win-amd64: cffi, cryptography, lxml, markupsafe, numpy, pillow and more. Those six all have Windows wheels on PyPI. The lock just doesn't list them, because the project never installs on Windows, so it can't answer for Windows at all. ArchiveBox/ArchiveBox and exo-explore/exo leave out Windows the same way. In the 300-repo corpus, 5 of the 82 root uv.lock files leave out a platform the page offers.

wheelgap after 0.13.0 refuses such a target (wheelgap/wheelgap#654). With the default targets it leaves those platforms out and says why. Once the pin moves (#208), the page would get that refusal for the whole check whenever a left-out platform is picked. So it needs its own handling either way.

Where

  • check() in site/check/driver.py, in the branch for lockfiles read offline. outside = set(pythons_outside_lock(source, targets)) does the same job for Pythons the lock's requires-python leaves out: those cells don't count, and the result's outside_lock names them.
  • tileText(c, outside) in site/check/check-logic.mjs and renderTargets() in site/check/check.mjs show such a tile as "–" "not locked".
  • wheelgap.check.marker_holds(marker, target) is in 0.13.0, and an unknown marker counts as holding. On wheelgap main, check.lock_environment_targets() does the whole job.

What to do

  • For a uv.lock read offline, read supported-markers from the file (tomllib). 0.13.0 doesn't keep it. A target on which none of the markers can hold is left out: none of its cells count, and the result lists its label in a new outside_environments.
  • Its tile shows "–" with "not locked", as for outside_lock.
  • One alert: uv.lock is locked for [tool.uv] environments that leave out Windows x64, so uv sync fails there. Add it to environments and run uv lock to check it.
  • A lock without supported-markers is checked exactly as today.
  • Add a comment: once the pin is 0.14.0 or later, use check.lock_environment_targets().

Done when:

  • tests/test_check_driver.py: a small uv.lock with Linux-only supported-markers, checked for linux-x86_64 and win-amd64. win-amd64 is in outside_environments, its cells count nothing, and linux-x86_64 is unchanged. A lock without the key gives the same result as before.
  • tests/site/check-logic.test.mjs or check-page.test.mjs: the tile and the alert.
  • In the PR: paperless-ngx/paperless-ngx with Windows x64 picked, before and after, as screenshots.
主要言語
JavaScript
スター
0
フォーク
0
平均マージ
1時間 38分
マージ済み PR(30日)
132

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

wheelgap/tracker のほかの issue

wheelgap/tracker の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。