Repository navigation
Translate wheelgap diagnostics for MCP clients - #624
Conversation
|
Thanks @kunalkshah1, this looks good overall: the CLI-to-MCP translations now live in one table applied to every error and note, and CI is green on this commit. #607 is a (Review assisted by Claude.) |
… tool offline: false runs --online, whose notes named --online, --explain and --json; --build-arg, --environment and '-t and --glibc' also reached clients as flags. check_dockerfile and check_dist were told to pass dependencies: true or to 'drop check_dist', arguments they don't have. pip's own options in a Dockerfile (-r FILE, --no-cache-dir) are left as written. Adds a table test of each mapping, the unknown-group case the issue asks for, and a uv.lock checked with offline: false. Co-Authored-By: Claude Fable 5.2 <[email protected]>
CHANGELOG keeps both bullets. main's new check_lockfile test for a stale gap wheel list (wheelgap#620) read the note as the command line words it; through the MCP tool it now starts with 'the fix argument'. Co-Authored-By: Claude Fable 5.2 <[email protected]>
--environment is in the MCP advice table now, so check_lockfile's error for environment: "" no longer quotes the flag. Co-Authored-By: Claude Fable 5.2 <[email protected]>
CHANGELOG keeps both bullets, this PR's first. Co-Authored-By: Claude Fable 5.2 <[email protected]>
|
Thanks @kunalkshah1! One table applied where the CLI's messages reach an MCP client is the design #607 asked for. The table covered only some of the flags a client can see, so we've made these changes:
It'll merge once a final review passes. (Review assisted by Claude.) |
…s as written The flag table rewrote --group in 'pip install --group: --dockerfile-inputs only reads ...' (the user's Dockerfile line, not a wheelgap flag) and in the command the no-lockfile hint says to run (`wheelgap DIR/pyproject.toml --group NAME`). A flag right after 'pip install ' (so 'uv pip install ' too) and anything inside backticks now stay as they are. docs/mcp.md and the schema also say what offline: false costs: one index request per PyPI package, and that leaving it out is not the same as false. Co-Authored-By: Claude Fable 5.2 <[email protected]>
# Conflicts: # CHANGELOG.md
|
Merged, thanks @kunalkshah1! The final review added three things: a pip option quoted from the Dockerfile ( (Reply assisted by Claude.) |
…reads as rules Two cases where a file the image doesn't have was read: - A symlink is matched against the ignore rules by its own name, so a link whose target the rules leave out (a linked folder under `COPY . .`, or a linked file a COPY names) was read although it dangles in the image. When the ignore file has rules, a COPY source or a file under a folder COPY that is, or is reached through, a symlink below the build context is now an error. With no ignore file, or one with no rules, nothing changes. - Moby's patternmatcher.New cleans an exception with its ! still on, so `!../../requirements.txt` becomes the rule `requirements.txt`, which excludes. The port kept it as an exception that matches nothing; it is now refused, naming the ignore file's line. Merges main (wheelgap#624); CHANGELOG keeps every bullet once, this PR's first. docs/cli.md says both, and the over-long line is wrapped. Co-Authored-By: Claude Fable 5.2 <[email protected]>
…t be pinned main gained -c FILE and harmless pip flags (wheelgap#622), verified includes (wheelgap#621), .dockerignore rules (wheelgap#626), install provenance (wheelgap#630), uv's Requires-Python lower-bound rule (wheelgap#623) and MCP wording (wheelgap#624) since this branch was written. _pip_install_files returns (files, constraints, prefer_binary, uv) and has one flag loop with the uv branch first. On a uv line only uv's own flags are read: --system, -r/--requirements, -c/--constraints, --no-cache, --no-cache-dir, --upgrade/-U and --quiet/-q (checked against `uv pip install --help`, 0.13.1). pip's --no-input, --root-user-action and --prefer-binary don't exist in uv, and --disable-pip-version-check only warns there, so they are refused. A uv line's files are found by the same copied_requirements closure as pip's, so the ignore rules and the include checks apply. Three things are uv's own: - every requirement must be pinned with == (through includes; a pin from a constraints file counts), using the gate --prefer-binary already had, and --deps is refused: wheelgap resolves a range as pip does, and uv can pick another release; - a -r inside a constraints file is refused: pip installs what it names and uv only constrains with it (uv 0.13.1 against pip 26.2); - included and -c files must be named *.txt or *.in, like the -r file. A file installed by pip on one line and uv on another is refused, and a caller that doesn't pass uv_installs gets an error rather than pip's answer. cli.py: the stderr note keeps main's list of every file read and says which installer ran; uv-installed files get restore_uv_python_files, as a uv.lock with --online does, so the pip_refuses note is main's. docs/cli.md has one paragraph for uv; CHANGELOG keeps every bullet once, this PR's first, reworded. Co-Authored-By: Claude Fable 5.2 <[email protected]>
Closes #607
What this changes
Translate CLI advice from errors and notes to the corresponding MCP arguments. Explicit offline: false on check_lockfile overrides a project's offline default for that call. Omitting the argument still uses project defaults. check_dockerfile advises changing the project setting when it cannot accept that override.
Tests cover both diagnostics from the issue, the explicit override, and representative failures across the CLI-backed tools.
AI tools used: Codex
Ruff formatting and lint, mypy, and the full pytest suite passed. The Unreleased entry will be added with the PR number.