Rescript’s new build system issues a warning: The field ‘reanalyze’ found in the package config of ‘kaiko-survey-tool’ is not supported by ReScript 12’s new build system.
But running the legacy build system and then reanalyze -dce still prints warnings for suppressed directories:
...
Warning Dead Type
.../test/ServerSyncPipeline_test.res:112:21-33
state.value is a record label never used to read a value
<-- line 112
type state = {@dead("state.value") value: string}
$ rescript --version
rescript 12.1.0
$ rescript
[1/3] 🧹 Cleaned previous build due to compiler update
[1/3] 🧹 Cleaned 0/0 in 0.26s
[2/3] 🧱 Parsed 896 source files in 1.15s
[3/3] 🤺 Compiled 896 modules in 6.31s
The field 'reanalyze' found in the package config of 'kaiko-survey-tool' is not supported by ReScript 12's new build system.
✨ Finished Compilation in 7.74s
Warning Dead Type
/home/manu/src/kaiko/frontend-reanalyze/src/libs/webapi/MediaTrackConstraints.res:20:3-32
t.groupId is a record label never used to read a value
This is merely the bindings of the type; so I rather leave it complete, so that the application could use it if needed.
Maybe you need to use rescript-tools as that is also what is used in the extension.
cd <monorepo-root>
<monorepo>/node_modules/.../rescript-tools.exe reanalyze -dce
Edit: Just successfully called it in a monorepo with
yarn rescript-tools reanalyze -dce
It ships with the v12 compiler btw. no need to install anything
Edit2: okay something is off. I think this is a bug. It only adheres to the suppressions when I don’t append -dce, but do yarn rescript-tools reanalyze directly.