Skip to content

Follow replace directives that point inside the repository #81

Closed

Description

@adityankale190895

Part of #76.

With go.scope set, any local replace falls back:

Go root-module scope with local replacements requires full validation

replace example.com/x => ./x that points inside the repository is common in monorepos, and it's fully visible: the replaced module's packages show up in go list output with Module.Replace.Dir inside the checkout.

Scope

  • In src/repo/adapters/go.ts, when every Module.Replace.Dir is inside the repository, treat that directory as modelled (not excluded) instead of adding the blocker. Its packages are already in the go list -deps output.
  • Remove that directory from goExcludedModuleRoots so changes there are analysed, not refused.

Must fall back (blocker)

  • A replace pointing outside the repository (already handled: Go local module replacement lies outside the repository).

Done when

  • A fixture with a root module, go.scope: root-module and replace example.com/x => ./x shows that a change in x/ selects the root packages that import it.
  • Tests skip cleanly when go isn't installed, like the existing Go tests.

Activity

  1. added
    enhancement
    good first issue
    on Nov 9, 2026
  2. added a commit that references this issue on Nov 15, 2026
    76e3cbe
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

    adapterenhancementgood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions