--dockerfile-inputs --deps: the stop message names only `npm i` or `bundle`, not the command on the line
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 86/100
Research direction
In src/wheelgap/dockerfile.py, find the if dependencies and install.scripts: branch by searching for runs the project's own code, which may install Python packages; it builds the message from report.scripts[0], whose third element (shown_command) is the full command the warning already quotes. Reword the message to quote that command and match the phrasing given in the issue, leaving the stop conditions and the warnings untouched. Then update test_dockerfile_requirements_warns_about_project_code_before_an_install in tests/test_dockerfile.py to expect shown for every row of _PROJECT_SCRIPTS + _PROJECT_BUILDS, run that test, and add one CHANGELOG.md bullet under ## Unreleased. Done when the test passes offline and no other test still asserts the old wording.
Written by the indexing model from the issue text.
Description
With --deps, --dockerfile-inputs stops when a command that runs the project's own code comes before an install it reads. The stop message names only the first word or two of that command, so the reader can't tell which part of the line was meant, and some messages don't read as English:
Reproduced with the released uvx wheelgap==0.14.0 (same code on main):
$ cat Dockerfile
FROM python:3.13-slim
WORKDIR /app
COPY requirements.txt .
RUN npm i -g ./tools/x
RUN pip install -r requirements.txt
$ uvx wheelgap==0.14.0 --dockerfile Dockerfile --dockerfile-inputs --deps
wheelgap: error: Dockerfile:4: npm i runs the project's own code, which may install Python packages before the install on line 5, and with --deps they change what that install fetches
Other lines give bundle runs the project's own code (for bundle exec rake setup) and npm run runs the project's own code (for npm run build). Without --deps, the warning for the same line quotes the whole command, which is clearer: this line runs `npm install left-pad --no-save`, which runs scripts wheelgap can't see into.
Where
src/wheelgap/dockerfile.py: the if dependencies and install.scripts: branch (search for runs the project's own code, which may install Python packages). It takes spelling from report.scripts[0]; the same tuple already holds the full command (shown_command, the third item), which the warnings use.
What to do
- Quote the command in that message the way the warning does:
line 4: this line runs `npm i -g ./tools/x`, which runs the project's own code and may install Python packages before the install on line 5; with --deps they change what that install fetches. - Don't change which lines stop, or the warnings.
Done when
-
test_dockerfile_requirements_warns_about_project_code_before_an_installintests/test_dockerfile.pymatches the quoted command (it buildsshownfor the warning already) instead ofspelling, for every row of_PROJECT_SCRIPTS + _PROJECT_BUILDS. It fails onmain. - Any other test that matches the old wording is updated.
- No network in the tests.
- One
CHANGELOG.mdbullet under## Unreleased.
- Dominant language
- Python
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from patrickballard/wheelgap
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
patrickballard/wheelgap#728 ·
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
patrickballard/wheelgap#727 ·
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
patrickballard/wheelgap#725 ·
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
patrickballard/wheelgap#724 ·
-
--glibc 2 and --musl 1 are read as 2.0 and 1.0, so every compiled Linux package shows as sourceOpenbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
patrickballard/wheelgap#723 ·
All issues in patrickballard/wheelgap
Similar issues
-
pydanty:is-working
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
pydantic/pydantic-ai#14472 ·
Maintainers usually reply within 1 day
-
bug good first issue
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 78/100
choras-org/simulation-backend#58 ·
Maintainers usually reply within 1 day
-
backend part-1-modeling testing
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day