Skip to content

Compiler@master sometimes reports module name instead of source file as error location #5635

Closed
@Minnozz

Description

@Minnozz

Context: trying out JSX v4

rescript: [59/64] src/SpotDetails-Stallingsnet.cmj
FAILED: src/SpotDetails-Stallingsnet.cmj

  We've found a bug for you!
  SpotDetails

  This has type:
    props<option<Stallingsnet.Prelude.occupationDetailsSnapshot>> => React.element
  Somewhere wanted:
    React.component<
  ({..
    "maybeSnapshot": option<Stallingsnet.Prelude.occupationDetailsSnapshot>,
  } as 'a),
>
      (defined as 'a => Jsx.element)
  
  The incompatible parts:
    props<option<Stallingsnet.Prelude.occupationDetailsSnapshot>> vs 'a

rescript: [60/64] src/Statistics-Stallingsnet.cmj
FAILED: cannot make progress due to previous errors.

The SpotDetails below We've found a bug for you! should be /absolute/path/to/Source.res:line:char-char instead of a module name.

The VSCode extension tries to open a nonexistent directory when you click the Problem:
Screenshot from 2022-09-05 22-00-20
Screenshot from 2022-09-05 22-02-39

This does not happen with all errors; some report a correct location.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions