Skip to content

Add experimental Scala 3 source scanner - #110

Merged
MrLesk merged 17 commits into
MrLesk:mainfrom
aboisvert:scala3-scanner
Oct 6, 2026
Merged

MrLesk merged 17 commits into
MrLesk:mainfrom
aboisvert:scala3-scanner

Conversation

@aboisvert

@aboisvert aboisvert commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Adds an experimental Scala 3 scanner using Scalameta 4.17.3. Groma reads its selected .scala files using a bundled parser and Java runtime, without installed Java, Scala, sbt, project dependencies, or a project build.

The scanner reports declarations, source outlines, operations, and call-site evidence at original source locations. Extension methods keep their enclosing scope: top-level functions or members of the declaring type/object. Calls remain unresolved when syntax cannot prove their target. A parse/read error rejects the whole scan; the scanner does not skip failing files or emit duplicate-body fingerprints.

Source selection uses Groma's existing include/exclude lists, including custom source paths. Includes discovery, the existing five-host package assembly flow, upstream license notices, documentation, and a curated scanner component. The branch includes main through 0a75d08d, including the COBOL/NASM additions.

Task: TASK-549 — Align the Scala scanner PR with current scanner contracts.

Validation:

  • bun run check: 781 passed, 51 existing optional skips, no failures.
  • Isolated Scala package checks: 34 assertions, including extension ownership, visibility, source locations, calls and the polymorphic colon argument.
  • Relocated package test: 7 assertions, empty home, no installed language tools.
  • Five-host package assembly checks pass. Cold simplicity, implementer specification/quality, and final full-context complexity reviews pass.

Real-project checks used the packaged scanner on macOS ARM64 with default source selection, empty homes and no language tools on PATH. All three pass scans, outlines, exact file inventory, repeated-observation equality and source-position consistency; all checkouts remain unchanged and clean.

Project and revision Selected files Result
Ox, Scala 3.3.8 214 Pass; previously missing extension methods are present.
Neotype, Scala 3.3.8 188 Pass; the top-level unwrap extension is present.
Kyo, default Scala 3.9.0 4,307 Pass; the polymorphic argument parses, with its method and calls at original locations.

The audit exposed omitted extension groups and a parser failure in Kyo. Commit 20668945 fixes both and adds small regression fixtures; the same repository revisions were rerun without excluding the failing source.

Platform CI for the fix commit passed on Linux, macOS, and Windows: run 37441097162. The earlier implementation passed Linux, macOS, and Windows CI. Architecture comparison is separately blocked before scanning by the repository's actions/checkout fork restriction in pull_request_target; no unsafe-checkout override was added.

Merged as 4e984291d1478154e0f0bd974bfb7c2d81bbdce8. The five-platform package preparation run passed on that merged commit, including every host build and fresh-checkout check. Publishing jobs were skipped. The assembled npm tarball passed an offline npm install, the installed-package test without language tools, and npm publication dry run. The new npm package is @groma/scanner-scala@0.1.0; the complete 105.4 MB tarball is prepared and awaits owner login/approval for the first npm publication.

@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Groma architecture comparison

Changes Added Modified Removed
Components 1 1 0
Relationships 0 0 0

Open before / after comparison

Compared 0a75d08 (merge base) → 9797641.

@MrLesk MrLesk changed the title Add Scala3 support (create Scala3 scanner) [WIP] Add experimental Scala 3 source scanner Oct 6, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@MrLesk
MrLesk merged commit 4e98429 into MrLesk:main Oct 6, 2026
7 of 9 checks passed

This branch was successfully deployed

1 active deployment
github-pages — 20668945 Deployed Oct 6, 2026 by MrLesk via deploy #161
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