Skip to content

proposal: cmd/go: go build should build multiple main packages #23616

Closed
@rasky

Description

@rasky

go help build says:

When compiling multiple packages or a single non-main package,
build compiles the packages but discards the resulting object,
serving only as a check that the packages can be built.

The fact that go build doesn't build is counter-intuitive. It would be great to change it to generate binaries (just like it does when a single package is specified). Especially now with the build cache, it doesn't sound too much of a burden, and it would further reduce cases where an external build system is required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.Proposal

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions