From 20d3c9cd1903932a12e1742cf2df3ad1dd217d86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Tue, 6 Aug 2024 11:04:29 +0100 Subject: [PATCH] cmd/cue: speed up get_go_json_compat.txtar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We only need to `cue get go` the decls package, and not the marshal and unmarshal packages which we only use for `go run`. This results in less work to load Go packages in `cue get go`, speeding up the test on my laptop from 0.50s to 0.42s. Signed-off-by: Daniel Martí Change-Id: I207aea043edf8070a4a9e29308103d6a46654a09 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1198963 Reviewed-by: Roger Peppe TryBot-Result: CUEcueckoo Unity-Result: CUE porcuepine --- cmd/cue/cmd/testdata/script/get_go_json_compat.txtar | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/cue/cmd/testdata/script/get_go_json_compat.txtar b/cmd/cue/cmd/testdata/script/get_go_json_compat.txtar index 23e3d43ea2f..7a13daa4d69 100644 --- a/cmd/cue/cmd/testdata/script/get_go_json_compat.txtar +++ b/cmd/cue/cmd/testdata/script/get_go_json_compat.txtar @@ -1,7 +1,7 @@ # Check that the CUE generated by 'cue get go' is actually compatible # with encoding and decoding values via Go's encoding/json package. -exec cue get go --local ./... +exec cue get go --local ./decls cmp decls/p_go_gen.cue decls/p_go_gen.cue.golden # Marshal via Go's encoding/json and validate with the generated CUE schema.