No checked-out library copy or comment says placement; the claude-code fixture and seat-list test pass at the merge (issue 1966)
Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
This commit is contained in:
@@ -155,7 +155,7 @@ func (m *Module) placePin(ctx context.Context, root string, p pin, failure strin
|
||||
}
|
||||
return "", fmt.Errorf("the pin of %s at commit %s is on no pull request head of %s on the forge; go said: %s", p.module, p.short, repository, causeLine(failure))
|
||||
}
|
||||
// One placement per repository and commit, shared by every go.mod directory of the tree that pins it.
|
||||
// One laid copy per repository and commit, shared by every go.mod directory of the tree that pins it.
|
||||
at := filepath.Join(root, "pinned", p.repo+"@"+commit)
|
||||
where := filepath.Join(at, "beside", p.repo, filepath.FromSlash(p.sub))
|
||||
if _, err := os.Stat(filepath.Join(at, "beside", p.repo)); err == nil {
|
||||
|
||||
@@ -190,8 +190,8 @@ func TestAVendoringDirectoryResolvesNothing(t *testing.T) {
|
||||
}
|
||||
|
||||
// 1148/AC1 (a repository with several go.mod directories, as mesh-catalog has): two directories pinning the same pull
|
||||
// head share one placement and both are handed a modfile; the fetch does not fail placing it twice.
|
||||
func TestTwoDirectoriesPinningOneHeadShareOnePlacement(t *testing.T) {
|
||||
// head share one laid copy and both are handed a modfile; the fetch does not fail laying it twice.
|
||||
func TestTwoDirectoriesPinningOneHeadShareOneCopy(t *testing.T) {
|
||||
h, states := newPinHarness(t, pinnedGoMod, false, pullList)
|
||||
h.f.gomods = "go.mod\nsub/go.mod\n"
|
||||
res, st := h.fetch(states)
|
||||
@@ -214,8 +214,8 @@ func TestTwoDirectoriesPinningOneHeadShareOnePlacement(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// 1148/AC1: two directories pinning two different commits of one repository get two placements, each its own.
|
||||
func TestTwoCommitsOfOneRepositoryGetTwoPlacements(t *testing.T) {
|
||||
// 1148/AC1: two directories pinning two different commits of one repository get two copies, each its own.
|
||||
func TestTwoCommitsOfOneRepositoryGetTwoCopies(t *testing.T) {
|
||||
other := "fedcba9876543210fedcba9876543210fedcba98"
|
||||
h, states := newPinHarness(t, pinnedGoMod, false, commitSHA+"\trefs/pull/7/head\n"+other+"\trefs/pull/8/head\n")
|
||||
h.f.gomods = "go.mod\nsub/go.mod\n"
|
||||
@@ -245,7 +245,7 @@ func TestTwoCommitsOfOneRepositoryGetTwoPlacements(t *testing.T) {
|
||||
}
|
||||
for _, c := range []string{commitSHA, other} {
|
||||
if !h.ran("pinned/mesh-sdk@" + c) {
|
||||
t.Errorf("no placement of mesh-sdk at %s", c)
|
||||
t.Errorf("no copy of mesh-sdk at %s", c)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ type downloadInfo struct {
|
||||
// takeVersions writes the asked versions into the modfile of dir (d in the tree) and answers what it took, one entry per
|
||||
// asked package its go.mod requires. A package go.mod replaces is built as go.mod says, and said. A version that can be
|
||||
// neither fetched nor found among the forge's pull request heads fails the fetch, naming it. pins serialises the
|
||||
// placements a workspace's directories share.
|
||||
// laid copies a workspace's directories share.
|
||||
func (m *Module) takeVersions(ctx context.Context, root, dir, d string, asked sdkstep.PackageVersions, pins *sync.Mutex) ([]TakenVersion, error) {
|
||||
raw, err := os.ReadFile(filepath.Join(dir, "go.mod"))
|
||||
if err != nil {
|
||||
|
||||
@@ -426,7 +426,7 @@ func (h *Holder) warmRootFree(force bool) {
|
||||
}
|
||||
|
||||
// rootWordFor asks the root-free word for a kind fresh, before the work is taken, and answers
|
||||
// what judging an answer of that kind then reads: the word for that very kind's placement, or why there is none.
|
||||
// what judging an answer of that kind then reads: the word for that very kind's own, or why there is none.
|
||||
// A kind that does not prove its sender is asked nothing: its answers never approve.
|
||||
func (h *Holder) rootWordFor(kind string) func(KindInfo) string {
|
||||
if h.Bench == nil {
|
||||
|
||||
Reference in New Issue
Block a user