Skip to content

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

Closed

Description

@FredApps

goAdapter.analyze (src/repo/adapters/go.ts) counts every */go.mod as a nested module. That includes go.mod files under testdata/ and under directories whose names start with _ or .. go list ./... never enters those directories, and isGoDiscoveryIgnoredPath already treats them as outside the build. Module fixtures under testdata/ are common, for example in tools that test against sample modules.

go.mod                          module example.com/project
a/a.go, a/a_test.go
a/testdata/fixturemod/go.mod    module example.com/fixture
a/testdata/fixturemod/main.go
b/b.go, b/b_test.go

Expected: a change to b/b.go selects b/b_test.go.

Actual: every change falls back with Go support requires one root go.mod; workspaces and nested modules require full validation, unless the repository sets "go": { "scope": "root-module" }.

Related to #80, which covers real nested modules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions