Skip to content

Commit

Permalink
internal/mod/modimports: remove duplicate test txtar file entry
Browse files Browse the repository at this point in the history
Switching from our own txtarfs package to upstream's new txtar.FS API
surfaced the fact that TestPackageFiles had duplicate file entries
for y.cue, leading to an error as the new API is stricter.

Our existing logic uses the first entry when there are duplicates,
so delete the second. This is verified by the test failing
when the first entry is deleted instead.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: Ie37a9200b5ed854379ba77884779fbf951cb35bf
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1198172
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Matthew Sackman <matthew@cue.works>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
  • Loading branch information
mvdan committed Jul 22, 2024
1 parent acdd41f commit 243da87
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions internal/mod/modimports/modimports_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ import (
import "other"
-- omitted.go --
-- omitted --
-- y.cue --
package y
-- sub/x.cue --
package x
import (
Expand Down

0 comments on commit 243da87

Please sign in to comment.