Skip to content

Fix loss of LOC during AST0 translation#8350

Merged
fhammerschmidt merged 4 commits intorescript-lang:masterfrom
fhammerschmidt:fix-missing-locations-through-ast0-conversion
Apr 18, 2026
Merged

Fix loss of LOC during AST0 translation#8350
fhammerschmidt merged 4 commits intorescript-lang:masterfrom
fhammerschmidt:fix-missing-locations-through-ast0-conversion

Conversation

@fhammerschmidt
Copy link
Copy Markdown
Member

@fhammerschmidt fhammerschmidt commented Apr 17, 2026

This was a bug that I encountered very often which was I think due to using rescript-schema/Sury's ppx. Sometimes the correct LOC were not reported, instead I got 0, 0.

Introduced a new internal compiler flag to be able to test it better as well.

Copy link
Copy Markdown
Member

@zth zth left a comment

Choose a reason for hiding this comment

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

Amazing!

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 18, 2026

Open in StackBlitz

rescript

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

@rescript/darwin-arm64

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

@rescript/darwin-x64

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

@rescript/linux-arm64

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

@rescript/linux-x64

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

@rescript/runtime

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

@rescript/win32-x64

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

commit: 640e497

@fhammerschmidt fhammerschmidt merged commit 23fc6cc into rescript-lang:master Apr 18, 2026
26 checks passed
@fhammerschmidt fhammerschmidt deleted the fix-missing-locations-through-ast0-conversion branch April 18, 2026 07:44
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