Skip to content

fix(go): ignore go.mod fixtures under testdata, _ and . directories - #215

Merged
adityankale190895 merged 1 commit into
DiffCI:mainfrom
FredApps:fix/go-ignored-nested-go-mod
Nov 18, 2026
Merged

adityankale190895 merged 1 commit into
DiffCI:mainfrom
FredApps:fix/go-ignored-nested-go-mod

Conversation

@FredApps

Copy link
Copy Markdown
Contributor

Fixes #214

When the repository has a root go.mod, a go.mod under a directory that go list ./... ignores no longer counts as a nested module. Those are testdata/ and directories whose names start with _ or .. Changes inside those directories go through the existing testdata handling, as before.

Without a root go.mod, nothing changes: such files still confine the Go adapter to their directories.

Validation:

  • tests/repo/go-ignored-nested-module.test.ts runs the real go list offline and skips without Go. A go.mod under testdata/ and under _examples/ now gives a selective plan. A nested tools/go.mod still falls back. The first case fails on main and passes here.
  • npm run typecheck, npm test (1169 pass), npm run audit:boundary.

goAdapter counted every nested go.mod as a nested module, including go.mod files under testdata/ and directories starting with _ or ., which go list ./... never enters. A root module with a module fixture in a testdata directory fell back on every change unless it set go.scope root-module.

Signed-off-by: FredApps <[email protected]>

@FredApps FredApps left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cross-review of 01355c1.

Checked:

  • The fix matches #214. A go.mod under testdata/, _x/ or .x/ is not counted as a nested module, but only when there is a root go.mod. That is consistent with isGoDiscoveryIgnoredPath, which the build walk already uses. Without a root module the behaviour is unchanged. Real nested modules (#80) still fall back.
  • The new test fails with src/ reverted (1 of 2 fail) and passes with the fix. tests/repo/go-ignored-nested-module.test.ts is listed in release-files.json. The commit is DCO-signed. The branch is level with main. CI is green.

Fixed: nothing.

Still open: none.

FredApps added a commit to FredApps/core that referenced this pull request Nov 18, 2026
…ffCI#215

The manifest is an unordered set, and the PRs listed above add their entries at the same line. Moving this entry one line away lets them merge in either order without a conflict.

Signed-off-by: FredApps <[email protected]>
@FredApps
FredApps marked this pull request as ready for review November 18, 2026 00:56
@adityankale190895
adityankale190895 merged commit 7a08dc1 into DiffCI:main Nov 18, 2026
13 checks passed
adityankale190895 pushed a commit that referenced this pull request Nov 18, 2026
…ything with ** (#249)

* fix(test-discovery): keep +, $ and ^ literal in globs, and match everything with **

globToRegex escaped only backslashes and dots, so `+`, `$` and `^` reached RegExp as operators. A declared input naming a Remix route such as app/routes/users.$id.tsx matched nothing and its tests were not selected, app/routes/_auth+/** missed remix-flat-routes folders, and c++/** threw. A bare ** also stayed within one path segment. Groups, classes and extglobs behave as before, matching picomatch.

Signed-off-by: FredApps <[email protected]>

* chore: move the release-files.json entry so it merges cleanly with #215

The manifest is an unordered set, and the PRs listed above add their entries at the same line. Moving this entry one line away lets them merge in either order without a conflict.

Signed-off-by: FredApps <[email protected]>

---------

Signed-off-by: FredApps <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Go: a go.mod under testdata/ makes every change fall back

2 participants