]> Cypherpunks repositories - gostls13.git/commit
cmd/go: add a regression test for package import cycles guarded by build tags
authorBryan C. Mills <bcmills@google.com>
Mon, 3 Feb 2020 18:40:14 +0000 (13:40 -0500)
committerBryan C. Mills <bcmills@google.com>
Fri, 21 Feb 2020 19:58:38 +0000 (19:58 +0000)
commitcf6739caad1869ec3a022802d53a4de098cb0533
tree610549ee28c6ac6ae254cdd9ceb1d31f45bf6001
parent8c09e8af3633b0c08d2c309e56a58124dfee3d7c
cmd/go: add a regression test for package import cycles guarded by build tags

I've been thinking about the relationship between the package import
graph and the module import graph, and realized that the package
import graph is not always acyclic. (The package import graph must be
acyclic given a specific set of build tags, but the 'mod' subcommands
intentionally ignore build tags.)

I'm not sure whether we have any existing regression tests that cover
this sort of cycle, so I'm adding one now. Thankfully, it passes!

Updates #36460

Change-Id: I7679320994ee169855241efa51cd45f71315f7f5
Reviewed-on: https://go-review.googlesource.com/c/go/+/217557
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/go/testdata/script/mod_tagged_import_cycle.txt [new file with mode: 0644]