From ff434dd0cfa7a986d5dd548ce375146c22791e14 Mon Sep 17 00:00:00 2001 From: Jonathan Yoder Date: Sat, 21 Nov 2026 07:23:59 -0500 Subject: [PATCH 1/2] Split Resolve into ResolveFirst and FirstSolve.UpgradePass A caller can run every first solve before any upgrade pass. Resolve now uses the same path, so the two give the same answer and report. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 4 + CLAUDE.md | 5 +- resolver/firstsolve.go | 79 +++++++++ resolver/firstsolve_test.go | 323 ++++++++++++++++++++++++++++++++++++ resolver/resolver.go | 13 +- 5 files changed, 415 insertions(+), 9 deletions(-) create mode 100644 resolver/firstsolve.go create mode 100644 resolver/firstsolve_test.go diff --git a/CHANGELOG.md b/CHANGELOG.md index a3b3734..b73bf79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,10 @@ served it. ## [Unreleased] +### Added + +- `ResolveFirst` runs only the first solve, and its `FirstSolve.UpgradePass` runs the `UpgradeRoots` pass later from that answer without solving it again. A caller can finish every first solve before any pass starts, and gets exactly what `Resolve` returns, report and bounds included. + ## [0.28.0] - 2026-11-20 ### Added diff --git a/CLAUDE.md b/CLAUDE.md index 2039f82..d3e703a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -7,8 +7,9 @@ Phase 3. > **Status: implemented end to end.** `pypirsf/`, `index/`, `pep440set/`, > `candidate/`, `provider/` and `resolver/` all carry code. `resolver.Resolve` > is the entry point; keep its exported surface to `Resolve`, `Options`, -> `Resolution`, `ResolutionError`, `MissingExtra`, `YankedPin`, `UpgradeReport` -> and `Requester`. +> `Resolution`, `ResolutionError`, `MissingExtra`, `YankedPin`, `UpgradeReport`, +> `Requester`, and `ResolveFirst` with `FirstSolve` (methods `Resolution` and +> `UpgradePass`), which split `Resolve` into its first solve and its pass. > > ⚠️ `resolver` is **no longer the only package Package Manager imports**. PPM > implements its own `MetadataIndex` (`src/pyindex`) and imports `index/` for the diff --git a/resolver/firstsolve.go b/resolver/firstsolve.go new file mode 100644 index 0000000..3eead60 --- /dev/null +++ b/resolver/firstsolve.go @@ -0,0 +1,79 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + +package resolver + +import ( + "context" + "slices" + "time" + + "github.com/posit-dev/go-pyresolver/index" + "github.com/posit-dev/go-python-packaging/requirement" +) + +// FirstSolve holds a first answer so the UpgradeRoots pass can run later +// without solving it again. Make one with ResolveFirst. It is safe for concurrent use. +type FirstSolve struct { + reqs []requirement.Requirement + idx index.MetadataIndex + opts Options + res *Resolution + + // dur and steps are what the first solve took. The pass's time and step + // bounds are relative to them. + dur time.Duration + steps int +} + +// ResolveFirst runs the first solve of Resolve, with no UpgradeRoots pass. It +// fails as Resolve does. FirstSolve.UpgradePass runs the pass later. +func ResolveFirst( + ctx context.Context, + reqs []requirement.Requirement, + idx index.MetadataIndex, + opts Options, +) (*FirstSolve, error) { + opts.AllowPrerelease = slices.Clone(opts.AllowPrerelease) + return resolveFirst(ctx, slices.Clone(reqs), idx, opts) +} + +// resolveFirst is ResolveFirst without the copies; it keeps reqs and opts. +func resolveFirst( + ctx context.Context, + reqs []requirement.Requirement, + idx index.MetadataIndex, + opts Options, +) (*FirstSolve, error) { + start := now() + steps := &stepMeter{} + res, err := resolveOnce(ctx, reqs, idx, opts, steps) + if err != nil { + return nil, err + } + return &FirstSolve{ + reqs: reqs, idx: idx, opts: opts, res: res, + dur: now().Sub(start), steps: steps.used, + }, nil +} + +// Resolution returns the first answer, the one Resolve returns with the pass +// off. Each call returns a new copy. +func (f *FirstSolve) Resolution() *Resolution { + return cloneResolution(f.res) +} + +// UpgradePass runs the UpgradeRoots pass from the first answer and returns what +// Resolve returns for the same inputs. It never fails: with UpgradeRoots at zero +// or ctx already ended, it returns the first answer. +func (f *FirstSolve) UpgradePass(ctx context.Context) *Resolution { + return f.pass(ctx, cloneResolution(f.res)) +} + +// pass runs the pass from base, an answer equal to f.res that the result may +// hold. With the pass off it returns base. +func (f *FirstSolve) pass(ctx context.Context, base *Resolution) *Resolution { + if f.opts.UpgradeRoots <= 0 { + return base + } + return upgradeRoots(ctx, f.reqs, f.idx, f.opts, base, f.dur, f.steps) +} diff --git a/resolver/firstsolve_test.go b/resolver/firstsolve_test.go new file mode 100644 index 0000000..02b8e5d --- /dev/null +++ b/resolver/firstsolve_test.go @@ -0,0 +1,323 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT + +package resolver_test + +import ( + "context" + "reflect" + "sync" + "testing" + "time" + + "github.com/posit-dev/go-pyresolver/index" + "github.com/posit-dev/go-pyresolver/resolver" +) + +// twoPhaseCase is one fixture with the options the pass runs under. +type twoPhaseCase struct { + name string + idx index.MetadataIndex + reqs []string + set func(*resolver.Options) +} + +// twoPhaseCases are the upgrade fixtures the equivalence tests run. +func twoPhaseCases(t *testing.T) []twoPhaseCase { + t.Helper() + none := func(*resolver.Options) {} + early, earlyReqs := earlyGain() + late, lateReqs := lateGain() + base, re := unbounded(t) + // factor reaches budget steps from the first solve's steps, rounding down. + factor := func(budget int) float64 { return (float64(budget) + 0.5) / float64(base) } + cases := []twoPhaseCase{ + {"major behind", upgradeFixture(), []string{"a", "b"}, none}, + {"early gain", early, earlyReqs, none}, + {"late gain", late, lateReqs, none}, + {"time factor 1", late, lateReqs, func(o *resolver.Options) { o.UpgradeTimeFactor = 1 }}, + {"time factor 1.5", late, lateReqs, func(o *resolver.Options) { o.UpgradeTimeFactor = 1.5 }}, + {"early time factor 1", early, earlyReqs, func(o *resolver.Options) { o.UpgradeTimeFactor = 1 }}, + {"max time", late, lateReqs, func(o *resolver.Options) { o.UpgradeMaxTime = solveCost }}, + {"step factor short", late, lateReqs, func(o *resolver.Options) { o.UpgradeStepFactor = factor(re[0] + re[1] - 1) }}, + {"step factor exact", late, lateReqs, func(o *resolver.Options) { o.UpgradeStepFactor = factor(re[0] + re[1]) }}, + {"max steps", late, lateReqs, func(o *resolver.Options) { o.UpgradeMaxSteps = re[0] }}, + {"budget 1", late, lateReqs, func(o *resolver.Options) { o.UpgradeRoots = 1 }}, + } + for _, d := range rootMovingDownCases() { + cases = append(cases, twoPhaseCase{"down: " + d.name, d.idx, d.reqs, none}) + } + return cases +} + +// rootMovingDownCases are the fixtures of TestUpgradeRootsRootMovingDown. +func rootMovingDownCases() []struct { + name string + idx *index.MockIndex + reqs []string +} { + return []struct { + name string + idx *index.MockIndex + reqs []string + }{ + {"final to an older pre-release", index.NewMockIndex("test"). + AddVersion("a", "1.0rc1"). + AddVersion("a", "1.0", "n<2").AddVersion("a", "1.1", "n<2"). + AddVersion("n", "1.0").AddVersion("n", "1.1"). + AddVersion("n", "1.2").AddVersion("n", "2.0"), []string{"a==1.*", "n"}}, + {"final to an older final", index.NewMockIndex("test"). + AddVersion("a", "1.0"). + AddVersion("a", "1.1", "n<2"). + AddVersion("n", "1.0").AddVersion("n", "1.1").AddVersion("n", "2.0"), []string{"a", "n"}}, + {"pre-release to a newer final", index.NewMockIndex("test"). + AddVersion("p", "1.0rc1"). + AddVersion("p", "2.0", "q<2").AddVersion("p", "3.0", "q<2"). + AddVersion("q", "1.0").AddVersion("q", "2.0"), []string{"p", "q"}}, + } +} + +// clocked runs f on a fake clock where each solve takes solveCost, and +// returns the steps of each resolution f ran. +func clocked(f func()) []int { + clock := time.Unix(0, 0) + restoreClock := resolver.SetClock(func() time.Time { return clock }) + defer restoreClock() + defer resolver.OnSolve(func() { clock = clock.Add(solveCost) })() + steps, restore := resolver.RecordSteps() + defer restore() + f() + return steps() +} + +func twoPhaseOptions(t *testing.T, set func(*resolver.Options)) resolver.Options { + t.Helper() + opts := testOptions(t) + opts.UpgradeRoots = 40 + set(&opts) + return opts +} + +// The first solve then UpgradePass gives exactly what Resolve gives, report +// included, and re-solves at the same steps. +func TestTwoPhaseMatchesResolve(t *testing.T) { + for _, tc := range twoPhaseCases(t) { + t.Run(tc.name, func(t *testing.T) { + opts := twoPhaseOptions(t, tc.set) + reqs := mustRequirements(t, tc.reqs...) + var want, got *resolver.Resolution + wantSteps := clocked(func() { + var err error + if want, err = resolver.Resolve(context.Background(), reqs, tc.idx, opts); err != nil { + t.Fatal(err) + } + }) + gotSteps := clocked(func() { + first, err := resolver.ResolveFirst(context.Background(), reqs, tc.idx, opts) + if err != nil { + t.Fatal(err) + } + got = first.UpgradePass(context.Background()) + }) + if want.Upgrade == nil { + t.Fatal("Resolve gave no report with the pass on") + } + if !reflect.DeepEqual(got, want) { + t.Errorf("two phases gave\n%+v (report %+v)\nResolve gave\n%+v (report %+v)", + got, got.Upgrade, want, want.Upgrade) + } + if !reflect.DeepEqual(gotSteps, wantSteps) { + t.Errorf("steps per solve: two phases %v, Resolve %v", gotSteps, wantSteps) + } + }) + } +} + +// The step bound is relative to the first solve's steps: a factor one step +// short of the gain stops the pass on the same re-solve, at the same step. +func TestTwoPhaseStepBoundIsRelativeToFirstSolve(t *testing.T) { + base, re := unbounded(t) + idx, reqs := lateGain() + for _, tc := range []struct { + name string + budget int + want map[string]string + }{ + {"short", re[0] + re[1] - 1, lateBase}, + {"exact", re[0] + re[1], lateZ}, + } { + opts := twoPhaseOptions(t, func(o *resolver.Options) { + o.UpgradeStepFactor = (float64(tc.budget) + 0.5) / float64(base) + }) + var got *resolver.Resolution + steps := clocked(func() { + first, err := resolver.ResolveFirst(context.Background(), mustRequirements(t, reqs...), idx, opts) + if err != nil { + t.Fatal(err) + } + got = first.UpgradePass(context.Background()) + }) + if len(steps) == 0 || steps[0] != base { + t.Fatalf("%s: steps %v, want the first solve at %d", tc.name, steps, base) + } + if p := pins(t, got); !reflect.DeepEqual(p, tc.want) || sum(steps[1:]) != tc.budget { + t.Errorf("%s: got %v using %d steps, want %v using %d", tc.name, p, sum(steps[1:]), tc.want, tc.budget) + } + if got.Upgrade == nil || got.Upgrade.StoppedByTime { + t.Errorf("%s: report %+v, want one not stopped by time", tc.name, got.Upgrade) + } + } +} + +// A ctx that ended before the pass gives the first answer, stopped by time, +// with no error and no re-solve. +func TestTwoPhaseEndedCtxGivesFirst(t *testing.T) { + idx, reqs := earlyGain() + want := passOff(t, idx, reqs) + first, err := resolver.ResolveFirst(context.Background(), mustRequirements(t, reqs...), idx, twoPhaseOptions(t, func(*resolver.Options) {})) + if err != nil { + t.Fatal(err) + } + ctx, cancel := context.WithCancel(context.Background()) + cancel() + count, restore := resolver.CountSolves() + defer restore() + got := first.UpgradePass(ctx) + if n := count(); n != 0 { + t.Errorf("%d re-solves after the ctx ended, want 0", n) + } + if got.Upgrade == nil || !got.Upgrade.StoppedByTime { + t.Fatalf("report %+v, want StoppedByTime", got.Upgrade) + } + if !reflect.DeepEqual(got.Upgrade.First, want) { + t.Errorf("First = %+v, want the pass-off answer %+v", got.Upgrade.First, want) + } + kept := *got + kept.Upgrade = nil + if !reflect.DeepEqual(&kept, want) { + t.Errorf("kept %+v, want the first answer %+v", &kept, want) + } +} + +// With the pass off, UpgradePass gives the first answer with no report, and +// Resolution gives the same answer. +func TestTwoPhasePassOff(t *testing.T) { + idx, reqs := earlyGain() + want := passOff(t, idx, reqs) + first, err := resolver.ResolveFirst(context.Background(), mustRequirements(t, reqs...), idx, testOptions(t)) + if err != nil { + t.Fatal(err) + } + if got := first.UpgradePass(context.Background()); !reflect.DeepEqual(got, want) { + t.Errorf("UpgradePass = %+v, want %+v", got, want) + } + if got := first.Resolution(); !reflect.DeepEqual(got, want) { + t.Errorf("Resolution = %+v, want %+v", got, want) + } +} + +// ResolveFirst runs no pass even with UpgradeRoots set, and fails as Resolve does. +func TestResolveFirstRunsNoPass(t *testing.T) { + idx, reqs := earlyGain() + want := passOff(t, idx, reqs) + opts := twoPhaseOptions(t, func(*resolver.Options) {}) + count, restore := resolver.CountSolves() + defer restore() + first, err := resolver.ResolveFirst(context.Background(), mustRequirements(t, reqs...), idx, opts) + if err != nil { + t.Fatal(err) + } + if n := count(); n != 1 { + t.Errorf("%d solves, want 1", n) + } + if got := first.Resolution(); !reflect.DeepEqual(got, want) { + t.Errorf("Resolution = %+v, want %+v", got, want) + } + + conflict := mustRequirements(t, "a==1.0", "a==2.0") + _, wantErr := resolver.Resolve(context.Background(), conflict, idx, opts) + got, err := resolver.ResolveFirst(context.Background(), conflict, idx, opts) + if wantErr == nil || err == nil || err.Error() != wantErr.Error() || got != nil { + t.Errorf("ResolveFirst = %v, %v; want nil, %v", got, err, wantErr) + } +} + +// Changing what UpgradePass or Resolution returned, or the caller's inputs, +// does not change a later UpgradePass. +func TestTwoPhaseResultsShareNothing(t *testing.T) { + idx, reqs := earlyGain() + opts := twoPhaseOptions(t, func(*resolver.Options) {}) + want, err := resolver.Resolve(context.Background(), mustRequirements(t, reqs...), idx, opts) + if err != nil { + t.Fatal(err) + } + in := mustRequirements(t, reqs...) + first, err := resolver.ResolveFirst(context.Background(), in, idx, opts) + if err != nil { + t.Fatal(err) + } + in[0] = mustRequirements(t, "a<2")[0] + for range 2 { + got := first.UpgradePass(context.Background()) + if !reflect.DeepEqual(got, want) { + t.Fatalf("UpgradePass = %+v, want %+v", got, want) + } + for _, r := range []*resolver.Resolution{got, got.Upgrade.First, first.Resolution()} { + clear(r.Pinned) + r.Order[0] = "changed" + } + } +} + +// Many first solves run on some goroutines and their passes on others, at +// once. Run with -race. +func TestTwoPhaseAcrossGoroutines(t *testing.T) { + type job struct { + tc twoPhaseCase + opts resolver.Options + want *resolver.Resolution + first *resolver.FirstSolve + } + var jobs []*job + for _, tc := range twoPhaseCases(t) { + // No fake clock here: a real one makes the time-bound cases vary. + probe := twoPhaseOptions(t, tc.set) + if probe.UpgradeTimeFactor > 0 || probe.UpgradeMaxTime > 0 { + continue + } + want, err := resolver.Resolve(context.Background(), mustRequirements(t, tc.reqs...), tc.idx, probe) + if err != nil { + t.Fatal(err) + } + jobs = append(jobs, &job{tc: tc, opts: probe, want: want}) + } + firsts := make(chan *job) + var solvers sync.WaitGroup + for _, j := range jobs { + solvers.Add(1) + go func() { + defer solvers.Done() + first, err := resolver.ResolveFirst(context.Background(), mustRequirements(t, j.tc.reqs...), j.tc.idx, j.opts) + if err != nil { + t.Error(err) + return + } + j.first = first + firsts <- j + }() + } + go func() { solvers.Wait(); close(firsts) }() + + var passes sync.WaitGroup + for j := range firsts { + for range 2 { + passes.Add(1) + go func() { + defer passes.Done() + if got := j.first.UpgradePass(context.Background()); !reflect.DeepEqual(got, j.want) { + t.Errorf("%s: two phases gave %+v, want %+v", j.tc.name, got, j.want) + } + }() + } + } + passes.Wait() +} diff --git a/resolver/resolver.go b/resolver/resolver.go index 25a82a1..6f3cef7 100644 --- a/resolver/resolver.go +++ b/resolver/resolver.go @@ -194,7 +194,7 @@ type Options struct { // UpgradeTimeFactor, when above zero, bounds the UpgradeRoots pass in time: // the pass ends once it has run for this many times as long as the first - // solve took, in this Resolve call. A re-solve still running at that point + // solve took, in Resolve or ResolveFirst. A re-solve still running at that point // is stopped and counts as no gain. Easy solves stay fully upgraded; hard // ones are bounded. Zero (the default) means no time bound. // @@ -411,13 +411,12 @@ func Resolve( idx index.MetadataIndex, opts Options, ) (*Resolution, error) { - start := now() - steps := &stepMeter{} - res, err := resolveOnce(ctx, reqs, idx, opts, steps) - if err != nil || opts.UpgradeRoots <= 0 { - return res, err + // The same path as ResolveFirst then UpgradePass, minus their copies. + f, err := resolveFirst(ctx, reqs, idx, opts) + if err != nil { + return nil, err } - return upgradeRoots(ctx, reqs, idx, opts, res, now().Sub(start), steps.used), nil + return f.pass(ctx, f.res), nil } // stepMeter counts the solver steps of one resolution, across all its solves, From 1409dedd43fab43289015899428a59807511ed94 Mon Sep 17 00:00:00 2001 From: Jonathan Yoder Date: Sat, 21 Nov 2026 07:42:24 -0500 Subject: [PATCH 2/2] Test the gap between phases and the AllowPrerelease copy Also list the full supported surface and say what ResolveFirst keeps by reference. Co-Authored-By: Claude Opus 5.5 --- resolver/firstsolve.go | 1 + resolver/firstsolve_test.go | 78 ++++++++++++++++++++++++++++++++++++- resolver/resolver.go | 6 +-- 3 files changed, 81 insertions(+), 4 deletions(-) diff --git a/resolver/firstsolve.go b/resolver/firstsolve.go index 3eead60..f9679e7 100644 --- a/resolver/firstsolve.go +++ b/resolver/firstsolve.go @@ -27,6 +27,7 @@ type FirstSolve struct { // ResolveFirst runs the first solve of Resolve, with no UpgradeRoots pass. It // fails as Resolve does. FirstSolve.UpgradePass runs the pass later. +// It keeps idx, RankMemo, WheelTags and Policy by reference: do not change them before UpgradePass. func ResolveFirst( ctx context.Context, reqs []requirement.Requirement, diff --git a/resolver/firstsolve_test.go b/resolver/firstsolve_test.go index 02b8e5d..31e1249 100644 --- a/resolver/firstsolve_test.go +++ b/resolver/firstsolve_test.go @@ -79,13 +79,18 @@ func rootMovingDownCases() []struct { // clocked runs f on a fake clock where each solve takes solveCost, and // returns the steps of each resolution f ran. func clocked(f func()) []int { + return clockedGap(func(func(time.Duration)) { f() }) +} + +// clockedGap is clocked, but f may also move the clock with advance. +func clockedGap(f func(advance func(time.Duration))) []int { clock := time.Unix(0, 0) restoreClock := resolver.SetClock(func() time.Time { return clock }) defer restoreClock() defer resolver.OnSolve(func() { clock = clock.Add(solveCost) })() steps, restore := resolver.RecordSteps() defer restore() - f() + f(func(d time.Duration) { clock = clock.Add(d) }) return steps() } @@ -132,6 +137,77 @@ func TestTwoPhaseMatchesResolve(t *testing.T) { } } +// Time between ResolveFirst and UpgradePass counts toward neither the first +// solve's duration nor the pass's time. +func TestTwoPhaseGapBetweenPhasesIsNotCounted(t *testing.T) { + late, lateReqs := lateGain() + early, earlyReqs := earlyGain() + for _, tc := range []twoPhaseCase{ + {"time factor 1", late, lateReqs, func(o *resolver.Options) { o.UpgradeTimeFactor = 1 }}, + {"time factor 1.5", late, lateReqs, func(o *resolver.Options) { o.UpgradeTimeFactor = 1.5 }}, + {"early time factor 1", early, earlyReqs, func(o *resolver.Options) { o.UpgradeTimeFactor = 1 }}, + {"max time 1 solve", late, lateReqs, func(o *resolver.Options) { o.UpgradeMaxTime = solveCost }}, + {"max time 2 solves", late, lateReqs, func(o *resolver.Options) { o.UpgradeMaxTime = 2 * solveCost }}, + } { + t.Run(tc.name, func(t *testing.T) { + opts := twoPhaseOptions(t, tc.set) + reqs := mustRequirements(t, tc.reqs...) + var want, got *resolver.Resolution + wantSteps := clocked(func() { + var err error + if want, err = resolver.Resolve(context.Background(), reqs, tc.idx, opts); err != nil { + t.Fatal(err) + } + }) + gotSteps := clockedGap(func(advance func(time.Duration)) { + first, err := resolver.ResolveFirst(context.Background(), reqs, tc.idx, opts) + if err != nil { + t.Fatal(err) + } + advance(time.Hour) + got = first.UpgradePass(context.Background()) + }) + if !reflect.DeepEqual(got, want) { + t.Errorf("after a gap, two phases gave %v (report %+v), Resolve gave %v (report %+v)", + pins(t, got), got.Upgrade, pins(t, want), want.Upgrade) + } + if !reflect.DeepEqual(gotSteps, wantSteps) { + t.Errorf("steps per solve: two phases %v, Resolve %v", gotSteps, wantSteps) + } + }) + } +} + +// The pass uses the AllowPrerelease the first solve saw, even if the caller +// changes its slice in between. +func TestTwoPhaseKeepsAllowPrerelease(t *testing.T) { + // a 3.1rc1 is newest; named in AllowPrerelease it outranks 3.0, and the pass + // will not move a root from a final to a pre-release. + idx := upgradeFixture().AddVersion("a", "3.1rc1") + reqs := mustRequirements(t, "a", "b") + opts := twoPhaseOptions(t, func(*resolver.Options) {}) + without, err := resolver.Resolve(context.Background(), reqs, idx, opts) + if err != nil { + t.Fatal(err) + } + opts.AllowPrerelease = []index.PackageName{index.NewPackageName("a")} + want, err := resolver.Resolve(context.Background(), reqs, idx, opts) + if err != nil { + t.Fatal(err) + } + if reflect.DeepEqual(pins(t, want), pins(t, without)) { + t.Fatalf("fixture: AllowPrerelease changes nothing (%v)", pins(t, want)) + } + first, err := resolver.ResolveFirst(context.Background(), reqs, idx, opts) + if err != nil { + t.Fatal(err) + } + opts.AllowPrerelease[0] = index.NewPackageName("unrelated") + if got := first.UpgradePass(context.Background()); !reflect.DeepEqual(got, want) { + t.Errorf("after changing the caller's AllowPrerelease, got %v, want %v", pins(t, got), pins(t, want)) + } +} + // The step bound is relative to the first solve's steps: a factor one step // short of the gain stops the pass on the same re-solve, at the same step. func TestTwoPhaseStepBoundIsRelativeToFirstSolve(t *testing.T) { diff --git a/resolver/resolver.go b/resolver/resolver.go index 6f3cef7..2d78076 100644 --- a/resolver/resolver.go +++ b/resolver/resolver.go @@ -28,9 +28,9 @@ import ( // requires_dist is exactly that: arbitrary text published by third parties. // A resolution that hits this bound fails loudly instead of hanging. // -// Unexported: this package's supported surface is Resolve, Options, Resolution, -// ResolutionError, MissingExtra and Requester, and a consumer that wants a -// specific bound sets one. +// Unexported: this package's supported surface is Resolve, ResolveFirst, +// FirstSolve, Options, Resolution, ResolutionError, MissingExtra, YankedPin, +// UpgradeReport and Requester, and a consumer that wants a specific bound sets one. const defaultMaxRounds = 10_000 // Options configures one resolution.