Quantcast
Channel: ReScript Forum - Latest posts
Browsing all 2592 articles
Browse latest View live

Proposing new syntax for zero-cost unwrapping options/results

link: [rfc] feature to facilitate exception-free code · Issue #7754 · rescript-lang/rescript · GitHub

View Article


Monorepo issues with parallel builds of @rescript/core files

Hello everyone ! I have a monorepo for tilia and @tilia/react and both these projects build @rescript/core files. My issue is that building these two projects in parallel using pnpm leads to this...

View Article


Monorepo issues with parallel builds of @rescript/core files

Are you using rewatch for this?

View Article

Monorepo issues with parallel builds of @rescript/core files

No, I am still using ReScript v11 and haven’t setup rewatch. I fixed the issue by creating a prebuild step in the root package.json to run rescript in one of the packages. This compiles @rescript/core...

View Article

Monorepo issues with parallel builds of @rescript/core files

Okay, might be worth revisiting this once you can upgrade to v12. This use-case should be covered by it.

View Article


Generate ".resi" file from ".res"?

I added this to the issue too, but I was able to create an elisp command that can do this using the rescript-lsp mode. I submitted a PR to the rescript emacs mode to ad this. (defun...

View Article

Proposing new syntax for zero-cost unwrapping options/results

not sure it’s been addressed in this thread, however: what if there are, say two different errors, that can occur: let? r = myFunc() let’s say I can handle and recover ErrorA but not ErrorB? in case...

View Article

Proposing new syntax for zero-cost unwrapping options/results

This proposal is only about continuing on the happy path. So this wouldn’t be valid: let? r = myFunc() It’d need to be this: let? Ok(r) = myFunc() Which means any Error is propagated, and forced to...

View Article


Stuck on an old ReScript version? Look here!

Are you stuck on an older ReScript version than v11, and want to upgrade? We know a couple of the latest releases have been massive with lots of changes. It’s a hump to get over for sure, and we’re...

View Article


Proposing new syntax for zero-cost unwrapping options/results

To be fair, if reconnectAndGetConn returns a compatible error type, this would presumably allow us to try to recover, right? let? Ok(r) = switch getConn() { | Ok(x) => Ok(x) | Error(ErrorA) =>...

View Article

Proposing new syntax for zero-cost unwrapping options/results

Good point, that’d definitely work.

View Article

Stuck on an old ReScript version? Look here!

At Rohea, we have a large and mature ReScript codebase, with nearly 1000 files (not including interfaces). However, we still have hundreds of legacy JS files using flow types in customer specific...

View Article

Current goal of genType with regard to type safety

I’m thinking about trying to fix this issue, but first I need to be sure I’m not missing something. For people who see this, which of these applies to your rescript 11 codebase? Or is the situation...

View Article


I'm looking into using ast-grep fo linting ReScript. What rules should I...

I’d love to help get this over the line, though it seems it’s kind of stalled?

View Article

I'm looking into using ast-grep fo linting ReScript. What rules should I...

I was able to get ast-grep working, but not in a way that was portable. If you install it into your project and set up rescript tree sitter you can write linting rules.

View Article


I'm looking into using ast-grep fo linting ReScript. What rules should I...

Nice, thanks. Yeah I see that ast-grep’s dynamic library binaries make this quite unpleasant to set up through npm. So close yet so far!

View Article

I'm looking into using ast-grep fo linting ReScript. What rules should I...

There is @ast-grep/cli npm package, so I think the only obstacle to a portable linter is the rescript grammar DLL/SO file, right? I’m sure we could compile one for each platform, as part of the...

View Article


I'm looking into using ast-grep fo linting ReScript. What rules should I...

The sgconfig.yml handles platform-specific parsers straightforwardly: customLanguages: rescript: libraryPath: # paths to dynamic library aarch64-apple-darwin: ./parsers/mac.so...

View Article

I'm looking into using ast-grep fo linting ReScript. What rules should I...

Ast-grep has a good vscode plugin, and writing rules is fairly easy. The ones I had setup are: no-console, this is a good one because I forget. No Js., because it made it easier to migrate a project....

View Article

Image may be NSFW.
Clik here to view.

ANN vitest-bdd: ReScript testing with vitest (and source maps !)

Hi there ! vitest-bdd A testing solution based on vitest that plays nice with ReScript. I was finally annoyed at not having source maps and a simple testing solution for ReScript. This plugin was...

View Article
Browsing all 2592 articles
Browse latest View live