GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||
GeezerVison is showing github.com — Fix quoted and ${VAR} requirements includes (#994) by mikolalysenko · Pull Request #995 · SocketDev/socket-patch Conversation
|
| Issue | Regression test | Without fix | With fix |
|---|---|---|---|
#994 quoted / escaped forms (dq, sq, dq_nospace, bs, longq, eqq, attached), hosted and --vendor |
scan_requirements_lock_only::lock_only_scan_discovers_quoted_include_targets |
FAIL: lockfileOnlyPackages: 0 |
pass |
#994 -r ${REQDIR}/dev.txt, hosted and --vendor |
scan_requirements_lock_only::lock_only_scan_discovers_env_var_include_target |
FAIL: lockfileOnlyPackages: 0 |
pass |
| #994 grammar matrix | vendor::pypi_requirements::tests::include_target_unquotes_and_expands_like_pip |
n/a (new fn) | pass |
| #994 vendored planner and include names | vendor::pypi_requirements::tests::quoted_include_with_space_is_followed |
n/a | pass |
| helpers | utils::requirements::tests::{shlex_split_matches_python_posix_mode, expand_env_vars_follows_pips_name_grammar} |
n/a | pass |
Local checks:
cargo clippy --workspace --all-features -- -D warnings: clean.cargo test --workspace --all-features: 226 suites green.
main as well. All 12 pass when re-run as a non-root user.cargo fmt on the touched files is clean. CI has no fmt job, and main already has rustfmt drift in other files, which I left alone.npm/, pypi/, gem/) changes are needed: they only dispatch to the binary.Follow-up, not in this PR: the issue also suggests warning when an include can't be resolved, instead of skipping it silently. This PR fixes the misreading itself, so pip-valid includes are followed. A warning for genuinely broken includes would be a separate change.
🤖 Generated with Claude Code
Generated by Claude Code
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Assisted-by: Claude Code:claude-opus-5-5
pip expands ${NAME} references and shlex-splits the options of a
requirements line, so it follows `-r "dev reqs.txt"`, `-r dev\ reqs.txt`,
`--requirement="dev.txt"` and `-r ${REQDIR}/dev.txt`. socket-patch kept
the quotes, backslashes and ${...} in the include target, resolved it to
a file that doesn't exist and skipped it silently. Lock-only scans then
reported "No patches" (exit 0) while pip installed the include's
unpatched pins, and the vendored planner, in-use probe, repair and
lock-only VEX were blind to the same includes.
include_target now reads the line the way pip's req_file.py does:
comment stripped, ${NAME} expanded from the environment, then a POSIX
shlex split, then the -r / --requirement option forms. The new
expand_env_vars and shlex_split helpers live with the shared
requirements grammar.
Fixes #994
Assisted-by: Claude Code:claude-opus-5-5
main has failed socket-patch-core's lib tests since Gradle support (#646) and the digest helpers (#865) both landed. The guard test production_digests_go_through_the_helpers flags three files #646 added that still hash inline: crawlers/gradle_cache.rs, patch/jvm_jar.rs and patch/sidecars/maven.rs. That breaks test, test-release and coverage on every open PR. Each inline sha1/sha256 call now goes through sha1_hex_of or sha256_hex_of, which compute the same lowercase hex. Behaviour is unchanged. Assisted-by: Claude Code:claude-opus-5-5
|
[agent] CI on the start commit
Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
BugBot review Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Stale Bugbot comment from a previous run.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
pip shlex-splits a requirements line on every OS, so an unquoted Windows path like -r C:\dir\shared.txt loses its backslashes and pip can't open it. The absolute-include refusal test wrote that unquoted form and failed on Windows once includes were read the way pip reads them. Write the path quoted, the form pip needs on Windows. The refusal it checks is unchanged. Refs #994 Assisted-by: Claude Code:claude-opus-5-5
|
BugBot review Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit b081c1a. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
[agent] Ready for review at
Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
[agent] Burn-down: labeled Ready for review at
Slack announcement is still pending: this run's Slack connector has no send tool, so the Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Lock-only requirements.txt discovery skips-r includes that are quoted, backslash-escaped or use ${VAR} (-r "dev reqs.txt", --requirement="dev.txt", -r ${DIR}/dev.txt), so the scan exits 0 with "No patches" while pip installs the include's unpatched pins
There was an error while loading. Please reload this page.