this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

mod/modzip: add test for go.mod submodule detection

Add a test case documenting the current behavior where directories
containing go.mod files are skipped during directory walks. This is
incorrect for CUE, which uses cue.mod directories instead of go.mod
files to mark module boundaries.

The test shows the asymmetry: cue.mod submodules have their files
filtered by CheckFiles ("file is in another module"), while go.mod
submodules are skipped at walk time ("directory is in another module").

This was likely a mistake when borrowing some of the logic from Go
when we initially introduced support for modern OCI-based CUE modules.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I8553bb5cdef83c1fddeb26eed7d7ebd90df9a895
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1229770
Reviewed-by: Matthew Sackman <matthew@cue.works>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>

+5
+5
mod/modzip/testdata/check_dir/various.txt
··· 7 7 $work/.hg_archival.txt: file is inserted by 'hg archive' and is always omitted 8 8 $work/sub/cue.mod/module.cue: file is in another module 9 9 $work/.git: directory is a version control repository 10 + $work/gosub: directory is in another module 10 11 11 12 invalid: 12 13 $work/CUE.MOD: cue.mod directories must have lowercase names ··· 18 19 -- sub/cue.mod/module.cue -- 19 20 -- .hg_archival.txt -- 20 21 -- .git/x -- 22 + -- gosub/go.mod -- 23 + module example.com/m/gosub 24 + -- gosub/y.cue -- 25 + package gosub