Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: add work package pattern matching all packages in work modules #71294

Closed
matloob opened this issue Jan 16, 2025 · 7 comments
Closed

cmd/go: add work package pattern matching all packages in work modules #71294

matloob opened this issue Jan 16, 2025 · 7 comments
Labels
GoCommand cmd/go Proposal Proposal-Accepted ToolProposal Issues describing a requested change to a Go tool or command-line program.
Milestone

Comments

@matloob
Copy link
Contributor

matloob commented Jan 16, 2025

Proposal Details

I'm making this proposal to resolve #50745

This proposal is to add a new package meta-pattern to join the already existing all, std, cmd, and tool patterns. The work pattern would match all packages in the work (formerly called main) modules: either the single work module in module mode or the set of workspace modules in workspace mode.

This would allow for a single pattern to build or test all of those packages, similar to using ./... at the root of a module to test a single module's packages.

cc @hyangah @rsc @samthanawalla

@gabyhelp
Copy link

Related Issues

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

@gabyhelp gabyhelp added the ToolProposal Issues describing a requested change to a Go tool or command-line program. label Jan 16, 2025
@ianlancetaylor ianlancetaylor moved this to Incoming in Proposals Jan 16, 2025
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/643235 mentions this issue: cmd/go: add work package pattern

slsyy added a commit to slsyy/testfixtures that referenced this issue Feb 2, 2025
some shenaningas were introduced to run tests&lint over all modules
Probably it won't be necessary, when
golang/go#71294 is resolved
slsyy added a commit to slsyy/testfixtures that referenced this issue Feb 2, 2025
some shenaningas were introduced to run tests&lint over all modules
Probably it won't be necessary, when
golang/go#71294 is resolved
slsyy added a commit to slsyy/testfixtures that referenced this issue Feb 2, 2025
some shenaningas were introduced to run tests&lint over all modules
Probably it won't be necessary, when
golang/go#71294 is resolved
slsyy added a commit to slsyy/testfixtures that referenced this issue Feb 2, 2025
some shenaningas were introduced to run tests&lint over all modules
Probably it won't be necessary, when
golang/go#71294 is resolved
@rsc
Copy link
Contributor

rsc commented Feb 5, 2025

This proposal has been added to the active column of the proposals project
and will now be reviewed at the weekly proposal review meetings.
— rsc for the proposal review group

@rsc rsc moved this from Incoming to Active in Proposals Feb 5, 2025
@rsc
Copy link
Contributor

rsc commented Feb 13, 2025

Have all remaining concerns about this proposal been addressed?

The propsal is to add a new metapackage 'work' (others include 'std', 'cmd', 'all') that will expand to all packages in the current workspace, or the current module when there is no go.work (a "single-module workspace").

@aclements
Copy link
Member

Based on the discussion above, this proposal seems like a likely accept.
— aclements for the proposal review group

The propsal is to add a new metapackage 'work' (others include 'std', 'cmd', 'all') that will expand to all packages in the current workspace, or the current module when there is no go.work (a "single-module workspace").

@aclements aclements moved this from Active to Likely Accept in Proposals Feb 19, 2025
@seankhliao seankhliao added the GoCommand cmd/go label Feb 22, 2025
@aclements
Copy link
Member

No change in consensus, so accepted. 🎉
This issue now tracks the work of implementing the proposal.
— aclements for the proposal review group

The propsal is to add a new metapackage 'work' (others include 'std', 'cmd', 'all') that will expand to all packages in the current workspace, or the current module when there is no go.work (a "single-module workspace").

@aclements aclements moved this from Likely Accept to Accepted in Proposals Feb 26, 2025
@aclements aclements changed the title proposal: cmd/go: add work package pattern matching all packages in work modules cmd/go: add work package pattern matching all packages in work modules Feb 26, 2025
@aclements aclements modified the milestones: Proposal, Backlog Feb 26, 2025
@dmitshur dmitshur modified the milestones: Backlog, Go1.25 Mar 6, 2025
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/658495 mentions this issue: doc/next: add release note for work package pattern

gopherbot pushed a commit that referenced this issue Mar 17, 2025
For #71294
Fixes #50745

Change-Id: Iff05e98ac860a1764d4c59572f9abc3ae8d9c5fb
Reviewed-on: https://go-review.googlesource.com/c/go/+/658495
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GoCommand cmd/go Proposal Proposal-Accepted ToolProposal Issues describing a requested change to a Go tool or command-line program.
Projects
Status: Accepted
Development

No branches or pull requests

7 participants