rescript-compiler icon indicating copy to clipboard operation
rescript-compiler copied to clipboard

Rewatch: detect changes to config and compiler version

Open cknitt opened this issue 1 year ago • 1 comments

In case the rescript.json or the compiler version changes, rewatch should automatically clean before doing a build.

(Also, if the project was compiled with bsb before, do a clean before the build.)

cknitt avatar May 23 '24 09:05 cknitt

Like bsb does currently:

Different compiler version: clean current repo
Cleaning... 5 files.
Cleaning... 241 files.
Cleaning... 75 files.
Cleaning... 80 files.
...

cknitt avatar May 06 '25 16:05 cknitt

@cknitt any idea what exactly bsb is checking to figure this out?

nojaf avatar Jul 15 '25 10:07 nojaf

This happens here in bsb:

https://github.com/rescript-lang/rescript/blob/c092acd0ff979d1a4b2bbf67f7986dbad8940b6d/compiler/bsb/bsb_ninja_regen.ml#L38-L55

We no longer have this file, so I think we need to cook up some new file to store the version. @jfrolich does anything come to mind, or should we introduce something new?

nojaf avatar Jul 20 '25 17:07 nojaf