Skip to main content

Module app_src

Module app_src 

Source
Expand description

.app.src discovery and parsing.

Walks a source tree, finds every *.app.src file, and extracts the application name, declared modules, and listed dependencies. The parser is targeted: it accepts the small handful of Erlang syntactic shapes that appear in real .app.src files and rejects anything else as a parse error. It is not a general Erlang term parser.

Structs§

AppSrcSpec
Parsed contents of one .app.src file.
DiscoveryOutput

Enums§

DiscoveryWarning

Constants§

SKIP_DIRS
Directories the walker skips entirely. Common build-output and vendored-dependency layouts: rebar3’s _build, Erlang.mk’s _rel and logs, npm-style node_modules, Nix’s .direnv, plus .git. target is included so cross-language repos that vendor Rust artifacts don’t bloat the scan.

Functions§

application_of_path
Resolves a file path under repo_root to the application it belongs to: the app whose .app.src lives in the deepest shared prefix of path.
discover
Walks root recursively, parses every *.app.src found, returns a DiscoveryOutput carrying the parsed specs plus any per-file warnings.
parse
Parses a single .app.src file’s text. The accepted shape is {application, <name>, [<prop>, ...]}. with optional whitespace, %-line comments, and any prop order. Unknown props are ignored.