Repository navigation
Remove dead code: js_stdout, gentype Curry import, toplevel entry point and more - #9146
Conversation
Js_config.js_stdout starts as `ref true` and nothing writes it, so the two `&& !js_stdout` tests are always true. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kbf3gKyiYMf54wPRxFdUWe Signed-off-by: Christoph Knittel <ck@cca.io>
emit_import_curry is never set to true, so gentype never imports curry.js (which the runtime no longer has). The flag, the import path, platform_lib and Module_name.curry go with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kbf3gKyiYMf54wPRxFdUWe Signed-off-by: Christoph Knittel <ck@cca.io>
Shared.type_to_string read its cache only when cache_type_to_string was set, which nothing does, but stored every printed type in it, keyed by a type_expr that a hash collision would compare structurally. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kbf3gKyiYMf54wPRxFdUWe Signed-off-by: Christoph Knittel <ck@cca.io>
The compiler no longer recognises `@uncurry`, and the `Js.Fn.arityN` types that is_uncurried_internal looked for are gone from the runtime, so hover and references never took those branches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kbf3gKyiYMf54wPRxFdUWe Signed-off-by: Christoph Knittel <ck@cca.io>
type_toplevel_phrase, left over from the OCaml REPL, was the only caller passing `~toplevel:true`, so the `?toplevel` parameters of type_structure, type_open and Env.open_signature always took their default. The outcome printer test types its file with type_structure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kbf3gKyiYMf54wPRxFdUWe Signed-off-by: Christoph Knittel <ck@cca.io>
Debug printers in parmatch.ml and switch.ml, newmarkedvar and check_expans in btype, and the Clflags.recursive_types remnants in typedecl and ctype were all commented out; print_pat still matched Tpat_lazy, which no longer exists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kbf3gKyiYMf54wPRxFdUWe Signed-off-by: Christoph Knittel <ck@cca.io>
Nothing constructs Otyp_attribute; only the outcome printer matched it. The commit also adds the changelog fragment for this dead-code cleanup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kbf3gKyiYMf54wPRxFdUWe Signed-off-by: Christoph Knittel <ck@cca.io>
Changelog💅 Polish
🏠 Internal
Semantic Diff7 commits · Full page Remove the js_stdout flag, which is always truee443be6 · cknitt + Claude · Oct 30, 2026, 20:18 UTC Js_config.js_stdout starts as Remove gentype's Curry import pathb6e4b04 · cknitt + Claude · Oct 30, 2026, 20:29 UTC emit_import_curry is never set to true, so gentype never imports curry.js (which the runtime no longer has). The flag, the import path, platform_lib and Module_name.curry go with it. Stop storing every printed type in an unused analysis cache0bfb53e · cknitt + Claude · Oct 30, 2026, 20:31 UTC Shared.type_to_string read its cache only when cache_type_to_string was set, which nothing does, but stored every printed type in it, keyed by a type_expr that a hash collision would compare structurally. Stop suggesting
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #9146 +/- ##
==========================================
+ Coverage 81.73% 81.74% +0.01%
==========================================
Files 460 460
Lines 64936 64903 -33
==========================================
- Hits 53076 53057 -19
+ Misses 11860 11846 -14
🚀 New features to boost your workflow:
|
rescript
@rescript/belt
@rescript/darwin-arm64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/runtime
@rescript/win32-x64
commit: |
|
Developer playground preview: https://rescript-lang.github.io/rescript/dev-playground/?version=pr-9146 |
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
cristianoc
left a comment
There was a problem hiding this comment.
still curry around?
incredible
…nt and more (rescript-lang#9146) * Remove the js_stdout flag, which is always true Js_config.js_stdout starts as `ref true` and nothing writes it, so the two `&& !js_stdout` tests are always true. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kbf3gKyiYMf54wPRxFdUWe Signed-off-by: Christoph Knittel <ck@cca.io> * Remove gentype's Curry import path emit_import_curry is never set to true, so gentype never imports curry.js (which the runtime no longer has). The flag, the import path, platform_lib and Module_name.curry go with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kbf3gKyiYMf54wPRxFdUWe Signed-off-by: Christoph Knittel <ck@cca.io> * Stop storing every printed type in an unused analysis cache Shared.type_to_string read its cache only when cache_type_to_string was set, which nothing does, but stored every printed type in it, keyed by a type_expr that a hash collision would compare structurally. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kbf3gKyiYMf54wPRxFdUWe Signed-off-by: Christoph Knittel <ck@cca.io> * Stop suggesting @uncurry and checking for Js.Fn arity types in analysis The compiler no longer recognises `@uncurry`, and the `Js.Fn.arityN` types that is_uncurried_internal looked for are gone from the runtime, so hover and references never took those branches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kbf3gKyiYMf54wPRxFdUWe Signed-off-by: Christoph Knittel <ck@cca.io> * Remove the OCaml toplevel phrase entry point from Typemod type_toplevel_phrase, left over from the OCaml REPL, was the only caller passing `~toplevel:true`, so the `?toplevel` parameters of type_structure, type_open and Env.open_signature always took their default. The outcome printer test types its file with type_structure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kbf3gKyiYMf54wPRxFdUWe Signed-off-by: Christoph Knittel <ck@cca.io> * Delete commented-out OCaml code in the type checker and match compiler Debug printers in parmatch.ml and switch.ml, newmarkedvar and check_expans in btype, and the Clflags.recursive_types remnants in typedecl and ctype were all commented out; print_pat still matched Tpat_lazy, which no longer exists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kbf3gKyiYMf54wPRxFdUWe Signed-off-by: Christoph Knittel <ck@cca.io> * Remove the Otyp_attribute outcome tree node Nothing constructs Otyp_attribute; only the outcome printer matched it. The commit also adds the changelog fragment for this dead-code cleanup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kbf3gKyiYMf54wPRxFdUWe Signed-off-by: Christoph Knittel <ck@cca.io> --------- Signed-off-by: Christoph Knittel <ck@cca.io> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Pedro Castro <aspeddro@gmail.com>
Removes dead code found in a repo-wide cleanup survey. Each commit removes one thing, and none changes compiler output.
js_stdout:Js_config.js_stdoutstarts asref trueand nothing writes it, so the two&& !js_stdouttests always passed.emit_import_curryis never set, so gentype never importedcurry.js, which the runtime no longer ships. The import path,platform_libandModule_name.currygo with it.Shared.type_to_stringonly read its cache whencache_type_to_stringwas set, which nothing does, yet it still stored every printed type, keyed by atype_expr.@uncurry/Js.Fn: editor completion still suggested@uncurry, which the compiler no longer recognises. Hover and references still checked forJs.Fn.arityNtypes, which no longer exist.Typemod.type_toplevel_phrasewas the only caller passing~toplevel:true, so the?toplevelparameters oftype_structure,type_openandEnv.open_signaturealways took their default. The outcome printer test now usesTypemod.type_structure.parmatch.mlandswitch.ml,newmarkedvarandcheck_expansinbtype, andClflags.recursive_typesremnants intypedeclandctype.Otyp_attribute: never constructed; only the outcome printer matched it.Changelog: a polish fragment for the
@uncurrycompletion and an internal fragment for the rest.🤖 Generated with Claude Code
https://claude.ai/code/session_01Kbf3gKyiYMf54wPRxFdUWe