Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 157 for modfile (0.09 sec)

  1. src/cmd/go/internal/modload/modfile.go

    	if i == nil {
    		return modFile != nil
    	}
    
    	if i.dataNeedsFix {
    		return true
    	}
    
    	if modFile.Module == nil {
    		if i.module != (module.Version{}) {
    			return true
    		}
    	} else if modFile.Module.Mod != i.module {
    		return true
    	}
    
    	var goV, toolchain string
    	if modFile.Go != nil {
    		goV = modFile.Go.Version
    	}
    	if modFile.Toolchain != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 26 17:53:40 UTC 2023
    - 26.7K bytes
    - Viewed (0)
  2. src/cmd/go/internal/modload/init.go

    		base.Fatalf(`go: invalid module path "%v": %v`, modPath, invalidMajorVersionMsg)
    	}
    
    	fmt.Fprintf(os.Stderr, "go: creating new go.mod: module %s\n", modPath)
    	modFile := new(modfile.File)
    	modFile.AddModuleStmt(modPath)
    	MainModules = makeMainModules([]module.Version{modFile.Module.Mod}, []string{modRoot}, []*modfile.File{modFile}, []*modFileIndex{nil}, nil)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 18:36:30 UTC 2024
    - 69.8K bytes
    - Viewed (0)
  3. src/cmd/go/internal/modcmd/edit.go

    			Deprecated: modFile.Module.Deprecated,
    		}
    	}
    	if modFile.Go != nil {
    		f.Go = modFile.Go.Version
    	}
    	if modFile.Toolchain != nil {
    		f.Toolchain = modFile.Toolchain.Name
    	}
    	for _, r := range modFile.Require {
    		f.Require = append(f.Require, requireJSON{Path: r.Mod.Path, Version: r.Mod.Version, Indirect: r.Indirect})
    	}
    	for _, x := range modFile.Exclude {
    		f.Exclude = append(f.Exclude, x.Mod)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 13:52:10 UTC 2024
    - 17.2K bytes
    - Viewed (0)
  4. src/cmd/go/internal/workcmd/edit.go

    add and drop a use directive from the go.work file's set of module directories.
    
    The -replace=old[@v]=new[@v] flag adds a replacement of the given
    module path and version pair. If the @v in old@v is omitted, a
    replacement without a version on the left side is added, which applies
    to all versions of the old module path. If the @v in new@v is omitted,
    the new path should be a local module root directory, not a module
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 13:52:10 UTC 2024
    - 11K bytes
    - Viewed (0)
  5. src/cmd/go/internal/modload/vendor.go

    func checkVendorConsistency(indexes []*modFileIndex, modFiles []*modfile.File, modRoots []string) {
    	// readVendorList only needs the main module to get the directory
    	// the vendor directory is in.
    	readVendorList(VendorDir())
    
    	if len(modFiles) < 1 {
    		// We should never get here if there are zero modfiles. Either
    		// we're in single module mode and there's a single module, or
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jul 24 18:09:22 UTC 2023
    - 9.5K bytes
    - Viewed (0)
  6. src/cmd/go/internal/modcmd/vendor.go

    					}
    				}
    			}
    			if modFile := modload.MainModules.ModFile(m); modFile != nil {
    				for _, r := range modFile.Replace {
    					if replacementWritten[r.Old] {
    						// We already recorded this replacement.
    						continue
    					}
    					replacementWritten[r.Old] = true
    					rNew := modload.Replacement(r.Old)
    					if rNew == (module.Version{}) {
    						// There is no replacement. Don't try to write it.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 14 14:19:59 UTC 2024
    - 14.5K bytes
    - Viewed (0)
  7. src/cmd/go/internal/gover/version.go

    // license that can be found in the LICENSE file.
    
    package gover
    
    import "golang.org/x/mod/modfile"
    
    const (
    	// narrowAllVersion is the Go version at which the
    	// module-module "all" pattern no longer closes over the dependencies of
    	// tests outside of the main module.
    	NarrowAllVersion = "1.16"
    
    	// DefaultGoModVersion is the Go version to assume for go.mod files
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 15:21:14 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  8. src/cmd/go/internal/modcmd/download.go

    			modFile := modload.MainModules.ModFile(mainModule)
    			if modFile.Go == nil || gover.Compare(modFile.Go.Version, gover.ExplicitIndirectVersion) < 0 {
    				if len(modFile.Require) > 0 {
    					args = []string{"all"}
    				}
    			} else {
    				// As of Go 1.17, the go.mod file explicitly requires every module
    				// that provides any package imported by the main module.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 08 19:32:39 UTC 2023
    - 13.5K bytes
    - Viewed (0)
  9. src/cmd/go/testdata/script/mod_install_pkg_version.txt

    rm $GOPATH/bin/a
    cd ..
    
    
    # 'go install -modfile=x.mod pkg@version' reports an error, but only if
    # -modfile is specified explicitly on the command line.
    cd m
    env GOFLAGS=-modfile=go.mod
    go install example.com/cmd/a@latest  # same as above
    env GOFLAGS=
    ! go install -modfile=go.mod example.com/cmd/a@latest
    stderr '^go: -modfile cannot be used with commands that ignore the current module$'
    cd ..
    
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 21 17:25:54 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  10. hack/pin-dependency.sh

        # isn't that important to get this exactly right.
        if [ "${replacement}" != "${dep}" ]; then
            find . -name go.mod -print | while read -r modfile; do
                (cd "$(dirname "${modfile}")" && go mod edit -replace "${dep}=${replacement}@${rev}")
            done
        fi
      popd >/dev/null 2>&1
    done
    
    echo ""
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 06 05:44:43 UTC 2024
    - 3.6K bytes
    - Viewed (0)
Back to top