Skip to content

Repo checker: a pixi.lock is offered as checkable, then fails with wheelgap's offline=True error #185

Closed

Description

@patrickballard

The repo checker says it reads a pixi.lock, and then can't. OFFLINE in site/check/driver.py lists pixi.lock with the lockfiles it checks without asking an index, and noLockfile() in site/check/check.mjs tells people "The repo check reads a uv.lock, poetry.lock, pdm.lock, pylock.toml or pixi.lock". But wheelgap can't check a pixi.lock offline. pixi records only the one file it picked for each of the lock's platforms, so wheelgap looks every PyPI package up for its pinned version, and --offline refuses the file (wheelgap's inputs docs, and test_pixi_lock_offline_needs_the_index in wheelgap's tests/test_cli.py).

driver.check() calls api._check_lockfile(path, targets, online=False, offline=True). So for any pixi.lock with a PyPI package in it, wheelgap's require_offline() raises, and the page shows only a red status line along these lines:

wheelgap couldn't read pixi.lock: offline=True: pixi.lock (it records only the file pixi picked for each platform) needs the index for 3 packages (…); use a lockfile that lists each package's files, or set offline=False

"Set offline=False" is an instruction for the Python API. It means nothing to someone using the page. And because onResult() returns before the results section is shown, the Lockfile picker stays hidden too. If a repo's shallowest lockfile is a pixi.lock (plan() sorts shallowest first, and pickLockfile() takes the first one marked checkable), there's no way to switch to the uv.lock in its subfolder. A poetry.lock or pdm.lock that doesn't list every package's files gets the same error, since wheelgap reads those offline only when the files are listed.

So someone who tries the checker on their pixi project gets an error and no next step. The page can't look these packages up on PyPI yet (that's a separate issue). Until then, it should say plainly that this file needs PyPI lookups, as needsIndex() already does for a requirements.txt, and give the uvx wheelgap command.

What to do

  • Remove "pixi.lock" from OFFLINE in driver.py, so plan() marks it "offline": false. pickLockfile() then prefers another checkable lockfile, the picker lists it as "(not readable here)", and runCheck() shows needsIndex() for it without fetching it. Update the comment above OFFLINE.
  • In driver.check(), return {"kind": "needs-index", "error": …} instead of "source" when the lock needs the index. Don't match wheelgap's message text. Instead, sources.load_file() the lock and run wheelgap.offline.require_offline([source]) before _check_lockfile, catching its SourceError (or find a better hook in the pinned wheelgap).
  • In check.mjs's onResult(), handle result.kind === "needs-index" with needsIndex(state.lockfile), which keeps the Targets section and its Lockfile picker on screen.
  • Take pixi.lock out of the sentence in noLockfile().

Done when:

  • On a repo whose only lockfile is a pixi.lock, the page says "pixi.lock needs PyPI lookups" and gives the uvx wheelgap pixi.lock command, not wheelgap's error.
  • On a repo with a pixi.lock at the root and a uv.lock in a subfolder, the uv.lock is checked first, and the picker lists pixi.lock as not readable here.
  • A poetry.lock with a package that lists no files gets the same "needs PyPI lookups" message, and the Lockfile picker is still there to switch.
  • tests/test_check_driver.py covers plan() marking pixi.lock as not offline, and check() returning "needs-index" for a poetry.lock without files. The existing tests still pass.

Activity

  1. added
    bug
    good first issue
    on Nov 20, 2026
  2. An-2k5 commented on Nov 20, 2026

    @An-2k5
    Contributor

    Hi @patrickballard, I've set up the local environment and verified the existing tests in tests/test_check_driver.py. I'd love to work on this issue—could you please assign it to me?

  3. patrickballard commented on Nov 20, 2026

    @patrickballard
    ContributorAuthor

    Thanks for offering, @An-2k5, and for getting the tests running first! @bfs2021 opened #190 for this a minute before your comment, so that PR is the one we'll review for this issue.

    If you'd like something in the same part of the site, tracker #177 is open with nobody on it and no PR yet: the home page scrolls sideways on a phone and the search button gets squashed to 17px. It's a self-contained CSS fix. Comment there and we'll assign it to you. The tracker README explains the setup, and questions are welcome in Discussions.

    (Reply assisted by Claude.)

  4. added a commit that references this issue on Nov 20, 2026
    3d0ddae
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions