Skip to content

feat: migrate file extension from .as to .affine for GitHub Linguist …#16

Merged
hyperpolymath merged 1 commit into
mainfrom
claude/explore-repo-language-3QNs5
Apr 9, 2026
Merged

feat: migrate file extension from .as to .affine for GitHub Linguist …#16
hyperpolymath merged 1 commit into
mainfrom
claude/explore-repo-language-3QNs5

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

…recognition

The .as extension conflicts with ActionScript in GitHub Linguist, causing all AffineScript source files to be misclassified as ActionScript/JavaScript. This migration to .affine resolves the conflict and enables proper language detection.

Changes:

  • Rename all 153 .as source files to .affine across conformance/, examples/, stdlib/, test/, and tests/ directories
  • Add linguist-language=AffineScript directive to .gitattributes for .affine
  • Update tree-sitter grammar file-types from "as" to "affine"
  • Update VSCode extension to register .affine instead of .as
  • Update all documentation references (28+ files) to use .affine
  • Update test fixture references in test_e2e.ml

https://claude.ai/code/session_015S2ndRbwuJPpjkv54BpVDw

…recognition

The .as extension conflicts with ActionScript in GitHub Linguist, causing all
AffineScript source files to be misclassified as ActionScript/JavaScript. This
migration to .affine resolves the conflict and enables proper language detection.

Changes:
- Rename all 153 .as source files to .affine across conformance/, examples/,
  stdlib/, test/, and tests/ directories
- Add linguist-language=AffineScript directive to .gitattributes for .affine
- Update tree-sitter grammar file-types from "as" to "affine"
- Update VSCode extension to register .affine instead of .as
- Update all documentation references (28+ files) to use .affine
- Update test fixture references in test_e2e.ml

https://claude.ai/code/session_015S2ndRbwuJPpjkv54BpVDw
@hyperpolymath hyperpolymath merged commit 2f425c5 into main Apr 9, 2026
24 of 32 checks passed
hyperpolymath pushed a commit that referenced this pull request May 30, 2026
Adds docs/specs/zig-ffi-patterns.adoc — the canonical, task-oriented
recipe for binding a Zig C-ABI export to an AffineScript extern fn,
the deliverable for bindings #19 in docs/bindings-roadmap.adoc.

Scoped to avoid DOC-DEDUP overlap: SPEC §2.10 owns the grammar,
STDLIB-EXTERN-AUDIT owns the inventory, codegen-environment owns the
wasm codegen mechanics; this doc is the authoring recipe + per-backend
host contract that ties them together.

Grounded in the actual codegen:
- wasm: every extern fn -> (import "env" "<name>") (lib/codegen.ml)
- Deno-ESM: deno_builtins intrinsics emit a self-contained __as_* helper;
  declared externs lower to a same-named host symbol (mangle is identity
  except JS reserved words) (lib/codegen_deno.ml)
Worked example uses the existing hpm-json-rsr binding in stdlib/json.affine.

Bumps the #19 row in bindings-roadmap.adoc from a partial-scaffold status
to usable per the doc's own 'update the row in the same PR' rule.
Unblocks the RSR rewires #11 / #12 / #16.
hyperpolymath pushed a commit that referenced this pull request May 31, 2026
Adds docs/specs/zig-ffi-patterns.adoc — the canonical, task-oriented
recipe for binding a Zig C-ABI export to an AffineScript extern fn,
the deliverable for bindings #19 in docs/bindings-roadmap.adoc.

Scoped to avoid DOC-DEDUP overlap: SPEC §2.10 owns the grammar,
STDLIB-EXTERN-AUDIT owns the inventory, codegen-environment owns the
wasm codegen mechanics; this doc is the authoring recipe + per-backend
host contract that ties them together.

Grounded in the actual codegen:
- wasm: every extern fn -> (import "env" "<name>") (lib/codegen.ml)
- Deno-ESM: deno_builtins intrinsics emit a self-contained __as_* helper;
  declared externs lower to a same-named host symbol (mangle is identity
  except JS reserved words) (lib/codegen_deno.ml)
Worked example uses the existing hpm-json-rsr binding in stdlib/json.affine.

Bumps the #19 row in bindings-roadmap.adoc from a partial-scaffold status
to usable per the doc's own 'update the row in the same PR' rule.
Unblocks the RSR rewires #11 / #12 / #16.
hyperpolymath pushed a commit that referenced this pull request May 31, 2026
Adds docs/specs/zig-ffi-patterns.adoc — the canonical, task-oriented
recipe for binding a Zig C-ABI export to an AffineScript extern fn,
the deliverable for bindings #19 in docs/bindings-roadmap.adoc.

Scoped to avoid DOC-DEDUP overlap: SPEC §2.10 owns the grammar,
STDLIB-EXTERN-AUDIT owns the inventory, codegen-environment owns the
wasm codegen mechanics; this doc is the authoring recipe + per-backend
host contract that ties them together.

Grounded in the actual codegen:
- wasm: every extern fn -> (import "env" "<name>") (lib/codegen.ml)
- Deno-ESM: deno_builtins intrinsics emit a self-contained __as_* helper;
  declared externs lower to a same-named host symbol (mangle is identity
  except JS reserved words) (lib/codegen_deno.ml)
Worked example uses the existing hpm-json-rsr binding in stdlib/json.affine.

Bumps the #19 row in bindings-roadmap.adoc from a partial-scaffold status
to usable per the doc's own 'update the row in the same PR' rule.
Unblocks the RSR rewires #11 / #12 / #16.
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.

2 participants