Skip to content

Add inline modules#3500

Draft
casey wants to merge 7 commits into
masterfrom
inline-modules
Draft

Add inline modules#3500
casey wants to merge 7 commits into
masterfrom
inline-modules

Conversation

@casey

@casey casey commented Jun 29, 2026

Copy link
Copy Markdown
Owner

No description provided.

casey added 2 commits June 28, 2026 20:18
Make Analyzer::analyze take the Ast to analyze plus its source path
directly, instead of deriving both from a root path via the asts map.
Extract the parse_ast item loop into a reusable parse_items helper
parameterized on a terminator token. Both changes are behavior-preserving
and prepare for inline module support.
Allow defining a submodule inline, in the same justfile, by writing
`mod NAME::` followed by the module's body as an indented block:

    mod foo::
      bar:
        echo 'recipe bar inside module foo'

Inline modules support everything module files do, including recipes,
variables, settings, and nested modules, inline or file-based. They are
gated behind the `--unstable` flag.

Closes #2442
@casey casey marked this pull request as draft June 30, 2026 19:40
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.

1 participant