Skip to content

[compiler-bin] Schedule builds by package dependencies - #505

Draft
purefunctor wants to merge 18 commits into
mainfrom
package-aware-build-progress
Draft

[compiler-bin] Schedule builds by package dependencies#505
purefunctor wants to merge 18 commits into
mainfrom
package-aware-build-progress

Conversation

@purefunctor

@purefunctor purefunctor commented Sep 12, 2026

Copy link
Copy Markdown
Owner

Why

Make packages a meaningful unit of build scheduling and progress reporting, while separating command-line policy, compilation, terminal rendering, and long-lived sessions.

This began as a package-aware build experiment and developed into a replacement for the monolithic CLI. The replacement is now promoted as the canonical iris executable rather than maintained as a parallel iris-v2 implementation.

Architecture

compiler-bin is now a crate group with explicit subsystem boundaries:

  • iris-cli owns command parsing, configuration conversion, logging setup, and exit policy.
  • iris-build owns project preparation, package dependency plans, serial and parallel executors, compilation, typed build events, and persistent build sessions.
  • iris-progress owns the progress model, Ratatui rendering runtime, and watch summaries without depending on compiler internals.
  • iris-package owns project creation and adding dependencies through Spago.
  • iris-lsp exposes the language server behind an explicit configuration and startup interface.
  • iris-watch connects filesystem notifications to persistent build sessions and rebuild reporting.

One-shot builds derive package dependencies from Spago lockfiles, validate source ownership, preserve dependency paths through packages without selected sources, and condense dependency cycles into scheduling groups. The parallel executor schedules ready groups against a shared compiler query engine; diagnostics and output writing are finalized afterward.

User-visible behavior

  • The canonical command set is iris new, add, build, watch, and lsp.
  • Interactive builds show a bounded history of ten completed packages, aligned package timings, and an animated Braille progress bar with true-color, ANSI, and uncolored appearances.
  • Progress rendering finishes before compiler diagnostics are printed and is disabled when stderr is not a terminal.
  • Build and watch support --no-diagnostics independently of --quiet; suppressing diagnostics does not make a failing build succeed. Build retains resilient output generation through --resilient.
  • Watch mode retains compiler state across rebuilds, handles PureScript and JavaScript/JSX FFI changes, reports timestamped outcomes and changed inputs, avoids rewriting unchanged output, and reconciles generated files.
  • Release and canary workflows, release tooling, E2E entry points, and third-party notices now target iris-cli while continuing to produce the iris binary.

Deliberate omissions

This is not command-for-command compatible with the removed CLI. docs, compile, run, and test are intentionally omitted for now and rejected by the parser. The bundled Node runner, old --log-file flag, and old custom CLI/configuration diagnostics are also removed.

Watch mode reuses incremental compiler state but does not currently run through the one-shot package scheduler. This change also does not add an on-disk package compilation cache or claim a build-performance improvement.

Verification

  • Package-scoped cargo check --tests passed for all six subsystem crates and tests-e2e.
  • cargo nextest run -p iris-build -p iris-cli -p iris-lsp -p iris-package -p iris-progress -p iris-watch — 65 passed.
  • just e2e — 31 passed across CLI, LSP, package management, build, watch, and StyleX scenarios.
  • Final CLI E2E rerun — 5 passed.
  • just format and git diff --check passed.
  • iris --version reports iris 0.1.0.

Coverage includes package-plan and executor invariants, progress rendering, omitted-command rejection, diagnostic suppression, LSP configuration, watch recovery, source additions and removals, FFI changes, and output reconciliation.

@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 12, 2026

Copy link
Copy Markdown

Compatibility regression report

Package set 81.1.0 for PureScript 0.15.15.

✅ The candidate introduces no compatibility errors.

Diagnostic class Base Candidate Introduced Fixed
Compiler errors 0 0 0 0
Compiler warnings 36 36 0 0
Verifier errors 0 0 0 0

Introduced errors

None.

Fixed errors (0)

None.

Warning changes (0 introduced, 0 fixed)

Introduced

None.

Fixed

None.

Candidate errors (0)

None.

Candidate warnings (36)
  • deno@0.0.5/src/Deno.purs:37:1CustomWarning (checking): Data.Map's `Semigroup` instance is now unbiased and differs from the left-biased instance defined in PureScript releases <= 0.13.x.
  • deno@0.0.5/src/Deno/Dotenv.purs:38:1CustomWarning (checking) × 2: Data.Map's `Semigroup` instance is now unbiased and differs from the left-biased instance defined in PureScript releases <= 0.13.x.
  • deno@0.0.5/src/Deno/Http/Request.purs:46:1CustomWarning (checking): Data.Map's `Semigroup` instance is now unbiased and differs from the left-biased instance defined in PureScript releases <= 0.13.x.
  • literals@1.0.2/src/Literals/Null.purs:11:1UnparseableFFIModule (javascript): Oxc could not parse the JavaScript FFI module. Fix the invalid or unsupported JavaScript syntax; Iris treated the module as opaque and skipped export-name validation: Unexpected token
  • react-basic-dom-beta@0.1.1/src/Beta/DOM.purs:33:31DuplicateImport (indexing): Import list contains multiple references to 'Proxy'
  • sparse-polynomials@3.0.1/src/Data/Sparse/Polynomial.purs:1048:1MissingPatterns (checking) × 2: Pattern match is not exhaustive. Missing: _
  • text-formatting@0.1.0/src/Data/Text/Format/Dodo/Printer.purs:61:1CustomWarning (checking) × 23: Debug function usage
  • trivial-unfold@0.5.0/src/Data/Unfoldable1/Trivial1.purs:150:17MissingPatterns (checking): Pattern match is not exhaustive. Missing: Right _
  • xterm@1.0.0/src/XTerm/UnicodeHandling.purs:15:1UnparseableFFIModule (javascript) × 2: Oxc could not parse the JavaScript FFI module. Fix the invalid or unsupported JavaScript syntax; Iris treated the module as opaque and skipped export-name validation: Expected a semicolon or an implicit semicolon after a statement, but found none
  • yoga-react-dom@2.0.1/src/Yoga/React/DOM.purs:34:31DuplicateImport (indexing): Import list contains multiple references to 'Proxy'
  • yoga-tree-utils@1.0.0/src/Yoga/Tree/Extended/Path.purs:20:72DuplicateImport (indexing): Import list contains multiple references to 'snoc'

View workflow run

purefunctor and others added 11 commits September 12, 2026 14:57
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