Skip to content

fix(ast): preserve local helper matches under broad imports - #7

Merged
dannote merged 1 commit into
elixir-vibe:masterfrom
lATAl:fix/local-helper-ast-matches
Sep 13, 2026
Merged

dannote merged 1 commit into
elixir-vibe:masterfrom
lATAl:fix/local-helper-ast-matches

Conversation

@lATAl

@lATAl lATAl commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Problem

Pi.AST.search/2 can miss local helper calls in modules that use broad imports, such as import Ecto.Changeset.

With ExAST 0.12.0, a local call to ensure_vector_store_mapping/5 is incorrectly resolved as Ecto.Changeset.ensure_vector_store_mapping/5. Searching for the local helper therefore returns no matches, even though it is defined and called in the source.

Changes

  • Raise the minimum ExAST version to ~> 0.12.10, which fixes this import resolution behavior.
  • Update the lockfile from ExAST 0.12.0 to 0.12.10 and its transitive dependency Sourceror from 1.12.0 to 1.12.2.
  • Add a regression test with import Ecto.Changeset and a local helper, asserting that AST search finds both the call and the definition.

@dannote
dannote merged commit 5d0ea85 into elixir-vibe:master Sep 13, 2026
1 check passed
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.

2 participants