Jens-G opened a new pull request, #3885: URL: https://github.com/apache/thrift/pull/3885
`build/veralign.sh` updated the two `Gemfile.lock` files and the three npm `package-lock.json` files with `simpleReplace`, which runs `sed "s/<old>/<new>/g"` over the whole file. A lockfile lists every dependency with its version, so any third-party package locked at the old Thrift version was rewritten too. - The bump to 0.26.0 (451efc7a7) turned `bake (0.25.0)` in `test/rb/Gemfile.lock` into `bake (0.26.0)`, which does not exist. That broke `bundle install` in every `cross-test` job. #3884 repairs the lockfile. - The next bump would turn `protocol-http2 (0.26.0)` into `protocol-http2 (0.27.0)`. That version does exist, so nothing would even fail. - Each `package-lock.json` was listed first with `jsonReplace` and then with `simpleReplace`. `FILES` is an associative array, so only the second assignment took effect. ### The change - `gemlockReplace` replaces only the ` thrift (<old>)` spec line of a `Gemfile.lock`. - `npmlockReplace` uses jq to set only the root package's `version` and `packages[""].version`. For all three files, jq reproduces npm's formatting byte for byte. If the old version is not where it expects it, it reports NOT FOUND and stops, as `replace()` does. - `escapeVersion` turns parentheses into bracket expressions, because `replace()` hands the same pattern to `grep -E` and to a basic-regex `sed`. ### Verification I ran the old and the new script on exported trees and diffed every line each one changed: | Case | Old script | New script | |---|---|---| | 0.25.0 → 0.26.0 on aedcb6ec4, the real bump | reproduces 451efc7a7 line for line: 148 lines, `bake` included | the same lines without `bake`: 146 | | 0.26.0 → 0.27.0 | rewrites `protocol-http2 (0.26.0)` | leaves it alone | | a synthetic npm dependency locked at 0.26.0 | rewrites its version and URL | leaves it alone | The new script also behaves correctly in these cases: - With `DRYRUN` set, it changes nothing. - If a lockfile lacks the expected version, it exits 1 with NOT FOUND. - If a lockfile cannot be written, it exits 1 and leaves no temp file behind. - A gem named `rack-thrift` at the same version is left alone. shellcheck reports nothing new except SC2329, which it raises for every function that `FILES` calls indirectly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
