]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: special packages must not have any path separators
authorKeith Randall <khr@golang.org>
Fri, 19 Nov 2021 21:28:49 +0000 (13:28 -0800)
committerKeith Randall <khr@golang.org>
Tue, 23 Nov 2021 19:31:05 +0000 (19:31 +0000)
commit0f64c21d90c7017df4f199a5852d60d4b474c03c
treef326c9a0a606c0b53a5bb94a3fd47c26162d84d9
parent00045b76e50d98db354aa185bcbd60a6f62499ac
cmd/compile: special packages must not have any path separators

We want to distinguish special compiler-generated package paths,
like go.shape, from user paths, like go.opentelemetry.io/otel/semconv.
The former have no slash in them.

Writing a test for this seems hard, as the dependency we'd need to
add would be non-hermetic. (Or it would need a new tricky run.go mode.)

This CL does fix the example in the issue.

Fixes #49606

Change-Id: I38f1b970b6dd31e0617763a27ff227e3afee74d5
Reviewed-on: https://go-review.googlesource.com/c/go/+/365834
Trust: Keith Randall <khr@golang.org>
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
src/cmd/compile/internal/types/pkg.go