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 gem rewrite deleting a `;`-joined declaration (#826) by mikolalysenko · Pull Request #875 · SocketDev/socket-patch Conversation
|
| Issue case | Test | Without fix | With fix |
|---|---|---|---|
#826 ;-joined second declaration deleted (hosted) |
patch::redirect::tests::gemfile_semicolon_joined_declarations_fail_closed |
FAILED (Gemfile rewritten, rainbow gone) |
ok |
| same, shared gate | patch::redirect::tests::gem_line_tail_semicolon_statements |
FAILED | ok |
| same (vendored) | vendor::gem::tests::plan_gemfile_edit_semicolon_statements |
FAILED | ok |
#826 bare trailing ; refused (hosted) |
patch::redirect::tests::gemfile_trailing_semicolon_declaration_rewrites |
FAILED | ok |
| option reader drops the terminator | formats::gem::gemfile::tests::trailing_options_drop_the_statement_terminator |
new | ok |
real bundler: ;-joined refused, project still installs |
e2e_redirect_gem_build::gem_hosted_semicolon_joined_declarations_are_refused_and_still_install |
FAILED | ok |
real bundler: trailing ; redirects, fresh checkout installs patched bytes |
e2e_redirect_gem_build::gem_hosted_trailing_semicolon_declaration_redirects_and_installs |
FAILED | ok |
Commands run locally on the merge with main 9c43dfc (Linux, Ruby 3.3.6, Bundler 4.0.17, toolchain 1.93.1):
cargo test -p socket-patch-core --all-features --lib: 5251 passed. The 4 failures (relax_loop_must_not_traverse_symlinked_root, an_unremovable_hidden_lock_keeps_every_store_entry, wire_write_failure_maps_error_and_leaves_lock_untouched, wire_failure_rolls_back_already_written_files) all rely on permission bits, which have no effect when the container runs as root.SOCKET_PATCH_BUNDLER_E2E_REQUIRED=1 cargo test -p socket-patch-cli --all-features --test e2e_redirect_gem_build --test e2e_vendor_gem_build -- --ignored: 18 + 8 passed.cargo clippy --workspace --all-features -- -D warnings: clean.cargo fmt --all -- --check: clean for every hunk in this PR. main itself has pre-existing rustfmt diffs elsewhere, which CI doesn't check, and this PR leaves them alone.CI on 5b9953d: all 12 workflows are green. The macOS/ubuntu/Windows jobs that were cancelled without ever getting a runner, and the one Bun Windows workspace-nested vendored cell, passed on a single re-run. Bugbot is clean at 5b9953d. On 2026-10-06 one Bun native (macos-latest, 0.8.1) job had sat queued with no runner since the previous re-run. A second re-run of that workflow passed, and every check on 5b9953d is now green.
None for #826. Parenthesized calls ending in ); (gem("x", "1");) are still refused. That fails closed with a warning, and nobody has reported it.
🤖 Generated with Claude Code
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Assisted-by: Claude Code:claude-opus-5-5
A Gemfile line like `gem "a", "1"; gem "b", "2"` had its second declaration deleted when socket-patch redirected or vendored gem "a", because the rewrite replaces the whole line and the safety check did not know that `;` starts a new statement. The next frozen `bundle install` then failed. Such lines are now refused with a warning and left untouched. A declaration ending in a bare `;` (optionally followed by a comment) was refused as "continues on the next line" since #637. It is complete, so it is rewritten again, without the `;`. Fixes #826 Assisted-by: Claude Code:claude-opus-5-5
The `;`-joined fixture had no version argument, so the old check already refused it as "unexpected tokens" and the test passed without the fix. Use `gem "x", "v"; gem "y", "v"` from #826, which the old code rewrote and lost the second gem. 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 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.
main moved the Gemfile option reader into formats::gem::gemfile, so the `;` terminator handling moves with it: trailing_options and the new source_option both drop a bare statement terminator. Otherwise a complete `gem "x", "1";` line was refused as an unreadable, source-selecting tail. 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 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.
|
[agent]
I ported the fix from #878 here in 5b9953d. It becomes a no-op once #878 lands. With it, 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 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 5b9953d. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
[agent] CI status on 5b9953d. None of these look like this PR's failures:
Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Burn-down agent: labeled Ready for review at
Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
d201fce
into
main
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.
Gem hosted and vendored rewrites delete a secondgem declaration that shares the patched gem's line after ;, so the next bundle install drops that dependency
There was an error while loading. Please reload this page.