Skip to content

Drop the ReScript namespace handling of module names - #231

Merged
cknitt merged 2 commits into
masterfrom
drop-rescript-namespaces
Nov 5, 2026
Merged

cknitt merged 2 commits into
masterfrom
drop-rescript-namespaces

Conversation

@cknitt

@cknitt cknitt commented Nov 5, 2026

Copy link
Copy Markdown
Member

One more ReScript leftover, missed by #228. Paths.getModuleName derived a unit's module name from its source file and cut it at the first -, for ReScript's namespaced files (Module-Project). OCaml module names can't contain -, and dune namespaces with __, so for OCaml the name is simply the source file's base name without extension. Paths.ml goes.

Testing:

(Two commits because the first missed the caller; squash on merge.)

🤖 Generated with Claude Code

https://claude.ai/code/session_01Kbf3gLDo8mBJKpNE25WAwT

cknitt and others added 2 commits November 5, 2026 14:06
Paths.getModuleName derived a unit's module name from its source file
and cut it at the first "-", for ReScript's namespaced files
(Module-Project). OCaml module names cannot contain "-", and dune
namespaces with "__", so for OCaml the name is the source file's base
name without extension. Paths.ml goes.

A sweep of the 69 review repros is identical, dune test passes, and the
ReScript compiler's OCaml sources still analyze to 0 issues.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kbf3gLDo8mBJKpNE25WAwT
The previous commit removed Paths.ml but missed its only caller: the
module name is now the source file's base name without extension.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kbf3gLDo8mBJKpNE25WAwT
@cknitt
cknitt requested a review from cristianoc November 5, 2026 14:10
@cknitt
cknitt merged commit 83aec48 into master Nov 5, 2026
7 checks passed
@cknitt cknitt mentioned this pull request Nov 5, 2026
cknitt added a commit that referenced this pull request Nov 5, 2026
Releases the dead-code fixes of #224 (several build trees analyzed
together, type re-exports, optional-argument aliases, functions passed as
arguments, abbreviated function types), the move to an OCaml-only
repository (#226-#228, #231, including the removal of @Gentype support)
and the new minimum of OCaml 4.14 (#230).


Claude-Session: https://claude.ai/code/session_01Kbf3gLDo8mBJKpNE25WAwT

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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