Repository navigation
feat(cli): oa check reads Gemfile.lock and packages.lock.json - #489
Merged
Merged
Conversation
pkg/lockfile gains two parsers:
- Gemfile.lock (and gems.locked): the gems of the GEM sections; GIT and
PATH gems are not served by a registry, and PATH gems (the project's own)
are no requirers. A gem locked for several platforms
("1.16.7-x86_64-linux") is one version, the number before the platform,
as the proxy's gate judges it.
- packages.lock.json: the packages of every target framework and runtime;
project references are left out and are no requirers. Requirements name
ids in any case, as NuGet does.
Neither lockfile records development dependencies, so --no-dev is refused
for them. --fetch requests the compact index info file (info/<gem>) or the
flat container version list (v3/package/<id>/index.json), what bundle
install and dotnet restore request.
The proxies could not answer from those documents, so a check after a plain
install, or after --fetch, still said unknown:
- rubygems listed versions only from the api/v1/versions document, which
the proxy fetches only for the minimum age (and clients cannot request).
Without it, the versions now come undated from the cached info file.
- nuget listed versions only from the inline items of the cached
registration index, which dotnet restore does not fetch and which
nuget.org splits into separate pages for a package of many versions
(Microsoft.Extensions.Logging, AWSSDK.Core). When the index is missing or
paged, the versions now come from the cached flat container, dated where
the registration dates them.
The fixtures are a real Gemfile.lock from Bundler 2.6 (a platform gem, a git
gem, a path gem, a test group; the native builds of the platform gem added
by hand in Bundler's format, which Bundler 2.6 would not lock here) and a
real packages.lock.json from .NET 10 (a project reference), renamed to acme.
Fuzz targets for both. Checked end to end against RubyGems and NuGet proxies
to rubygems.org and nuget.org behind groups: cold proxies answer unknown and
--fetch makes all available (a paged registration included); a minimum age
holds the gems with their until times; a NuGet curation rule holds
Newtonsoft.Json 13.0.3 (the flat container served to restore omits 13.x);
a version upstream lacks is not_found.
go.sum is left out: it records no dependency graph, so "required by" could
not be told, and needs go.mod read with it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
M0Rf30
force-pushed
the
feat/lockfile-gem-go-nuget
branch
from
November 16, 2026 15:32
613cd98 to
16d8519
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
oa check reads Gemfile.lock (GEM sections; a gem locked for several platforms is one version) and packages.lock.json (every target framework; project references left out); --fetch requests info/ or the flat container version list, as bundle install and dotnet restore do.
Two proxy fixes so the check can answer from those documents: a RubyGems proxy listed versions only from api/v1/versions, fetched only for the minimum age (now falls back to the cached info file), and a NuGet proxy only from the inline items of the registration index, which restore never fetches and nuget.org pages for big packages (now falls back to the cached flat container, dated where the registration dates them).
Checked end to end against proxies to rubygems.org and nuget.org: unknown when cold, all available after --fetch (paged registration included), a minimum age holds gems with their until times, a curation rule holds Newtonsoft.Json 13.0.3 as restore sees it, a missing version is not_found. go.sum is left out (no dependency graph; needs go.mod).
🤖 Generated with Claude Code