Skip to content

feature: add .@ as canonical source extension, deprecate .ilo#476

Merged
danieljohnmorris merged 8 commits into
nextfrom
feature/ext-at
May 20, 2026
Merged

feature: add .@ as canonical source extension, deprecate .ilo#476
danieljohnmorris merged 8 commits into
nextfrom
feature/ext-at

Conversation

@danieljohnmorris
Copy link
Copy Markdown
Collaborator

Summary

  • .@ is now the canonical source extension for ilo programs, saving one token per filename on cl100k and o200k tokenizers (foo.ilo = 3 tokens, foo.@ = 2)
  • .ilo continues to work permanently but emits a deprecation hint on stderr at load time
  • Not BREAKING: both extensions accepted, no removal planned

Tokenizer evidence

filename cl100k tokens o200k tokens
prog.ilo 3 3
prog.@ 2 2

GitHub URL verification

https://github.com/ilo-lang/ilo/blob/feature/ext-at/examples/ext-at-demo.%40 - returns HTTP 200, renders as plain text.

What's in the diff

  • accept .@ as canonical source extension, deprecate .ilo - maybe_warn_ilo_ext() in src/main.rs, called at all three file-loading sites; AOT output path stripping handles both extensions; usage strings updated
  • rename examples/.ilo and tests/engine-matrix/.ilo to .@ - mechanical rename of ~250 fixture files; imports.@ updated to use "math-lib.@"; fs-builtins.@ glob pattern updated to **/*.@
  • update test harness - is_ilo_source() helper in examples_engines.rs; three new tests in eval_inline.rs covering .@ execution, .ilo deprecation hint, and AOT path stripping; all regression test temp paths updated
  • update internal source references - diagnostic registry, codegen, parser, vm, interpreter example paths
  • doc sweep - SPEC.md new Source File Extension section + migration command, MANIFESTO.md tokenizer note, README.md, CHANGELOG.md 0.13.0 Added entry, ai.txt regenerated
  • skills, plugin, editor - all skill docs, marketplace.json, VS Code package.json (.@ added to extensions array), pi/extensions/ilo.ts

Test plan

  • cargo test --release passes (3245 lib tests; 7 pre-existing AOT failures unrelated to this change)
  • cargo test --test examples_engines passes
  • cargo test --test eval_inline passes (202 tests including the 3 new ones)
  • ilo examples/ext-at-demo.@ main prints 42
  • ilo examples/arithmetic.ilo add 1 2 prints 3 and emits deprecation hint on stderr

Follow-ups

  • External ecosystem PRs: linguist, shared-mime-info, Pygments (tracked separately)
  • Site docs update at /Users/dan/code/ilo-lang/site

Add maybe_warn_ilo_ext() that emits a stderr hint when a .ilo file is
loaded. The .@ extension saves one token per filename on cl100k/o200k
tokenizers. Both extensions continue to work; .ilo is supported
permanently with a soft deprecation warning at load time.

Update AOT output-path stripping to handle both extensions. Update all
usage strings, REPL help, and skill descriptions to show .@ as primary.
Mechanical rename of all source fixtures to the canonical .@ extension.
The imports.@ file's use statement is updated to reference math-lib.@,
and fs-builtins.@ glob pattern updated from **/*.ilo to **/*.@ to match
the renamed tree.
- examples_engines.rs: add is_ilo_source() helper that accepts both .@
  and .ilo, update collect_ilo() to use it
- eval_inline.rs: update temp file paths to .@, add three new tests:
  at_extension_file_runs_correctly, ilo_extension_emits_deprecation_hint
  (verifies stderr hint on .ilo load), aot_at_extension_strips_correctly
- Update all regression_*.rs and cli_*.rs temp file paths to .@
Update example paths and string literals in diagnostic registry,
codegen (fmt.rs, explain.rs, python.rs), parser, vm, interpreter, and
verify modules to reflect the canonical .@ extension.
- SPEC.md: new Source File Extension section explaining .@ is canonical,
  update imports examples and CLI invocation blocks to .@
- MANIFESTO.md: add tokenizer measurement note before Prefix notation
- README.md: show .@ as primary in CLI examples, note .ilo still works
- CHANGELOG.md: 0.13.0 Added entry for .@ (not BREAKING)
- ai.txt: regenerated from SPEC.md via build.rs
- skills/ilo/*.md: update all CLI examples and file references to .@
- .claude-plugin/marketplace.json: mention .@ as canonical in description
- extensions/vscode/package.json: add .@ alongside .ilo in languages config
- pi/extensions/ilo.ts: update tool description to show .@ as canonical
@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

❌ Patch coverage is 98.92473% with 1 line in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/main.rs 98.36% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@danieljohnmorris danieljohnmorris merged commit 867c7a7 into next May 20, 2026
5 checks passed
@danieljohnmorris danieljohnmorris deleted the feature/ext-at branch May 20, 2026 17:02
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