Skip to content

rescript -warn-error does not work correctly on Linux #6868

Closed
@cknitt

Description

@cknitt

For some reason, I can only reproduce this problem on Linux.

To reproduce, follow these steps (e.g. in a Docker container with docker run --rm -it node:20 bash):

# Get an example ReScript project, using rescript-core here.
git clone https://github.com/rescript-association/rescript-core.git
cd rescript-core

# Make sure a current ReScript version (11.1+) that has -warn-error is used
npm install rescript

# Create a source file with warning +32 (unused value)
echo "let unused = 1; let unused = 2" >src/Repro.res

# First build (warning, but no error -> ok)
npx rescript build

# Second build (warning as error -> ok)
npx rescript build -warn-error +32

# Third build (warning as error -> WHY???)
npx rescript build

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions