![]() ![]() For example the -mod=readonly mode uses the versions of the modules listed in the go.mod file and fails if it would need to add in a new module dependency, and the -mod=vendor mode uses the modules in the vendor directory. The modes are the different ways the go command determines which modules and packages it's building and how dependencies are resolved. mode: This document references module mode and workspace mode.See the Minimal Version Selection section in the Go Modules Reference for more information. MVS or Minimal Version Selection: The algorithm used to determine the versions of all modules that will be used in a build.The build list contains versions for all modules in the module graph, not just those relevant to a specific command. The build list is determined from the main module's go.mod file and go.mod files in transitively required modules using minimal version selection. Build list: The build list is the list of module versions used for a build command such as go build, go list, or go test.This can be a released version or pseudo version of a module, or a directory with a go.mod file. Module version: From the perspective of the go command, a module version is a particular instance of a module.This proposal proposes allowing multiple main modules. This module is used as the starting point when running MVS. Before this proposal, this is the single module containing the directory where the go command is invoked. Main modules: The module the user is working in.The Go Modules Reference and its Glossary provide more detail. These terms are used often in this document. ![]() When invoked in workspace mode, the go command will always select these modules and a consistent set of dependencies. The go.work file specifies a set of local modules that comprise a workspace. The presence of a go.work file in the working directory or a containing directory will put the go command into workspace mode. This proposal describes a new workspace mode in the go command for editing multiple modules. Proposal: Multi-Module Workspaces in cmd/go ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |