v, ok = rs.rootSelected(loaderstate, path)
}
if !ok {
- mg, err := rs.Graph(modfetch.Fetcher_, loaderstate, ctx)
+ mg, err := rs.Graph(loaderstate, ctx)
if err != nil {
base.Fatal(err)
}
checksumOk := func(suffix string) bool {
return rs == nil || m.Version == "" || !mustHaveSums(loaderstate) ||
- modfetch.HaveSum(modfetch.Fetcher_, module.Version{Path: m.Path, Version: m.Version + suffix})
+ modfetch.HaveSum(loaderstate.Fetcher(), module.Version{Path: m.Path, Version: m.Version + suffix})
}
mod := module.Version{Path: m.Path, Version: m.Version}
if m.GoVersion == "" && checksumOk("/go.mod") {
// Load the go.mod file to determine the Go version, since it hasn't
// already been populated from rawGoVersion.
- if summary, err := rawGoModSummary(modfetch.Fetcher_, loaderstate, mod); err == nil && summary.goVersion != "" {
+ if summary, err := rawGoModSummary(loaderstate, mod); err == nil && summary.goVersion != "" {
m.GoVersion = summary.goVersion
}
}
"cmd/go/internal/base"
"cmd/go/internal/cfg"
"cmd/go/internal/gover"
- "cmd/go/internal/modfetch"
"cmd/go/internal/mvs"
"cmd/internal/par"
//
// If the requirements of any relevant module fail to load, Graph also
// returns a non-nil error of type *mvs.BuildListError.
-func (rs *Requirements) Graph(fetcher_ *modfetch.Fetcher, loaderstate *State, ctx context.Context) (*ModuleGraph, error) {
+func (rs *Requirements) Graph(loaderstate *State, ctx context.Context) (*ModuleGraph, error) {
rs.graphOnce.Do(func() {
- mg, mgErr := readModGraph(fetcher_, loaderstate, ctx, rs.pruning, rs.rootModules, nil)
+ mg, mgErr := readModGraph(loaderstate, ctx, rs.pruning, rs.rootModules, nil)
rs.graph.Store(&cachedGraph{mg, mgErr})
})
cached := rs.graph.Load()
//
// Unlike LoadModGraph, readModGraph does not attempt to diagnose or update
// inconsistent roots.
-func readModGraph(f *modfetch.Fetcher, loaderstate *State, ctx context.Context, pruning modPruning, roots []module.Version, unprune map[module.Version]bool) (*ModuleGraph, error) {
+func readModGraph(loaderstate *State, ctx context.Context, pruning modPruning, roots []module.Version, unprune map[module.Version]bool) (*ModuleGraph, error) {
mustHaveGoRoot(roots)
if pruning == pruned {
// Enable diagnostics for lazy module loading
// m's go.mod file indicates that it supports graph pruning.
loadOne := func(m module.Version) (*modFileSummary, error) {
return mg.loadCache.Do(m, func() (*modFileSummary, error) {
- summary, err := goModSummary(f, loaderstate, m)
+ summary, err := goModSummary(loaderstate, m)
mu.Lock()
if err == nil {
rs = newRequirements(loaderstate, unpruned, rs.rootModules, rs.direct)
}
- return rs.Graph(modfetch.Fetcher_, loaderstate, ctx)
+ return rs.Graph(loaderstate, ctx)
}
rs, mg, err := expandGraph(loaderstate, ctx, rs)
// expandGraph returns non-nil requirements and a non-nil graph regardless of
// errors. On error, the roots might not be updated to be consistent.
func expandGraph(loaderstate *State, ctx context.Context, rs *Requirements) (*Requirements, *ModuleGraph, error) {
- mg, mgErr := rs.Graph(modfetch.Fetcher_, loaderstate, ctx)
+ mg, mgErr := rs.Graph(loaderstate, ctx)
if mgErr != nil {
// Without the graph, we can't update the roots: we don't know which
// versions of transitive dependencies would be selected.
return rs, mg, rsErr
}
rs = newRS
- mg, mgErr = rs.Graph(modfetch.Fetcher_, loaderstate, ctx)
+ mg, mgErr = rs.Graph(loaderstate, ctx)
}
return rs, mg, mgErr
for len(queue) > 0 {
roots = tidy.rootModules
- mg, err := tidy.Graph(modfetch.Fetcher_, loaderstate, ctx)
+ mg, err := tidy.Graph(loaderstate, ctx)
if err != nil {
return nil, err
}
}
roots = tidy.rootModules
- _, err := tidy.Graph(modfetch.Fetcher_, loaderstate, ctx)
+ _, err := tidy.Graph(loaderstate, ctx)
if err != nil {
return nil, err
}
if len(roots) > len(tidy.rootModules) {
module.Sort(roots)
tidy = newRequirements(loaderstate, pruned, roots, tidy.direct)
- _, err = tidy.Graph(modfetch.Fetcher_, loaderstate, ctx)
+ _, err = tidy.Graph(loaderstate, ctx)
if err != nil {
return nil, err
}
rs = newRequirements(loaderstate, pruned, roots, direct)
var err error
- mg, err = rs.Graph(modfetch.Fetcher_, loaderstate, ctx)
+ mg, err = rs.Graph(loaderstate, ctx)
if err != nil {
return rs, err
}
// We've already loaded the full module graph, which includes the
// requirements of all of the root modules — even the transitive
// requirements, if they are unpruned!
- mg, _ = rs.Graph(modfetch.Fetcher_, loaderstate, ctx)
+ mg, _ = rs.Graph(loaderstate, ctx)
} else if cfg.BuildMod == "vendor" {
// We can't spot-check the requirements of other modules because we
// don't in general have their go.mod files available in the vendor
// inconsistent in some way; we need to load the full module graph
// so that we can fix the roots properly.
var err error
- mg, err = rs.Graph(modfetch.Fetcher_, loaderstate, ctx)
+ mg, err = rs.Graph(loaderstate, ctx)
if err != nil {
return rs, err
}
return
}
- summary, err := goModSummary(modfetch.Fetcher_, loaderstate, m)
+ summary, err := goModSummary(loaderstate, m)
if err != nil {
cancel()
return
// 4. Every version in add is selected at its given version unless upgraded by
// (the dependencies of) an existing root or another module in add.
func updateUnprunedRoots(loaderstate *State, ctx context.Context, direct map[string]bool, rs *Requirements, add []module.Version) (*Requirements, error) {
- mg, err := rs.Graph(modfetch.Fetcher_, loaderstate, ctx)
+ mg, err := rs.Graph(loaderstate, ctx)
if err != nil {
// We can't ignore errors in the module graph even if the user passed the -e
// flag to try to push past them. If we can't load the complete module
// root set! “Include the transitive dependencies of every module in the build
// list” is exactly what happens in a pruned module if we promote every module
// in the build list to a root.
- mg, err := rs.Graph(modfetch.Fetcher_, loaderstate, ctx)
+ mg, err := rs.Graph(loaderstate, ctx)
if err != nil {
return rs, err
}
package modload
import (
- "cmd/go/internal/cfg"
- "cmd/go/internal/gover"
- "cmd/go/internal/modfetch"
- "cmd/go/internal/mvs"
- "cmd/internal/par"
"context"
"errors"
"fmt"
"os"
"slices"
+ "cmd/go/internal/cfg"
+ "cmd/go/internal/gover"
+ "cmd/go/internal/mvs"
+ "cmd/internal/par"
+
"golang.org/x/mod/module"
)
// dependencies, so we need to treat everything in the build list as
// potentially relevant — that is, as what would be a “root” in a module
// with graph pruning enabled.
- mg, err := rs.Graph(modfetch.Fetcher_, loaderstate, ctx)
+ mg, err := rs.Graph(loaderstate, ctx)
if err != nil {
// If we couldn't load the graph, we don't know what its requirements were
// to begin with, so we can't edit those requirements in a coherent way.
// the edit. We want to make sure we consider keeping it as-is,
// even if it wouldn't normally be included. (For example, it might
// be a pseudo-version or pre-release.)
- origMG, _ := orig.Graph(modfetch.Fetcher_, loaderstate, ctx)
+ origMG, _ := orig.Graph(loaderstate, ctx)
origV := origMG.Selected(m.Path)
if conflict.Err != nil && origV == m.Version {
// some root to that version.
func extendGraph(loaderstate *State, ctx context.Context, rootPruning modPruning, roots []module.Version, selectedRoot map[string]string) (mg *ModuleGraph, upgradedRoot map[module.Version]bool, err error) {
for {
- mg, err = readModGraph(modfetch.Fetcher_, loaderstate, ctx, rootPruning, roots, upgradedRoot)
+ mg, err = readModGraph(loaderstate, ctx, rootPruning, roots, upgradedRoot)
// We keep on going even if err is non-nil until we reach a steady state.
// (Note that readModGraph returns a non-nil *ModuleGraph even in case of
// errors.) The caller may be able to fix the errors by adjusting versions,
// of a package in "all", we didn't necessarily load that file
// when we read the module graph, so do it now to be sure.
if !skipModFile && cfg.BuildMod != "vendor" && mods[0].Path != "" && !loaderstate.MainModules.Contains(mods[0].Path) {
- if _, err := goModSummary(modfetch.Fetcher_, loaderstate, mods[0]); err != nil {
+ if _, err := goModSummary(loaderstate, mods[0]); err != nil {
return module.Version{}, "", "", nil, err
}
}
// So far we've checked the root dependencies.
// Load the full module graph and try again.
- mg, err = rs.Graph(modfetch.Fetcher_, loaderstate, ctx)
+ mg, err = rs.Graph(loaderstate, ctx)
if err != nil {
// We might be missing one or more transitive (implicit) dependencies from
// the module graph, so we can't return an ImportMissingError here — one
mv = module.ZeroPseudoVersion("v0")
}
}
- mg, err := rs.Graph(modfetch.Fetcher_, loaderstate, ctx)
+ mg, err := rs.Graph(loaderstate, ctx)
if err != nil {
return module.Version{}, err
}
// and return m, dir, ImportMissingError.
fmt.Fprintf(os.Stderr, "go: finding module for package %s\n", path)
- mg, err := rs.Graph(modfetch.Fetcher_, loaderstate, ctx)
+ mg, err := rs.Graph(loaderstate, ctx)
if err != nil {
return module.Version{}, err
}
mod = r
}
- if mustHaveSums(loaderstate) && !modfetch.HaveSum(modfetch.Fetcher_, mod) {
+ if mustHaveSums(loaderstate) && !modfetch.HaveSum(loaderstate.Fetcher(), mod) {
return "", false, module.VersionError(mod, &sumMissingError{})
}
- dir, err = modfetch.Fetcher_.Download(ctx, mod)
+ dir, err = loaderstate.Fetcher().Download(ctx, mod)
return dir, false, err
}
func NewState() *State {
s := new(State)
- s.fetcher = modfetch.NewFetcher()
+ s.fetcher = modfetch.Fetcher_
return s
}
+func (s *State) Fetcher() *modfetch.Fetcher {
+ return s.fetcher
+}
+
// Init determines whether module mode is enabled, locates the root of the
// current module (if any), sets environment variables for Git subprocesses, and
// configures the cfg, codehost, load, modfetch, and search packages for use
}
for _, modRoot := range loaderstate.modRoots {
sumFile := strings.TrimSuffix(modFilePath(modRoot), ".mod") + ".sum"
- modfetch.Fetcher_.AddWorkspaceGoSumFile(sumFile)
+ loaderstate.Fetcher().AddWorkspaceGoSumFile(sumFile)
}
- modfetch.Fetcher_.SetGoSumFile(loaderstate.workFilePath + ".sum")
+ loaderstate.Fetcher().SetGoSumFile(loaderstate.workFilePath + ".sum")
} else if len(loaderstate.modRoots) == 0 {
// We're in module mode, but not inside a module.
//
//
// See golang.org/issue/32027.
} else {
- modfetch.Fetcher_.SetGoSumFile(strings.TrimSuffix(modFilePath(loaderstate.modRoots[0]), ".mod") + ".sum")
+ loaderstate.Fetcher().SetGoSumFile(strings.TrimSuffix(modFilePath(loaderstate.modRoots[0]), ".mod") + ".sum")
}
if len(loaderstate.modRoots) == 0 {
// TODO(#49228): Instead of creating a fake module with an empty modroot,
if loaderstate.inWorkspaceMode() {
// go.mod files aren't updated in workspace mode, but we still want to
// update the go.work.sum file.
- return modfetch.Fetcher_.WriteGoSum(ctx, keepSums(modfetch.Fetcher_, loaderstate, ctx, loaded, loaderstate.requirements, addBuildListZipSums), mustHaveCompleteRequirements(loaderstate))
+ return loaderstate.Fetcher().WriteGoSum(ctx, keepSums(loaderstate, ctx, loaded, loaderstate.requirements, addBuildListZipSums), mustHaveCompleteRequirements(loaderstate))
}
_, updatedGoMod, modFile, err := UpdateGoModFromReqs(loaderstate, ctx, opts)
if err != nil {
// Don't write go.mod, but write go.sum in case we added or trimmed sums.
// 'go mod init' shouldn't write go.sum, since it will be incomplete.
if cfg.CmdName != "mod init" {
- if err := modfetch.Fetcher_.WriteGoSum(ctx, keepSums(modfetch.Fetcher_, loaderstate, ctx, loaded, loaderstate.requirements, addBuildListZipSums), mustHaveCompleteRequirements(loaderstate)); err != nil {
+ if err := loaderstate.Fetcher().WriteGoSum(ctx, keepSums(loaderstate, ctx, loaded, loaderstate.requirements, addBuildListZipSums), mustHaveCompleteRequirements(loaderstate)); err != nil {
return err
}
}
// 'go mod init' shouldn't write go.sum, since it will be incomplete.
if cfg.CmdName != "mod init" {
if err == nil {
- err = modfetch.Fetcher_.WriteGoSum(ctx, keepSums(modfetch.Fetcher_, loaderstate, ctx, loaded, loaderstate.requirements, addBuildListZipSums), mustHaveCompleteRequirements(loaderstate))
+ err = loaderstate.Fetcher().WriteGoSum(ctx, keepSums(loaderstate, ctx, loaded, loaderstate.requirements, addBuildListZipSums), mustHaveCompleteRequirements(loaderstate))
}
}
}()
// including any go.mod files needed to reconstruct the MVS result
// or identify go versions,
// in addition to the checksums for every module in keepMods.
-func keepSums(fetcher_ *modfetch.Fetcher, loaderstate *State, ctx context.Context, ld *loader, rs *Requirements, which whichSums) map[module.Version]bool {
+func keepSums(loaderstate *State, ctx context.Context, ld *loader, rs *Requirements, which whichSums) map[module.Version]bool {
// Every module in the full module graph contributes its requirements,
// so in order to ensure that the build list itself is reproducible,
// we need sums for every go.mod in the graph (regardless of whether
}
}
- mg, _ := rs.Graph(fetcher_, loaderstate, ctx)
+ mg, _ := rs.Graph(loaderstate, ctx)
for prefix := pkg.path; prefix != "."; prefix = path.Dir(prefix) {
if v := mg.Selected(prefix); v != "none" {
m := module.Version{Path: prefix, Version: v}
}
}
} else {
- mg, _ := rs.Graph(fetcher_, loaderstate, ctx)
+ mg, _ := rs.Graph(loaderstate, ctx)
mg.WalkBreadthFirst(func(m module.Version) {
if _, ok := mg.RequiredBy(m); ok {
// The requirements from m's go.mod file are present in the module graph,
case strings.Contains(m.Pattern(), "..."):
m.Errs = m.Errs[:0]
- mg, err := rs.Graph(modfetch.Fetcher_, loaderstate, ctx)
+ mg, err := rs.Graph(loaderstate, ctx)
if err != nil {
// The module graph is (or may be) incomplete — perhaps we failed to
// load the requirements of some module. This is an error in matching
if opts.Tidy {
if cfg.BuildV {
- mg, _ := ld.requirements.Graph(modfetch.Fetcher_, loaderstate, ctx)
+ mg, _ := ld.requirements.Graph(loaderstate, ctx)
for _, m := range initialRS.rootModules {
var unused bool
if ld.requirements.pruning == unpruned {
}
}
- keep := keepSums(modfetch.Fetcher_, loaderstate, ctx, ld, ld.requirements, loadedZipSumsOnly)
+ keep := keepSums(loaderstate, ctx, ld, ld.requirements, loadedZipSumsOnly)
compatVersion := ld.TidyCompatibleVersion
goVersion := ld.requirements.GoVersion(loaderstate)
if compatVersion == "" {
compatRS := newRequirements(loaderstate, compatPruning, ld.requirements.rootModules, ld.requirements.direct)
ld.checkTidyCompatibility(loaderstate, ctx, compatRS, compatVersion)
- for m := range keepSums(modfetch.Fetcher_, loaderstate, ctx, ld, compatRS, loadedZipSumsOnly) {
+ for m := range keepSums(loaderstate, ctx, ld, compatRS, loadedZipSumsOnly) {
keep[m] = true
}
}
// Dropping compatibility for 1.16 may result in a strictly smaller go.sum.
// Update the keep map with only the loaded.requirements.
if gover.Compare(compatVersion, "1.16") > 0 {
- keep = keepSums(modfetch.Fetcher_, loaderstate, ctx, loaded, loaderstate.requirements, addBuildListZipSums)
+ keep = keepSums(loaderstate, ctx, loaded, loaderstate.requirements, addBuildListZipSums)
}
currentGoSum, tidyGoSum := modfetch.TidyGoSum(keep)
goSumDiff := diff.Diff("current/go.sum", currentGoSum, "tidy/go.sum", tidyGoSum)
// loaded.requirements, but here we may have also loaded (and want to
// preserve checksums for) additional entities from compatRS, which are
// only needed for compatibility with ld.TidyCompatibleVersion.
- if err := modfetch.Fetcher_.WriteGoSum(ctx, keep, mustHaveCompleteRequirements(loaderstate)); err != nil {
+ if err := loaderstate.Fetcher().WriteGoSum(ctx, keep, mustHaveCompleteRequirements(loaderstate)); err != nil {
base.Fatal(err)
}
}
// versions of root modules may differ from what we already checked above.
// Re-check those paths too.
- mg, _ := rs.Graph(modfetch.Fetcher_, loaderstate, ctx)
+ mg, _ := rs.Graph(loaderstate, ctx)
var importPath string
for _, m := range mg.BuildList() {
var found bool
// pruning and semantics all along, but there may have been — and may
// still be — requirements on higher versions in the graph.
tidy := overrideRoots(loaderstate, ctx, rs, []module.Version{{Path: "go", Version: ld.TidyGoVersion}})
- mg, err := tidy.Graph(modfetch.Fetcher_, loaderstate, ctx)
+ mg, err := tidy.Graph(loaderstate, ctx)
if err != nil {
ld.error(err)
}
// of the vendor directory anyway.
continue
}
- if mg, err := rs.Graph(modfetch.Fetcher_, loaderstate, ctx); err != nil {
+ if mg, err := rs.Graph(loaderstate, ctx); err != nil {
return false, err
} else if _, ok := mg.RequiredBy(dep.mod); !ok {
// dep.mod is not an explicit dependency, but needs to be.
// The roots of the module graph have changed in some way (not just the
// "direct" markings). Check whether the changes affected any of the loaded
// packages.
- mg, err := rs.Graph(modfetch.Fetcher_, loaderstate, ctx)
+ mg, err := rs.Graph(loaderstate, ctx)
if err != nil {
return false, err
}
var mg *ModuleGraph
if ld.requirements.pruning == unpruned {
var err error
- mg, err = ld.requirements.Graph(modfetch.Fetcher_, loaderstate, ctx)
+ mg, err = ld.requirements.Graph(loaderstate, ctx)
if err != nil {
// We already checked the error from Graph in loadFromRoots and/or
// updateRequirements, so we ignored the error on purpose and we should
fmt.Fprintf(os.Stderr, "For information about 'go mod tidy' compatibility, see:\n\thttps://go.dev/ref/mod#graph-pruning\n")
}
- mg, err := rs.Graph(modfetch.Fetcher_, loaderstate, ctx)
+ mg, err := rs.Graph(loaderstate, ctx)
if err != nil {
ld.error(fmt.Errorf("error loading go %s module graph: %w", compatVersion, err))
ld.switchIfErrors(ctx)
if err != nil {
return err
}
- summary, err := rawGoModSummary(modfetch.Fetcher_, s, rm)
+ summary, err := rawGoModSummary(s, rm)
if err != nil && !errors.Is(err, gover.ErrTooNew) {
return err
}
if err != nil {
return "", err
}
- summary, err := rawGoModSummary(modfetch.Fetcher_, loaderstate, latest)
+ summary, err := rawGoModSummary(loaderstate, latest)
if err != nil && !errors.Is(err, gover.ErrTooNew) {
return "", err
}
// module versions.
//
// The caller must not modify the returned summary.
-func goModSummary(fetcher_ *modfetch.Fetcher, loaderstate *State, m module.Version) (*modFileSummary, error) {
+func goModSummary(loaderstate *State, m module.Version) (*modFileSummary, error) {
if m.Version == "" && !loaderstate.inWorkspaceMode() && loaderstate.MainModules.Contains(m.Path) {
panic("internal error: goModSummary called on a main module")
}
if gover.IsToolchain(m.Path) {
- return rawGoModSummary(fetcher_, loaderstate, m)
+ return rawGoModSummary(loaderstate, m)
}
if cfg.BuildMod == "vendor" {
actual := resolveReplacement(loaderstate, m)
if mustHaveSums(loaderstate) && actual.Version != "" {
key := module.Version{Path: actual.Path, Version: actual.Version + "/go.mod"}
- if !modfetch.HaveSum(fetcher_, key) {
+ if !modfetch.HaveSum(loaderstate.Fetcher(), key) {
suggestion := fmt.Sprintf(" for go.mod file; to add it:\n\tgo mod download %s", m.Path)
return nil, module.VersionError(actual, &sumMissingError{suggestion: suggestion})
}
}
- summary, err := rawGoModSummary(fetcher_, loaderstate, actual)
+ summary, err := rawGoModSummary(loaderstate, actual)
if err != nil {
return nil, err
}
// rawGoModSummary cannot be used on the main module outside of workspace mode.
// The modFileSummary can still be used for retractions and deprecations
// even if a TooNewError is returned.
-func rawGoModSummary(fetcher_ *modfetch.Fetcher, loaderstate *State, m module.Version) (*modFileSummary, error) {
+func rawGoModSummary(loaderstate *State, m module.Version) (*modFileSummary, error) {
if gover.IsToolchain(m.Path) {
if m.Path == "go" && gover.Compare(m.Version, gover.GoStrictVersion) >= 0 {
// Declare that go 1.21.3 requires toolchain 1.21.3,
}
}
return rawGoModSummaryCache.Do(m, func() (*modFileSummary, error) {
- name, data, err := rawGoModData(fetcher_, loaderstate, m)
+ name, data, err := rawGoModData(loaderstate, m)
if err != nil {
return nil, err
}
//
// Unlike rawGoModSummary, rawGoModData does not cache its results in memory.
// Use rawGoModSummary instead unless you specifically need these bytes.
-func rawGoModData(fetcher_ *modfetch.Fetcher, loaderstate *State, m module.Version) (name string, data []byte, err error) {
+func rawGoModData(loaderstate *State, m module.Version) (name string, data []byte, err error) {
if m.Version == "" {
dir := m.Path
if !filepath.IsAbs(dir) {
base.Fatalf("go: internal error: %s@%s: unexpected invalid semantic version", m.Path, m.Version)
}
name = "go.mod"
- data, err = fetcher_.GoMod(context.TODO(), m.Path, m.Version)
+ data, err = loaderstate.Fetcher().GoMod(context.TODO(), m.Path, m.Version)
}
return name, data, err
}
return nil, nil
}
- summary, err := goModSummary(modfetch.Fetcher_, r.loaderstate, mod)
+ summary, err := goModSummary(r.loaderstate, mod)
if err != nil {
return nil, err
}
// we don't need to verify it in go.sum. This makes 'go list -m -u' faster
// and simpler.
func versionHasGoMod(loaderstate *State, _ context.Context, m module.Version) (bool, error) {
- _, data, err := rawGoModData(modfetch.Fetcher_, loaderstate, m)
+ _, data, err := rawGoModData(loaderstate, m)
if err != nil {
return false, err
}
err = module.CheckPath(path)
}
if err == nil {
- repo = modfetch.Fetcher_.Lookup(ctx, proxy, path)
+ repo = loaderstate.Fetcher().Lookup(ctx, proxy, path)
} else {
repo = emptyRepo{path: path, err: err}
}
func (er emptyRepo) CheckReuse(ctx context.Context, old *codehost.Origin) error {
return fmt.Errorf("empty repo")
}
+
func (er emptyRepo) Versions(ctx context.Context, prefix string) (*modfetch.Versions, error) {
return &modfetch.Versions{}, nil
}
+
func (er emptyRepo) Stat(ctx context.Context, rev string) (*modfetch.RevInfo, error) {
return nil, er.err
}
"cmd/go/internal/fsys"
"cmd/go/internal/gover"
"cmd/go/internal/imports"
- "cmd/go/internal/modfetch"
"cmd/go/internal/modindex"
"cmd/go/internal/search"
"cmd/go/internal/str"
if err != nil {
continue
}
- summary, err := goModSummary(modfetch.Fetcher_, loaderstate, mod)
+ summary, err := goModSummary(loaderstate, mod)
if err != nil {
continue
}