Skip to content

Add Elixir parser support (.ex, .exs) #139

@josephismikhail

Description

@josephismikhail

Problem

Ix does not currently parse .ex or .exs files. Elixir source and script files are treated as unrecognized and excluded from analysis, meaning application logic, process definitions, and configuration written in Elixir are invisible to the system.

Proposed solution

Add an Elixir parser that can identify and extract:

  • Module definitions (e.g. defmodule MyApp.User do)
  • Function definitions (def, defp)
  • Macros (defmacro, defmacrop)
  • Use, import, alias, and require statements
  • Struct definitions (e.g. defstruct)
  • Pattern matching and guard clauses
  • GenServer, Supervisor, and OTP behaviour callbacks
  • Mix configuration and script patterns in .exs files

Support the following file patterns: *.ex, *.exs

Why it matters

Elixir is built on the Erlang VM and is widely used for fault-tolerant, distributed, and real-time systems (e.g. Phoenix web framework, LiveView). Without parsing Elixir, Ix cannot reason about OTP process trees, module dependencies, or how application logic is structured across a concurrent, distributed codebase.

Merge requirements

Before this can be merged to main, the following must pass:

  • Tested on 3 repos
  • No regressions on existing parsers (ix map on a known TS/JS repo, verify counts unchanged)
  • Unit + smoke tests pass (npm test in ix-cli)
  • Module definitions (defmodule) ingested as entities
  • Public and private functions (def, defp) ingested as entities
  • Macros (defmacro, defmacrop) ingested as entities
  • use, import, alias, and require statements resolved
  • defstruct ingested and fields visible
  • OTP callbacks (GenServer, Supervisor) ingested and linked to their module
  • CONTAINS chains correctly: module → function/macro/struct
  • .exs files ingested (Mix config and scripts visible)
  • ix text returns results with language: elixir
  • ix contains returns members for a known Elixir module

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions