Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for AllowMissingModuleImports (1.91 sec)

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

    //
    // This function affects the default cfg.BuildMod when outside of a module,
    // so it can only be called prior to Init.
    func AllowMissingModuleImports() {
    	if initialized {
    		panic("AllowMissingModuleImports after Init")
    	}
    	allowMissingModuleImports = true
    }
    
    // makeMainModules creates a MainModuleSet and associated variables according to
    // the given main modules.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 18:36:30 UTC 2024
    - 69.8K bytes
    - Viewed (0)
  2. src/cmd/go/internal/modload/import.go

    		}
    		if e.QueryErr != nil && e.QueryErr != ErrNoModRoot {
    			return fmt.Sprintf("cannot find module providing package %s: %v", e.Path, e.QueryErr)
    		}
    		if cfg.BuildMod == "mod" || (cfg.BuildMod == "readonly" && allowMissingModuleImports) {
    			return "cannot find module providing package " + e.Path
    		}
    
    		if e.replaced.Path != "" {
    			suggestArg := e.replaced.Path
    			if !module.IsZeroPseudoVersion(e.replaced.Version) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 15:21:14 UTC 2024
    - 27.7K bytes
    - Viewed (0)
  3. src/cmd/go/internal/work/build.go

    //
    // See golang.org/issue/40276 for details and rationale.
    func installOutsideModule(ctx context.Context, args []string) {
    	modload.ForceUseModules = true
    	modload.RootMode = modload.NoRoot
    	modload.AllowMissingModuleImports()
    	modload.Init()
    	BuildInit()
    
    	// Load packages. Ignore non-main packages.
    	// Print a warning if an argument contains "..." and matches no main packages.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 21 17:22:59 UTC 2024
    - 33.2K bytes
    - Viewed (0)
  4. src/cmd/go/internal/modget/get.go

    	// what was requested.
    	modload.ExplicitWriteGoMod = true
    
    	// Allow looking up modules for import paths when outside of a module.
    	// 'go get' is expected to do this, unlike other commands.
    	modload.AllowMissingModuleImports()
    
    	// 'go get' no longer builds or installs packages, so there's nothing to do
    	// if there's no go.mod file.
    	// TODO(#40775): make modload.Init return ErrNoModRoot instead of exiting.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 18:26:32 UTC 2024
    - 66.5K bytes
    - Viewed (0)
  5. src/cmd/go/internal/modload/load.go

    			// version specified by a new root than add a new dependency on an
    			// unrelated version.
    			continue
    		}
    
    		if !ld.ResolveMissingImports || (!HasModRoot() && !allowMissingModuleImports) {
    			// We've loaded as much as we can without resolving missing imports.
    			break
    		}
    
    		modAddedBy, err := ld.resolveMissingImports(ctx)
    		if err != nil {
    			ld.error(err)
    			break
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 14:56:56 UTC 2024
    - 84K bytes
    - Viewed (0)
Back to top