WebSafe 3.7github.com
|
|
🏠
Skip to content

Reanalyze: link type re-export labels#8217

Merged
cknitt merged 4 commits intomasterfrom
reanalyze-type-reexport-manifest
Jan 23, 2026
Merged

Reanalyze: link type re-export labels#8217
cknitt merged 4 commits intomasterfrom
reanalyze-type-reexport-manifest

Conversation

@cristianoc
Copy link
Collaborator

Track manifest type paths on label declarations so re-exported record/variant labels can be linked to their manifest counterparts during type label dependency wiring.

Adds a regression test for type y = x = {...} field liveness.

Track manifest type paths on label declarations so re-exported record/variant labels
can be linked to their manifest counterparts during type label dependency wiring.

Adds a regression test for `type y = x = {...}` field liveness.

Signed-off-by: Cristiano Calcagno <cristianoc@users.noreply.github.com>
Signed-off-by: Cristiano Calcagno <cristianoc@users.noreply.github.com>
@cristianoc cristianoc requested a review from cknitt January 23, 2026 10:33
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 23, 2026

Open in StackBlitz

rescript

npm i https://pkg.pr.new/rescript-lang/rescript@8217

@rescript/darwin-arm64

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

@rescript/darwin-x64

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

@rescript/linux-arm64

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

@rescript/linux-x64

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

@rescript/runtime

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/runtime@8217

@rescript/win32-x64

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

commit: 64fd441

When a type is re-exported via `type y = x = {...}`, the re-exported record/variant
labels are restated but not independently actionable. Suppress dead-type warning
emission for those labels while keeping per-label liveness and linking intact.

Signed-off-by: Cristiano Calcagno <cristianoc@users.noreply.github.com>
Track manifest type paths (not just local type ids) so `type y = M.x = ...` and
other cross-module type equations correctly link label/case liveness.

Extend deadcode tests to cover variants and cross-file record re-exports.

Signed-off-by: Cristiano Calcagno <cristianoc@users.noreply.github.com>
Copy link
Member

@cknitt cknitt left a comment

Choose a reason for hiding this comment

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

Thanks a lot! 🎉

@cknitt cknitt merged commit e900b60 into master Jan 23, 2026
50 of 51 checks passed
@cristianoc cristianoc deleted the reanalyze-type-reexport-manifest branch January 23, 2026 14:22
cknitt pushed a commit that referenced this pull request Jan 26, 2026
* Reanalyze: link type re-export labels

Track manifest type paths on label declarations so re-exported record/variant labels
can be linked to their manifest counterparts during type label dependency wiring.

Adds a regression test for `type y = x = {...}` field liveness.

Signed-off-by: Cristiano Calcagno <cristianoc@users.noreply.github.com>

* Changelog: mention reanalyze type re-export label linking

Signed-off-by: Cristiano Calcagno <cristianoc@users.noreply.github.com>

* Reanalyze: suppress dead warnings on re-exported labels

When a type is re-exported via `type y = x = {...}`, the re-exported record/variant
labels are restated but not independently actionable. Suppress dead-type warning
emission for those labels while keeping per-label liveness and linking intact.

Signed-off-by: Cristiano Calcagno <cristianoc@users.noreply.github.com>

* Reanalyze: link re-export manifests across modules

Track manifest type paths (not just local type ids) so `type y = M.x = ...` and
other cross-module type equations correctly link label/case liveness.

Extend deadcode tests to cover variants and cross-file record re-exports.

Signed-off-by: Cristiano Calcagno <cristianoc@users.noreply.github.com>

---------

Signed-off-by: Cristiano Calcagno <cristianoc@users.noreply.github.com>
# Conflicts:
#	tests/analysis_tests/tests-reanalyze/deadcode/expected/deadcode.txt
cknitt pushed a commit that referenced this pull request Jan 27, 2026
* Reanalyze: link type re-export labels

Track manifest type paths on label declarations so re-exported record/variant labels
can be linked to their manifest counterparts during type label dependency wiring.

Adds a regression test for `type y = x = {...}` field liveness.

Signed-off-by: Cristiano Calcagno <cristianoc@users.noreply.github.com>

* Changelog: mention reanalyze type re-export label linking

Signed-off-by: Cristiano Calcagno <cristianoc@users.noreply.github.com>

* Reanalyze: suppress dead warnings on re-exported labels

When a type is re-exported via `type y = x = {...}`, the re-exported record/variant
labels are restated but not independently actionable. Suppress dead-type warning
emission for those labels while keeping per-label liveness and linking intact.

Signed-off-by: Cristiano Calcagno <cristianoc@users.noreply.github.com>

* Reanalyze: link re-export manifests across modules

Track manifest type paths (not just local type ids) so `type y = M.x = ...` and
other cross-module type equations correctly link label/case liveness.

Extend deadcode tests to cover variants and cross-file record re-exports.

Signed-off-by: Cristiano Calcagno <cristianoc@users.noreply.github.com>

---------

Signed-off-by: Cristiano Calcagno <cristianoc@users.noreply.github.com>
# Conflicts:
#	tests/analysis_tests/tests-reanalyze/deadcode/expected/deadcode.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants

Comments