]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/go: reject embedded files that can't be packed into modules
authorRuss Cox <rsc@golang.org>
Tue, 9 Feb 2021 22:34:09 +0000 (17:34 -0500)
committerRuss Cox <rsc@golang.org>
Thu, 11 Feb 2021 01:10:35 +0000 (01:10 +0000)
commit930c2c9a6810b54d84dc499120219a6cb4563fd7
treeaa7e09bd3483b1ec45cb14d60cd83afeb95e6446
parente5b08e6d5cecb646066c0cadddf6300e2a10ffb2
cmd/go: reject embedded files that can't be packed into modules

If the file won't be packed into a module,
don't put those files into embeds.
Otherwise people will be surprised when things work
locally but not when imported by another module.

Observed on CL 290709

Change-Id: Ia0ef7d0e0f5e42473c2b774e57c843e68a365bc7
Reviewed-on: https://go-review.googlesource.com/c/go/+/290809
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/cmd/go/internal/load/pkg.go