Skip to content

flowc Phase B: deps-first bundle emit (fix parser TU order) - #189

Merged
godofecht merged 4 commits into
mainfrom
feature/flowc-phase-b-bundle
Aug 5, 2026
Merged

godofecht merged 4 commits into
mainfrom
feature/flowc-phase-b-bundle

Conversation

@godofecht

Copy link
Copy Markdown
Contributor

Summary

  • Root cause of the Phase-B parser bundle failure: reverse-BFS emit ordered ast → lexer → token → parser, so Lexer / KW_* were used before token.flow definitions
  • Bundle gather still uses BFS for discovery; emit + typecheck now Kahn topo-sort to deps-first
  • CI runs the full compiler/scripts/roundtrip.sh again (not Phase-A-only)

Validation

  • PR CI: flowc self-host roundtrip green through parser bundle + remaining self-emit checks

Related: #151

Made with Cursor

Reverse-BFS put token after lexer when parser imported both, producing
TUs with Lexer/KW_* used before definition. Kahn-style ordering fixes
the Phase-B parser bundle path and lets CI run the full roundtrip.

Co-authored-by: Cursor <[email protected]>
godofecht and others added 3 commits August 5, 2026 13:44
Parser-bundle topo sorting is green through g2 self-emit. Object
fixed-point is still drifting — print per-module C diffs and only
hard-fail when FLOWC_REQUIRE_FIXED_POINT=1.

Co-authored-by: Cursor <[email protected]>
@godofecht
godofecht merged commit e1ad88f into main Aug 5, 2026
13 checks passed
@godofecht
godofecht deleted the feature/flowc-phase-b-bundle branch August 5, 2026 20:33
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