How to upgrade to v12 in monorepo?
I figured that when I run npm exec -- rescript build from the root, it uses v11 for whatever reason. I’m going to clean this mess up so the repo only has v12 and report back on what’s going on when I...
View ArticleHow to upgrade to v12 in monorepo?
I tried to update rescript-dnd to v12, but facing the same issues with @rescript/runtime and Pervasives. Here is the branch: Update to rescript@12 by alex35mil · Pull Request #36 ·...
View ArticleHow to upgrade to v12 in monorepo?
And btw, rescript legacy build doesn’t work either. With @rescript/runtime as a dependency in rescript.json: ❯ yarn run rescript legacy build yarn run v1.22.15 $...
View ArticleConverting the array of values into the record
Hello! I am making a ledger app for myself, and am puzzled with finding the proper transformation after lexer and parser steps into the app logic. I provide the part of text / types which are relevant...
View ArticleConverting the array of values into the record
I would create default records and reduce the array: let defaultSettings = { startDate: "2025-08-24", untilDate: "2025-08-25", defaultCurrency: Currency("EUR"), rates: Map.make(), } let defaultLedger...
View ArticleConverting the array of values into the record
Thanks! I didn’t highlight this properly in my post - I want to check that all options are provided in the ledger file. But this validation should be done after the parsing phase to separate concerns....
View ArticleConverting the array of values into the record
Then you should probably reduce to option<t>: let make: array<ParserResult.t> => option<t> = lines => lines->Array.reduce(None, (ledger, parserResult) =>...
View ArticleConverting the array of values into the record
if you want the validation to be in a subsequent stage, making all the record field optional would make sense then, wouldn’t it? You’d then have a “validated” ledger settings record that you could...
View ArticleConverting the array of values into the record
The more I think about it, the more it makes sense!
View ArticleProposing new syntax for zero-cost unwrapping options/results
This would be nice addition to ReScript! Probably I’m late to the party, but here’s the shower thought. The proposed syntax is a little bit inconsistent with promises if we look at promises, options,...
View ArticleProposing new syntax for zero-cost unwrapping options/results
I played with this last week. Some feedback: This should also work for Null.t and Nullable.t. It would be more ergonomic if we could mix various types. For example: let updateH2Color2 = () => {...
View ArticleProposing new syntax for zero-cost unwrapping options/results
I like your ideas. I’m already using v12 with let-unwrap in production, loving it
View ArticleHow to upgrade to v12 in monorepo?
Could you do me a favor and try this script: gist.github.com/nojaf/f3c26f2354b1609366bb51c59bfed20e Does it find the correct @rescript/runtime folder in a reasonable time?
View ArticleHow to upgrade to v12 in monorepo?
@nojaf I tried to use this script. It finds the package if I run it from the root: ❯ node find.mjs . [ './node_modules' ] [ './node_modules/@rescript/runtime' ] Script took 4.649ms But it doesn’t do...
View ArticleHow to upgrade to v12 in monorepo?
Thanks, this is only relevant for IDE tooling and when running from the root. For compiling you can try out 12.0.0-beta.11
View ArticleProposing new syntax for zero-cost unwrapping options/results
You can btw. now test this feature in the ReScript playground as well: ReScript Documentation ReScript Playground Try ReScript in the browser Toggle on/off in settings under the new “Experimental...
View ArticleProposing new syntax for zero-cost unwrapping options/results
i’m already using this feature in production, absolutely loving it, best thing introduced in rescript since async-await
View ArticleProposing new syntax for zero-cost unwrapping options/results
Do you have any examples of how you’re typically using it? Before/after code? Might serve as great inspiration.
View ArticleProposing new syntax for zero-cost unwrapping options/results
Or as a more practical example for the blog post I want to write about it
View Article[ANN] `@rescript/language-server` and `@rescript/tools` released
(post deleted by author)
View Article