Skip to content

proposal: cmd/go: add go workspace exclude directories #57086

Closed as not planned
Closed as not planned
@switchupcb

Description

@switchupcb

Step 1: https://github.com/golang/proposal#the-proposal-process
The proposal author creates a brief issue describing the proposal.
Note: There is no need for a design document at this point.
Note: A non-proposal issue can be turned into a proposal by simply adding the proposal label.
Note: Language changes should follow a separate template

First, I want to shout out @matloob for being a baller and solving #56697. He singlehandedly saved Google engineers millions of hours in error debugging time cause of this change. THANKS MATLOOB!

Context

https://go.dev/ref/mod#workspaces

Go workspace is used to ensure a module in the workspace uses the import of the other module in the workspace.

Usecase

In Disgo, I want to be able to exclude ./wrapper and _gen from Go Workspace defined:

go 1.18

use (
	./
	./_examples
	./cache
	./shard
)

Can't do it or am missing something cause of the ./ which is necessary for the main package.

Exclude Directories

Most build tools allow the exclusion of directories. Even GNU Make that was made in 1977. I'm not sure what else to say to start this proposal. If there is a reason to not allow the exclusion of files, it's not clear. Perhaps, I am doing something incorrect. I'm just lost...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions