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

`build -w` (usually) constantly recompiles with a strange file name

Open byteit101 opened this issue 3 years ago • 8 comments

Using latest npm release: 9.1.4 OS: Debian 11 amd64

Sometimes (usually) a build -w will recompile and then immediately recompile again ad infiniteum. This typically only affects the 2nd refresh and later, but sometimes it doesn't recompile constantly for later ones. Both error results and successful compilations do this usually.

The only thing of note is I'm using reason syntax with a file lib/Util.re, and yet the output shows:

>>>> Start compiling 
rescript: [0/1] lib/Util.cmj

byteit101 avatar Jul 04 '22 15:07 byteit101

Can you try with the compiler from master (get it from CI which packages it on every commit). See if still there.

cristianoc avatar Jul 04 '22 15:07 cristianoc

I downloaded and extracted https://github.com/rescript-lang/rescript-compiler/suites/7210131187/artifacts/288598519 and unpacked the main tgz over my existing install and this still happens

byteit101 avatar Jul 04 '22 16:07 byteit101

Great thanks. Feel free to submit a repro for that. Is this linux64?

cristianoc avatar Jul 04 '22 16:07 cristianoc

Yes, This is linux64.

Repro: Use any file. The hello-reason files do this, as do more complex ones. The first 1-3 recompile are usually "normal". I've not encountered a file or edit that doesn't do this after 3 recompiles

byteit101 avatar Jul 05 '22 02:07 byteit101

So I believe we don't have linux64 binaries shipped, so there are many unknowns to begin with. What's needed, I think, is some contributor with a linux64 machine who can begin try to debug this, maybe ask some questions, and make PRs.

cristianoc avatar Jul 05 '22 02:07 cristianoc

Also, if you convert the .re file to .res then it will narrow down the set of possible things that could cause this. E.g. we would know that the old vendored reason parser binary, which is there only for backwards compatibility, is not relevant to the issue.

cristianoc avatar Jul 05 '22 02:07 cristianoc

(the output Util.cmj is fine and expected)

cristianoc avatar Jul 05 '22 02:07 cristianoc

I gave up on this when I couldn't figure out how to convert re to res, but it may be due to compiling from lib to lib?

byteit101 avatar Sep 13 '22 00:09 byteit101