rescript-association / genType

Auto generation of idiomatic bindings between Reason and JavaScript: either vanilla or typed with TypeScript/FlowType.
https://rescript-lang.org/docs/gentype/latest/introduction
MIT License
758 stars 44 forks source link

Unused named function paramater causes `rescript build -w` to enter an infinite loop #584

Closed tom-sherman closed 10 months ago

tom-sherman commented 2 years ago

The following module causes ReScript's watch mode to enter an infinite loop

@genType
let y = 5

let x = (a, ~b) => a

Repro:

  1. Checkout https://github.com/tom-sherman/rescript-watch-infinite-loop-bug
  2. npm i
  3. npm start

Removing or using the unused param stops the loop.

a-c-sreedhar-reddy commented 2 years ago

Hey @tom-sherman I tried your repo and watch mode did not enter an infinite loop.

tom-sherman commented 2 years ago

@a-c-sreedhar-reddy what OS? I'm on macOS 11.6

a-c-sreedhar-reddy commented 2 years ago

yeah I am also on macOS 11.6

tom-sherman commented 2 years ago

https://user-images.githubusercontent.com/9257001/147350957-f5aaaacd-3a70-4770-8173-987042677a44.mov

Very strange...

Node 16.9.1, npm 7.21.1

a-c-sreedhar-reddy commented 2 years ago

Node v14.18.0 npm 6.14.15

cristianoc commented 2 years ago

Caused by an interaction of generatedFileExtension": ".gen.ts" and the compilers watcher. There was an issue on this already, which has moved to the compiler repo.

ryyppy commented 10 months ago

This repository is being archived. If you feel like the issue still relevant, please re-create it in the compiler repo. Thanks!