[ANN] ReScript 9.1.4 release

Hi all,

ReScript 9.1.4 is released, this is a minor release, it ships several bug fixes and has some
low risk utility features, changes are listed as below:

Build

  • #5167 add dump subcommand so that
rescript dump path/to/file.cmi

Will dump the interface to a readable output, note this is integrated into the build system that the build will try to build it if it is not already there

  • clean will clean its dependency by default.
    subcommand clean -with-deps, -with-deps is not needed any more
  • hide most bsc options, officially supported bsc flags (this is not a breaking change, those internal options are still there but subject to removal in the future)
Usage: bsc <options> <files>
Options are:
Options:
  -w                        <list>  Enable or disable warnings according to <list>:
                            +<spec>   enable warnings in <spec>
                            -<spec>   disable warnings in <spec>
                            @<spec>   enable warnings in <spec> and treat them as errors
                            <spec> can be:
                            <num>             a single warning number
                            <num1>..<num2>    a range of consecutive warning numbers
                            default setting is +a-4-9-20-40-41-42-50-61-102
  -bs-g                     Debug mode
  -bs-D                     Define conditional variable e.g, -D DEBUG=true
  -e                        (experimental) set the string to be evaluated in ReScript syntax
  -v                        Print compiler version and location of standard library and exit
  -version                  Print version and exit
  -warn-help                Show description of warning numbers
  -warn-error               <list>  Enable or disable error status for warnings according
                            to <list>.  See option -w for the syntax of <list>.
                            Default setting is -a+5+6+101+109

Syntax

  • #432 bad error message for unterminated quote

Compiler

  • #5165 bad error message for uncurried type mistmatch
  • #5169 fix a code gen issue with user defined None
12 Likes

On my CI I need to do rescript build -with-deps to build successfully. Can at some point this also be reduced to rescript build?

2 Likes

Agreed, I realized this today too when having build issues, -with-deps should be the default indeed and a -without-deps option for cases where we don’t want it.

That’s the expected behavior, do you have a small reproducible repo

I don’t really know why it doesn’t work on a CI. But on our github actions and vercel (two different CI’s) it’s necessary otherwise it doesn’t build correctly. If I blow away my node_modules and lib directory on my computer rescript build works fine.

i guess it’s because CI messed up with time stamps

Ah yes I can imagine it has to do with caching!

This happened for me so often that I just always do a -with-deps build. My issue is any yarn install will wipe over compiled Rescript code in node-modules.

1 Like

I was a little puzzled why dependabot was not trying to upgrade from 9.0.2 to 9.1.x in my repo. I realize now that dependabot doesn’t know that the package has been renamed. This might be indirectly slowing upgrades.

Indeed this is an issue, do you know any way to improve the situation?

I don’t have any great ideas. If you published rescript package for 9.0.x, I would modify my project to reference rescript instead of bs-platform. I don’t know if it’s worth diverting your limited time to do that.

Update: dependabot rejected this as a feature that they don’t want to inplement. Interestingly, renovatebot has been working on this feature for a while, and it may be merged in a while: feat: replace deprecated dependencies with their replacements by JamieMagee · Pull Request #5558 · renovatebot/renovate · GitHub.