From: Matthew Dempsky Date: Sat, 14 May 2022 00:00:00 +0000 (-0700) Subject: go/importer: disable TestForCompiler/LookupCustom for GOEXPERIMENT=unified X-Git-Tag: go1.19beta1~232 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=3caf67d247c102edfb8347f010e44afa143f46b5;p=gostls13.git go/importer: disable TestForCompiler/LookupCustom for GOEXPERIMENT=unified The TestForCompiler/LookupCustom test tries to read in the export data for "math/big", but with a package path of "math/bigger" instead. This has historically worked because the export data formats were designed to not assume the package's own path, but I expect we can safely remove support for this now. However, since that would be a user-visible change, for now just disable the test for GOEXPERIMENT=unified so we can land CL 393715. We can revisit whether it's actually safe to break that go/importer use case later. Updates #51734. Change-Id: I5e89314511bd1352a9f5e14a2e218a5ab00cab3c Reviewed-on: https://go-review.googlesource.com/c/go/+/406319 Run-TryBot: Matthew Dempsky Reviewed-by: Cuong Manh Le Reviewed-by: Dmitri Shuralyov TryBot-Result: Gopher Robot --- diff --git a/src/go/importer/importer_test.go b/src/go/importer/importer_test.go index 91b656a88c..1b8353e8fa 100644 --- a/src/go/importer/importer_test.go +++ b/src/go/importer/importer_test.go @@ -7,6 +7,7 @@ package importer import ( "go/build" "go/token" + "internal/buildcfg" "internal/testenv" "io" "os" @@ -67,6 +68,14 @@ func TestForCompiler(t *testing.T) { }) t.Run("LookupCustom", func(t *testing.T) { + // TODO(mdempsky): Decide whether to remove this test, or to fix + // support for it in unified IR. It's not clear that we actually + // need to support importing "math/big" as "math/bigger", for + // example. cmd/link no longer supports that. + if buildcfg.Experiment.Unified { + t.Skip("not supported by GOEXPERIMENT=unified; see go.dev/cl/406319") + } + lookup := func(path string) (io.ReadCloser, error) { if path != "math/bigger" { t.Fatalf("lookup called with unexpected path %q", path)