Skip to content

Remove unused compiler modules and helpers - #8555

Merged
cristianoc merged 4 commits into
masterfrom
codex/cleanup-unused-compiler-code
Aug 17, 2026
Merged

Remove unused compiler modules and helpers#8555
cristianoc merged 4 commits into
masterfrom
codex/cleanup-unused-compiler-code

Conversation

@cknitt

@cknitt cknitt commented Aug 16, 2026

Copy link
Copy Markdown
Member

Follow-up to #8551, extending the compiler dead-code cleanup.

Summary

  • Remove the unused js_fold and ast_exp modules.
  • Remove unused helpers and interface declarations across the compiler’s core, frontend, type-checking, syntax, and utility layers.
  • Remove dependency error variants that could never be constructed.
  • Remove Typedtree fields that were populated but never read.
  • Update the error-variant catalog accordingly.

Overall, this removes 2,241 lines across 126 files without changing compiler behavior.

Testing

  • make test

cknitt added 4 commits August 16, 2026 19:19
Signed-off-by: Christoph Knittel <ck@cca.io>
Signed-off-by: Christoph Knittel <ck@cca.io>
Signed-off-by: Christoph Knittel <ck@cca.io>
Signed-off-by: Christoph Knittel <ck@cca.io>
@cknitt
cknitt force-pushed the codex/cleanup-unused-compiler-code branch from aee4003 to 488c3b6 Compare August 16, 2026 17:42
@codecov

codecov Bot commented Aug 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.54%. Comparing base (1beb54d) to head (488c3b6).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8555      +/-   ##
==========================================
+ Coverage   74.88%   75.54%   +0.65%     
==========================================
  Files         476      476              
  Lines       63269    62710     -559     
==========================================
- Hits        47382    47374       -8     
+ Misses      15887    15336     -551     
Files with missing lines Coverage Δ
compiler/common/js_config.ml 75.00% <ø> (+8.33%) ⬆️
compiler/core/js_cmj_format.ml 89.79% <ø> (+6.77%) ⬆️
compiler/core/js_cmj_load.ml 80.00% <ø> (ø)
compiler/core/js_dump.ml 87.30% <ø> (ø)
compiler/core/js_exp_make.ml 64.35% <ø> (+1.05%) ⬆️
compiler/core/js_of_lam_block.ml 100.00% <ø> (+11.11%) ⬆️
compiler/core/js_of_lam_option.ml 100.00% <ø> (+3.22%) ⬆️
compiler/core/js_of_lam_string.ml 100.00% <ø> (+50.00%) ⬆️
compiler/core/js_packages_info.ml 73.91% <ø> (+18.17%) ⬆️
compiler/core/lam.ml 70.66% <ø> (+13.47%) ⬆️
... and 53 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pkg-pr-new

pkg-pr-new Bot commented Aug 16, 2026

Copy link
Copy Markdown

Open in StackBlitz

rescript

npm i https://pkg.pr.new/rescript@8555

@rescript/darwin-arm64

npm i https://pkg.pr.new/@rescript/darwin-arm64@8555

@rescript/darwin-x64

npm i https://pkg.pr.new/@rescript/darwin-x64@8555

@rescript/linux-arm64

npm i https://pkg.pr.new/@rescript/linux-arm64@8555

@rescript/linux-x64

npm i https://pkg.pr.new/@rescript/linux-x64@8555

@rescript/runtime

npm i https://pkg.pr.new/@rescript/runtime@8555

@rescript/win32-x64

npm i https://pkg.pr.new/@rescript/win32-x64@8555

commit: 488c3b6

@github-actions

Copy link
Copy Markdown

@cknitt
cknitt marked this pull request as ready for review August 16, 2026 18:52
@cknitt
cknitt requested a review from cristianoc August 16, 2026 19:08

@cristianoc cristianoc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great lots of unused stuff found.

@cristianoc
cristianoc merged commit 0c8e5b4 into master Aug 17, 2026
29 checks passed
@cristianoc
cristianoc deleted the codex/cleanup-unused-compiler-code branch August 17, 2026 08:11
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