[ANN] `@rescript/language-server` and `@rescript/tools` released
Great work @KidkArolis!!! About the second problem: the syntax partially loses highlighting as you're typing Does the highlights come from the tree-sitter or the LSP (semantic tokens)?
View Article[ANN] `@rescript/language-server` and `@rescript/tools` released
Highlighting comes from the tree-sitter I believe. To be honest - it’s all working pretty well! LSP and the highlighting. LSP does seem a bit slow, but I haven’t done much ReScript in VSCode to be...
View ArticleAnyone using graphql-ppx and rescript-apollo-client with 11?
We are still migrating to 11 without uncurried first (almost there). We were able to compile it though, so with uncurried it shouldn’t be a problem. Did you add graphql-ppx as a dependency as well (it...
View Article[ANN] `@rescript/language-server` and `@rescript/tools` released
Very cool! I tried it and it seems to work partly: I need to manually select the language before syntax highlighting shows up The LSP works on a single file, but any file I open next it doesn’t work...
View ArticlePurescript/Typescript To Rescript
Hi Team, I have some Purescript and Typescript files, I wanted to generate interfaces for them in rescript. can anyone tell me the possible approaches to this (any approach PS->RES or TS → RES)?...
View ArticlePurescript/Typescript To Rescript
For TypeScript, there is now ts2ocaml/docs/rescript.md at main · ocsigen/ts2ocaml · GitHub. Not sure if anything like it exists for PureScript.
View Article[ANN] `@rescript/language-server` and `@rescript/tools` released
How are you debugging this? I can see the Zed log, but not the lsp log.
View Article[ANN] `@rescript/language-server` and `@rescript/tools` released
You can make it open res files in ReScript lang by adding this to your config, afaik it’s a limitation in Zed now, extensions don’t get to configure this from what I’ve seen so far: "file_types": {...
View Article[ANN] `@rescript/language-server` and `@rescript/tools` released
@zth sorry for hijacking this thread Shall I create a new thread to continue the Zed chatter?
View Article[ANN] `@rescript/language-server` and `@rescript/tools` released
I don’t mind, but a dedicated thread might be good for visibility, so go for it.
View Article[Article]: Tired of Typescript? Check out ReScript!
DEV Community Tired of Typescript? Check out ReScript! If you've spent any amount of time developing with JavaScript you have probably found it difficult to... I’ve been slowly working on this for a...
View Article[ANN] ReScript v11.1 is out!
Today we released ReScript v11.1.0! It builds upon the foundation laid by ReScript 11.0 earlier this year and comes with a host of exciting additions. Beside the usual bug fixes there are the...
View ArticleSpice syntax for variants with argument
Hello all, I’m trying to migrate from decco to ppx-spice and I’m wondering how to migrate the following type: type gameType = | StandAlone | Master(string) | Slave(string) Can anyone help me? Thanks!...
View ArticleMinimum cut code relocation?
mouton: The result is often a function where the input or output types strongly reference another module. Isn’t this also an advantage? I have one philosophy here. Similarity of declaration is...
View ArticleDomain modeling in Rescript - Resources, Patterns?
I did a quick write up on using Variant types for business logic: Using variant types in ReScript to represent business logic - DEV Community It’s based on the domain driven design book/talk by Scott...
View ArticleSpice syntax for variants with argument
Okay so I understand from docs/GUIDE.md in https://www.npmjs.com/package/@greenlabs/ppx-spice/v/0.1.15?activeTab=code that I can use: // generates the functions gameId_encode() and gameId_decode()...
View ArticleSpice syntax for variants with argument
I am currently on: "@greenlabs/ppx-spice": "^0.1.15", "@rescript/react": "^0.11.0", "react": "^18.2.0", "react-client": "^1.0.1", "react-dom": "^18.2.0" "rescript": "10.1",
View ArticleSpice syntax for variants with argument
What’s the ppx-flags field in the bsconfg.json?
View ArticleDomain modeling in Rescript - Resources, Patterns?
Check this out for DDD practices with event sourcing in a ReScript codebase Still going strong - but how do I become a guru? I don’t know if this is an off-topic answer. It may be far from how to...
View ArticleOh no, we're toast because of PPX usage
Okay, in truth that subject was clickbait. We’re not toast. But we do have a potential huge load of work in front of us. The Problem Day One has 105k lines of Rescript code that runs its backend that...
View ArticleOh no, we're toast because of PPX usage
I really hope there’s a straightforward answer to this.
View ArticleSpice syntax for variants with argument
It was set to this: "ppx-flags": [ ["@greenlabs/ppx-spice/ppx", "-uncurried"] ], Removing the “-uncurried” option seems to get me further Thanks for pointing me in the right direction!
View ArticleShim alternative for genType RescriptCore types
I realize now that previously to resolve this we would use shims (it’s been a while). But seeing as how those are deprecated now (TypeScript | ReScript Language Manual) is there a suggested alternative?
View ArticleRescript bindings for Graphql Codegen
I’ve now made an (admittedly simple) example repository, which uses some additional tweaks I made to bind to and use @apollo/client, along with updating the documentation with some extra usage details!
View ArticleOh no, we're toast because of PPX usage
Wouldn’t it be much easier to just search and replace @decco annotations to replace them with ppx that are still supported like spice or rescript schema?
View ArticleOh no, we're toast because of PPX usage
Several options here. OTOH just like @tsnobip says, migrating to Spice might be an option? GitHub - green-labs/ppx_spice: ReScript PPX which generates the JSON (de)serializers Anyway, bear with me...
View ArticleShim alternative for genType RescriptCore types
There’s quite some work happening in the background to change how genType works, to remove any runtime from it, but in the meantime I think you’ll still have to use shims. It’s just weird that it...
View ArticleOh no, we're toast because of PPX usage
We recently moved to ppx-spice from decco in a 500kloc codebase, and it was a pretty good migration! (it’s mostly compatible)
View ArticleOh no, we're toast because of PPX usage
Thank you so much, everyone, for your answers! It was very helpful to discover rescript-schema as an example of an updated PPX project that uses dune directly instead of esy. I’m currently in the...
View ArticleOh no, we're toast because of PPX usage
Hey @zth! I’m making a ton of progress on updating Decco. The challenge I’m facing now is that the transformations it does seem to produce a curried function: Interestingly, the function produced here...
View ArticleShim alternative for genType RescriptCore types
Thanks for taking the time to respond. It looks like per the docs linked above shims have been deprecated and no longer work. I’m using 11.1 and here’s my config: { "name": "app", "sources": [ {...
View ArticleOh no, we're toast because of PPX usage
I did an experiment by writing out an uncurried function in Reason, then using refmt to convert it to ocaml. The resulting code uses the [@u ] decorator in front of the function. I’m guessing then we...
View ArticleQuick migration guide to uncurried mode for PPX maintainers?
Are @res.arity and @res.uapp documented anywhere?
View ArticleShim alternative for genType RescriptCore types
This could definitely a bug, the best would be to come up with a simple repro repo and open an issue. Given how widespread is the use of react for rescript users, it’s weird you’re the only one...
View ArticleShim alternative for genType RescriptCore types
I just tested this out in project using the latest versions of rescript and rescript-react and I wasn’t able to reproduce. Here’s the output I have from the button component you shared: /* TypeScript...
View ArticleShim alternative for genType RescriptCore types
I’ve cleaned multiple times. The issue is when using genType on types that require ReScriptCore modules. I believe you couldn’t reproduce b/c your code doesn’t use any of these. I’ll fire up a repro...
View ArticleShim alternative for genType RescriptCore types
Here’s a new repo with the issue: GitHub - painedpineapple/gentype-rescriptcore-bug-repro
View ArticleQuick migration guide to uncurried mode for PPX maintainers?
I see that they’re in the Rescript compiler source code. I know the purpose of the @res.arity decorator, to tell the compiler what we expect the arity of the function to be, but I don’t know the...
View Article[ANN] ReScript v11.1 is out!
Wohooo ! This is awesome! Does anyone know how to update the default vite set up to support preact instead of react? Example repo would be greatly appreciated!
View ArticleQuick migration guide to uncurried mode for PPX maintainers?
I am also converting graphql-ppx right now, and I used some of the examples. I applied the attributes to the function declaration and the application where relevant and it seems to pass tests. I still...
View ArticleQuick migration guide to uncurried mode for PPX maintainers?
mrmurphy: @alex.fedoseev the examples you wrote above are in Rescript, but that’s not what your PPX actually does under the hood, right? It seems to me like the PPX runs on the OCaml AST level, after...
View Article[ANN] ReScript v11.1 is out!
This may help you, just turn off uncurried mode. ReScript Documentation Build System Configuration | ReScript Language Manual Details about the configuration of the ReScript build system (rescript.json)
View Article
More Pages to Explore .....