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

Image may be NSFW.
Clik here to view.

[ANN] ReScript 12 beta release / call for testing

I’ve been glad to early. The language server (v 1.63.0-next-e18a3cd.0) doesn’t refresh errors in my code. When I have an error (neovim shows the error correctly) and I fix it, it still shows me the...

View Article


Image may be NSFW.
Clik here to view.

Proposing new syntax for zero-cost unwrapping options/results

zth: Continuing on the above, we actually wouldn’t need the ? either… Most people probably don’t know, but let Ok(user) = ... is already perfectly valid syntax today. It’s just that it’ll yield a...

View Article


Image may be NSFW.
Clik here to view.

[ANN] ReScript 12 beta release / call for testing

xfcw: rescript-vitest-plugin Is that problem already tracked somewhere? If not, can you provide a sample to reproduce? We’ve been making some Rewatch fixes this week.

View Article

Image may be NSFW.
Clik here to view.

[ANN] ReScript 12 beta release / call for testing

dkirchhof: Edit 3: Just for the sake of completeness: Does Edit 3 fix the problem? When I removed chokidar, I did do a quick google if neovim is capable of watching files, and the internet said so. We...

View Article

Image may be NSFW.
Clik here to view.

[ANN] ReScript 12 beta release / call for testing

Yes, edit 3 fixes the problem Everything looks fine now. The snippet should also be included in the lsp-config repo of neovim. Maybe I will create a pr there. Where would you add the snippet? In the...

View Article


[ANN] ReScript 12 beta release / call for testing

Yes, with VS Code you have this out of the box. I don’t know what the best location is to add the snippet. I suppose it is where neovim users would find some info. I didn’t find anything on the...

View Article

[ANN] ReScript 12 beta release / call for testing

yeah, just using vite-plugin-rescript (sorry, i misnamed it previously) gives this: [@jihchi/vite-plugin-rescript] error: unexpected argument '-w' found tip: to pass '-w' as a value, use '-- -w'...

View Article

How to use @taggedTemplate generate js with tagged template literals

@tsnobip Thank for you reply, I’m trying to solve this problem with other way these days, but it doesn’t work well First I patch the code (compile to PostgresqlPatch.js) %%raw(` import Postgres from...

View Article


How to use @taggedTemplate generate js with tagged template literals

what do you mean by object functions? In the meanwhile, the easiest solution by far is just to initialize your sql function in raw js and bind to it: %%raw(`import Postgres from "postgres" let sql =...

View Article


Image may be NSFW.
Clik here to view.

[ANN] ReScript 12 beta release / call for testing

I created a PR in the nvim lspconfig repo. Now I just added the snippet to their readme. After releasing the new version of rescript / the language server, the config should be included in their...

View Article

"type":"dev" in "sources"

Hello, I’m working on solving an issue with Rewatch and “sources” with “type”:“dev”. See docs In short, only files listed as "type":"dev" can access modules listed in "bs-dev-dependencies". This is...

View Article

Image may be NSFW.
Clik here to view.

[ANN] ReScript 12 beta release / call for testing

beta 2 got released yesterday! GitHub Release 12.0.0-beta.2 · rescript-lang/rescript 💥 Breaking Change Rust implementation of the rescript format command. Command line options changed from -all,...

View Article

"type":"dev" in "sources"

We’re using this to organize MSW fixtures or test-specific implementations of things, and we keep all the testing specific bindings in “bs-dev-dependencies” "sources": [ { "dir": "src/", "subdirs":...

View Article


[ANN] ReScript 12 beta release / call for testing

Exciting! I greatly appreciate the work the core team is doing here. Something that I’ve been curious about for a while now is why the language server basically dies when there is compiler error as it...

View Article

[ANN] ReScript 12 beta release / call for testing

Could you expand on what you mean? Are you referring to that you don’t get hovers/completions etc under errors?

View Article


Remove non-Js aliases for certain types?

this is a general reflection on rescript that hit me because we implemented a custom Dict type. there’s a number of types in the rescript stdlib, e.g. Result, Option, JSON etc. these are...

View Article

Can we have a proposal for ref syntax?

let x = ref(...) is bad and the .contents syntax is horrendous. it’s confusing and makes no sense to someone who doesn’t understand the internals of how js deals with references and in-memory storage...

View Article


How does @inline actually work?

am i supposed to put it in .res or .ressi files, or both? putting it in X.res makes function calls inside X.res inlined (can tell in X.res.js), but other modules using X do not seem to inline the...

View Article

Image may be NSFW.
Clik here to view.

Can we have a proposal for ref syntax?

The naming and pattern comes from ML languages like Ocaml. https://cs3110.github.io/textbook/chapters/mut/refs.html This is also how the useRef hook in react works. react.dev useRef – React The...

View Article

How does @inline actually work?

You’re supposed to put @inline annotations in both .res and .resi files, if you use an interface file and don’t add the annotation there too, the compiler simply can’t know the implementation required...

View Article
Browsing all 2592 articles
Browse latest View live