cmux icon indicating copy to clipboard operation
cmux copied to clipboard

Possibly move examples_test.go to examples package

Open antongocode opened this issue 5 years ago • 1 comments

Apologies for this, but due to weirdness of go modules, see here https://github.com/golang/go/issues/29323, when vendoring cmux as a dependency it also vendors google.golang.org/grpc purely because it is a test dependency.

Would you perhaps consider moving the example test to its own package?

antongocode avatar Aug 27 '19 12:08 antongocode

This is still an issue, but this time with grpc/examples.

My editor complains about missing dependency:

google.golang.org/grpc/examples is not in your go.mod file

This is what happens when go mod tidy is ran:

go.mod

require (
    // ...
    github.com/soheilhy/cmux v0.1.4
    google.golang.org/grpc/examples v0.0.0-20210208035533-9280052d3665 // indirect
)
$ go mod why google.golang.org/grpc/examples/helloworld/helloworld
# google.golang.org/grpc/examples/helloworld/helloworld
<REDACTED PACKAGE NAME>
github.com/soheilhy/cmux
github.com/soheilhy/cmux.test
google.golang.org/grpc/examples/helloworld/helloworld

VoyTechnology avatar Feb 09 '21 17:02 VoyTechnology