-
-
Notifications
You must be signed in to change notification settings - Fork 252
Adapt example tests to Rescript11 + uncurried + RescriptCore #735
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
4b584ba
Adapt some pages to ReScript 11 including records and variants
fhammerschmidt 4030e7b
Some better wordings
fhammerschmidt 0aac9bb
Adapt example tests to Rescript11 + uncurried + RescriptCore
fhammerschmidt c4027ca
Change more examples from Belt to RescriptCore
fhammerschmidt 897e8c7
Fix uncurried error
fhammerschmidt c3fb880
Consistent quotes
fhammerschmidt 43b6773
Fix remaining test
fhammerschmidt 9d689e2
Mention RescriptCore in try section
fhammerschmidt f18c15d
Add dummy file
fhammerschmidt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Console.log("I am a dummy file") |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"name": "dummy", | ||
"sources": { | ||
"dir": "dummy", | ||
"subdirs": true | ||
}, | ||
"bs-dependencies": [ | ||
"@rescript/core" | ||
], | ||
"bsc-flags": [ | ||
"-open RescriptCore" | ||
] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
cc @cristianoc is this needed? This isn't pre-compiled into uncurried via
MakeHashableU
?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.
No the compiler does not come with 2 versions of Belt.
Having to mention a
xxxU
function in documentation is pretty much a red flag, in that it instantaneously introduces tech debt.There won't be any
xxxU
functions in future, so this is a strange point in time to document their use.@zth do you have any thoughts about the solution here? The thing is, Belt will beed to be replaced with a library that lives outside the compiler, or in any case alongside RescriptCore. What we are witnessing here is simply that this has not happened yet.
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 mid to long term idea for Belt is to be a niche lib living outside of the compiler. This is explicit documentation for Belt, and Belt will be much less needed as Core "takes over".
I'm not sure I have a point here, more an observation. I think we can break Belt out to its own package as soon as we've shipped v11. I guess that would alleviate this particular issue.
Another observation is that Belt will be much less prevalent in docs and examples now that Core exists and we're moving everything to that. So this might not be such a big problem going forward as we think.
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.
According to @cknitt getting rid of Belt in the compiler is no small feat, but I don't know the full details.
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.
Belt in the compiler can be considered an implementation detail, that can be addressed over time.
I think we can restrict attention to user visible docs for this.
So I guess we can proceed and make a note about next steps in a separate issue.
Uh oh!
There was an error while loading. Please reload this page.
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.
@cristianoc I already started a few attempts to remove Belt from the compiler, but never finished those.
There are two problems:
type result<'a, 'b> = Belt.Result.t<'a, 'b>
).Are you suggesting an approach like the following:
@rescript/belt
.rescript
npm package anymore, having users use the separate package instead.?
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.
Yes something like this sounds like a good approach.
Though I would try to make the compiler's result, not Belt, the source of truth already now.
As otherwise that's going to pop up somewhere, be it hovering in the editor, or some error message.
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.
@cknitt rescript-lang/rescript#6450