Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/bazel-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ name: Bazel patch compatibility (RubyGems)
# downloads no JDK and needs none on the runner: rules_ruby's rules name a
# Java runtime toolchain that only JRuby uses, and the fixture registers
# one with nothing behind it. A gem under test never comes from the
# repository cache: the fixture names no `gem_checksums`, so rules_ruby
# gives Bazel no checksum for a gem, and Bazel looks a file up in that
# cache by its checksum only.
# repository cache of an earlier run: the fixture names no `gem_checksums`,
# so rules_ruby gives Bazel no checksum for a gem, and Bazel looks a file
# up in that cache by its checksum only. The flow that writes a
# `gem_checksums` into its workspace copy names gems it built for its own
# run, which no earlier run has.
#
# Not required for merge: no `merge_group` trigger, and no job here is a
# `needs` of ci.yml's `ci-ok`.
Expand Down
1 change: 1 addition & 0 deletions crates/socket-patch-cli/CLI_CONTRACT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2581,6 +2581,7 @@ command's integration tests check its output.
| `upstream_gem_install_refreshed` | `warnings[]` (note); remove / `vendor --revert` / `vendor` (manifest reconcile) advisory events for a vendored unwind | rollback / remove / a withdrawn-patch restore (gem): an installed copy or cache-dir archive the unwind replaced with the sha256-verified upstream gem. A wet vendored gem unwind (#2083, #2093): an installed copy only. A human run prints a progress line instead. |
| `upstream_gem_install_would_refresh` | `warnings[]` (note) | the same on `--dry-run`: what a wet unwind would replace. |
| `redirect_gem_version_not_locked` | `warnings[]` (warning) | scan `--mode hosted` (gem): the crawled gem version is installed on the machine but no `GEM` section of the project's lock resolves it (another project's copy in the shared gem home). The gem is skipped and the Gemfile and lock stay byte-identical. |
| `redirect_bazel_gem_checksums_pinned` | `warnings[]` (warning; human: `Warning: …`) | scan/get `--mode hosted` in a Bazel workspace (gem, additive): a rules_ruby `ruby.bundle_fetch` call of the root `MODULE.bazel` (or of a file it includes) reads the project's lock, or may (its `gemfile_lock` is not a label in a plain string), and its `gem_checksums` holds a build of the gem that the lock names (`<name>-<version>`, or `<name>-<version>-<platform>`) to another sha256 than the patched archive has (in either case of its letters), or is not written out as a dict of strings (a constant, an expression, a `**` argument). rules_ruby gives Bazel's downloader that sha256, so the build after a redirect would fail (`Bundler found mismatched checksums`, `Checksum was ... but wanted ...`) or keep the upstream gem: nothing is written for the gem (no `source:` option, no lock change). The gem is a `skipped` / `redirect_unconfirmed` event; status and exit are unchanged (exit 0), and the other gems of the run are rewritten. One warning per gem that the run would otherwise pin (a gem refused for another reason keeps that reason's warning alone). The detail starts `<name>@<version>: \`<call>\` at <file>:<line>`, names each such entry, and says to change it to the sha256 of the patched archive, which it gives, or, where the lock has a `CHECKSUMS` section for Bundler to hold the gem to, to delete the gem from the dict, and to re-run; where further calls hold the gem it ends by naming them (`The same holds for <call> at <file>:<line> ...: change it there too`); socket-patch never edits the call, so an entry changed by hand goes back by hand after a `rollback`. A call counts whether or not it is a statement of its own; an `rb_bundle_fetch` call of the `WORKSPACE` file counts unless a tag of the module files names the lock in a plain string, and `@<name>//` is the main repository there for the name `workspace(name = ...)` gives; what the reader cannot read of the workspace changes nothing. Not given in no Bazel workspace, for a lock no call may read, beside a call without `gem_checksums`, and for an entry that holds the patched sha256 or an empty string. A pin an earlier release wrote stays, is still reported `applied` (and attested by `--vex`), and gets the warning, which then says `the pin an earlier run wrote is left as it is` in place of `redirect skipped` and names `socket-patch rollback pkg:gem/<name>@<version>` (the gem's own pin, never a bare `rollback`, which would unwind every patch) as the other way out. Every call that may read the lock counts, also one whose hub the built targets do not use. The in-memory engine reads the calls where the project's directory is the Bazel root. See [Bazel workspaces: RubyGems](../../docs/ecosystems.md#bazel-workspaces-rubygems). |
| `redirect_maven_trusted_checksums_maven3_only` / `maven_trusted_checksums_maven3_only` | `warnings[]` (warning) | scan / get `--mode hosted` (the first code) and rollback / remove (the second), Maven: the Trusted Checksums settings hosted mode wrote into `.mvn/maven.config` named the checksums directory through `${session.rootDirectory}`, which stops Maven 3.9.2 to 3.9.8 from starting with `-f` from outside the project, and this run respelled that line with `${maven.multiModuleProjectDirectory}` in a project that declares no Maven (no Maven Wrapper naming an Apache Maven release, a root pom of model 4.0.0). Maven 3.9.4 and later 3.x enforce the checksums as before; a Maven 4 build of the project no longer does. Reported once, by the run that changes the line. The remedy for a project Maven 4 builds: declare Maven 4 (a wrapper that pins it, or a root pom of model 4.1.0); the next hosted scan then writes the spelling Maven 4 reads. Status and exit code are unchanged. |
| `redirect_maven_version_not_selected` | `warnings[]` (warning) | scan / get `--mode hosted` (Maven): the build does not resolve the artifact at the patch's base version; the detail names the version Maven selects instead, or says that the build does not resolve the artifact. The run writes nothing for the dep and it is not counted as redirected. See [Maven version selection](#maven-version-selection-hosted-and-vendored-maven). |
| `redirect_maven_selection_undetermined` | `warnings[]` (warning) | scan / get `--mode hosted` (Maven): what the build selects for the artifact cannot be read and `pom.xml` declares no version of it to replace, so no `<dependencyManagement>` pin is written on a guess. The detail carries the reason and the remedy (resolve the project once and re-run, or declare the artifact at the base version). For a single pom the run then writes nothing for the dep. In a reactor the warning is a note on a plan that may still be written: it names the first module whose selection cannot be read and counts the rest; those modules get no new pin, while the modules that are certain are still pinned and a declaration that names the base version is still rewritten, so the dep may be counted as redirected beside this warning. |
Expand Down
Loading
Loading