-
Notifications
You must be signed in to change notification settings - Fork 57
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
Various uncurried fixes #810
Conversation
Might need to turn on uncurried mode explicitly when the printer is called. |
@cristianoc I think this was the issue: 99c0097#diff-e4132b7ea215bee01eb9558296b4c196e3769d5766f09b61dce718ce5b1d8b1cR325 Compiler PR: rescript-lang/rescript#6353 |
@@ -49,10 +49,11 @@ let ident ppf id = pp_print_string ppf (ident_name id) | |||
(* Print a path *) | |||
|
|||
let ident_pervasives = Ident.create_persistent "Pervasives" | |||
let ident_pervasives_u = Ident.create_persistent "PervasivesU" |
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.
This should be backported to the compiler.
let uncurried = | ||
if !Config.uncurried <> Legacy then not uncurried else uncurried | ||
in | ||
let uncurried = Res_uncurried.getDotted ~uncurried !Config.uncurried in |
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.
PR:ed to the compiler here: rescript-lang/rescript#6353
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.
Does that fix the issue?
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.
It fixes the printing issues in this repo, yes. There were dots in lots of places there shouldn't be in uncurried mode before this.
@cristianoc this is ready for review. Should we run all tests in uncurried mode primarily moving forward, or should I revert back to curried mode? What do you think? I personally think it might be too soon to run in uncurried mode and optimize for that as the main case given so few have migrated to it yet, but that we should switch over and test the output then and then. There's the alternative of trying to set up 2 test suites, one for curried and one for uncurried. But I don't know. |
let uncurried = | ||
if !Config.uncurried <> Legacy then not uncurried else uncurried | ||
in | ||
let uncurried = Res_uncurried.getDotted ~uncurried !Config.uncurried in |
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.
Does that fix the issue?
Two suites sounds heavy, unless you feel like having that. |
@cristianoc the test failures are interesting. They're different errors depending on whether it's Linux or Windows, but what they have in common is that "Go To Definition" seems to point at different files depending on platform. This started happening with the later versions of v11 where more things have been ReScriptified. Any ideas? |
Sorry I pushed another commit that muddied up what I commented on. If you want to have a look at the problem I described, you can check these two failed runs: |
This runs the tests in uncurried mode (+ latest beta) and fixes whatever issues surfaced.
The diff is hard to read because I can't get the printer to print uncurried without the dots. @cristianoc any idea? Getting that to work would make this much easier to follow.
Also, ignore
SignatureHelp
because fixes for that is in a separate PR.Closes #772