Skip to content

Polar wip#2

Merged
jonfowler merged 3 commits into
masterfrom
polar-wip
Jun 12, 2026
Merged

Polar wip#2
jonfowler merged 3 commits into
masterfrom
polar-wip

Conversation

@jonfowler

Copy link
Copy Markdown
Owner

No description provided.

jonfowler and others added 3 commits June 12, 2026 20:08
- Dual-license MIT OR Apache-2.0: LICENSE files + license fields in all
  crate manifests and both package.jsons.
- Root README: pitch, status warning, mult_add source→SV pairing, repo
  layout, build/test commands, license + contribution terms.
- Replace the stale copilot-instructions (still described the pre-fn
  `cmp` era) with a thin pointer to CLAUDE.md.
- GitHub Actions CI: rust (fmt + workspace tests), grammar (corpus +
  generated-parser freshness, CLI pinned to 0.24.7), RTL behavioural
  suite (oss-cad-suite for a cocotb-2.x-compatible verilator).
- Track Cargo.lock (workspace has binaries; reproducible CI builds).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…install script

The installed polar-lsp had fallen 5 days behind the grammar (pre-sint/Vec/
for/init), so current files hit ERROR nodes: semantic tokens degraded and
the formatter refused — silently, because the LSP mapped FormatError::Parse
to Ok(None) with no message.

- LSP formatting now show_message()s a warning when polar-fmt refuses,
  still returning no edits so a mid-edit buffer is never wiped.
- highlights.scm: add pub/init/verilog/self/crate/super keywords; builtin
  type names (sint, bits, …) and constants (true/false/high/low) as
  #any-of? identifier patterns, placed before the path-segment pattern so
  constants win. New @constant capture maps to a new enumMember legend slot.
- TextMate fallback grammar brought current: full keyword set, builtin
  types, hex/binary/underscore numbers.
- Drift guards in polar-lsp tests: every visible anonymous alphabetic node
  kind (= keyword) and every builtin_type_names() entry (newly exposed from
  def_map's hoisted BUILTINS table) must appear in both highlights.scm and
  the TextMate grammar; plus a token smoke test for pub/init/sint/high.
- scripts/install-tooling.sh: release-build polar-lsp + polar-fmt into
  ~/.local/bin; documented in CLAUDE.md. Rerun after grammar/tooling changes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The pre-public rebrand (planning memory: mirin chosen over staying polar —
Oso's Polar policy DSL owns .polar files, polars adjacency in Rust, and
Microchip's PolarFire FPGA line is an in-domain trademark).

Scheme: crates mirin-compiler/-old/-fmt/-lsp, grammar tree-sitter-mirin
(C symbol tree_sitter_mirin, regenerated), binaries mirin-lsp/mirin-fmt,
VS Code language id `mirin` / source.mirin, sources *.mrn (consonant
skeleton, matching the old .plr convention; .mir deliberately avoided —
rustc MIR dumps). Repo/branch/remote names unchanged for now.

Mechanical: git mv of 5 package dirs + 121 .plr files + tmLanguage files,
then polar->mirin / Polar->Mirin / plr->mrn over all tracked text with
`polarity` (reset-polarity comments) protected. Verified: full workspace
test suite, tree-sitter corpus, mult_add.mrn -> sv, RTL counter tests,
fresh mirin-lsp/mirin-fmt installed (old polar-* binaries removed).

Also folds in two pre-existing working-tree tweaks: packet_struct blank
line, todo-list vector-status reshuffle.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jonfowler jonfowler merged commit 771ed41 into master Jun 12, 2026
2 of 3 checks passed
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