Skip to content

Comments

Fix inlay hint file source#1179

Draft
shulhi wants to merge 4 commits intorescript-lang:masterfrom
shulhi:fix-inlay-hint-file-source
Draft

Fix inlay hint file source#1179
shulhi wants to merge 4 commits intorescript-lang:masterfrom
shulhi:fix-inlay-hint-file-source

Conversation

@shulhi
Copy link
Member

@shulhi shulhi commented Feb 22, 2026

Read the file from the buffer instead of disk. See: rescript-lang/rescript#8250

I also added debounce so it doesn't fire on each keystroke.

Compatibilty:
This is considered breaking changes because now inlayHint takes an extra argument (7 arguments instead of 6).

The relevant inlay hint function in analysis also expect 7 arguments.

The only time the extension will break is when the extension (with this fix) is used with analysis binary without the fix.

extension analysis outcome
w/o fix w/o fix status quo (will work)
with fix with fix will work
w/o fix with fix will work because it can handle both 6/7 arguments (default currentFile to None when received with 6 args. See https://github.com/rescript-lang/rescript-vscode/pull/1179/changes#diff-3af5ac9f37422b6630f5e2a41045fa987a4ec2c8c8ec3f73904b08b55b8b1a64R164-R171
with fix w/o fix will break because the analysis binary only expect 6 arguments.

@zth what would be the best way to handle this?

@shulhi shulhi requested review from nojaf and zth and removed request for zth February 22, 2026 23:40
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.

1 participant