/ go Public
cmd/go: [modules + integration] go mod build, build all the binaries provided by a module #31323
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
This report is part of a series, filled at the request of @mdempsky, focused at making Go modules integrator-friendly.
Please do not close or mark it as duplicate before making sure you’ve read and understood the general context. A lot of work went into identifying problems points precisely.
Go needs an official
go mod buildcommand that builds all the binaries provided by a particular Go module.
the input should be:
module path, or
module version, or
filesystem pathof a specific
go.modfile at the root of an unpacked module tree, or
modfile inside a goproxy hierarchy
all the usual
go buildflags should apply
destinationshould be any binary directory path the user specifies
for compatibility with existing tooling, a separate optional
prefixflag should allow pre-pending a path to the destination:
destination, actually work on
canonical_path, using a
to allow integration with CI/CD software, the command should optionally output a list of the files it created, in machine-readable format, to a user-specified result file
prefix, since the command is pretending to write directly into
go mod pack(cmd/go: [modules + integration] go mod pack, pack sources as module files #31302) and should use the same conventions
the command should allow selecting (or not) the following binary sets:
the command should work in secure no-internet-download mode. In that mode it should fail if one of the modules it needs for building is not available in the cache or configured goproxy (cmd/go: [modules + integration] use several goproxy sources simultaneously #31304) sources
go getdownload from the internet
Go modules are wonderful and exciting, until you realise they only deal with the code download part. One stills need to dissect individual Go packages in the next stages of a CI/CD Go-related job.
The Go module concept should be extended to the rest of Go code processing phases.
The text was updated successfully, but these errors were encountered: