-
Notifications
You must be signed in to change notification settings - Fork 473
Analysis: resolve @rescript/runtime via environment variable RESCRIPT_RUNTIME #8023
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@mediremi feel free to take a look as well. |
rescript
@rescript/darwin-arm64
@rescript/darwin-x64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/runtime
@rescript/win32-x64
commit: |
mediremi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The added hover test is not affected by the changes you made in analysis/src/Hover.ml. If you revert your changes in analysis/src/Hover.ml and rerun make test-analysis, you'll see that tests/analysis_tests/tests/src/expected/Hover.res.txt is unchanged.
|
Hmm, I don't get it. The same hover command with my local compiler versus the analysis binary in works for me: (base) nojaf@nojaf-mbp test-stdlib % /Users/nojaf/Projects/test-stdlib/node_modules/.pnpm/@rescript+darwin-arm64@12.0.0-rc.4/node_modules/@rescript/darwin-arm64/bin/rescript-editor-analysis.exe debug-dump verbose hover /Users/nojaf/Projects/test-stdlib/src/App.res 11 19 /var/folders/mt/_svhkyhd5cjfcbg6zf6nyzf40000gn/T/rescript_format_file_66362_4 true
null
(base) nojaf@nojaf-mbp test-stdlib % /Users/nojaf/Projects/rescript/_build/default/analysis/bin/main.exe debug-dump verbose hover /Users/nojaf/Projects/test-stdlib/src/App.res 11 19 /var/folders/mt/_svhkyhd5cjfcbg6zf6nyzf40000gn/T/rescript_format_file_66362_4 true
{"contents": {"kind": "markdown", "value": "```rescript\nmodule Stdlib_BigInt: {\n type t = bigint\n let asIntN: (~width: int, bigint) => bigint\n let asUintN: (~width: int, bigint) => bigint\n let fromStringOrThrow: string => bigint\n let fromString: string => option<bigint>\n let fromStringExn: string => bigint\n let fromInt: int => bigint\n let fromFloatOrThrow: float => bigint\n let fromFloat: float => option<bigint>\n let toString: (bigint, ~radix: int=?) => string\n let toStringWithRadix: (bigint, ~radix: int) => string\n let toLocaleString: bigint => string\n let toFloat: bigint => float\n let toInt: bigint => int\n let add: (bigint, bigint) => bigint\n let sub: (bigint, bigint) => bigint\n let mul: (bigint, bigint) => bigint\n let div: (bigint, bigint) => bigint\n let mod: (bigint, bigint) => bigint\n let bitwiseAnd: (bigint, bigint) => bigint\n let bitwiseOr: (bigint, bigint) => bigint\n let bitwiseXor: (bigint, bigint) => bigint\n let bitwiseNot: bigint => bigint\n let shiftLeft: (bigint, bigint) => bigint\n let shiftRight: (bigint, bigint) => bigint\n let ignore: bigint => unit\n let land: (bigint, bigint) => bigint\n let lor: (bigint, bigint) => bigint\n let lxor: (bigint, bigint) => bigint\n let lnot: bigint => bigint\n let lsl: (bigint, bigint) => bigint\n let asr: (bigint, bigint) => bigint\n}\n```"}}I don't get why the release version just outputs |
analysis/src/BuildSystem.ml
Outdated
| let ( /+ ) = Filename.concat | ||
|
|
||
| (* | ||
| Here is the real problem: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zth I would use an environment variable here to avoid breaking all the analysis commands.
Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's fine, we use env variables for other stuff as well. So go for it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, ready for review.
|
Can't easily add a test for this here. |
Fixes the hover in rescript-lang/rescript-vscode#1144
@zth can you please review, this is what the machine came up with.
It worked on my machine, but I don't know this part of the codebase.