Skip to content

Record type spread doesn't seem to be supported by sury-ppx #153

@benadamstyles

Description

@benadamstyles

I get the following error message in the compiler when using object type spread and the Sury PPX:

  The module or file  can't be found.
  - If it's a third-party dependency:
    - Did you add it to the "bs-dependencies" or "bs-dev-dependencies" in bsconfig.json?
  - Did you include the file's directory to the "sources" in bsconfig.json?
  
  
  Hint: Did you mean S?

Here's an example of the code that triggers this error: https://rescript-lang.org/try?version=v11.1.4&module=esmodule&code=LYewJgrgNgpgBAWRgFwIZwLxwN4Cg5wACAzgMYAWMwq+cyAngA7zKY60ECWYAXHMcgBOnAHYBzADQd+EYNUH0+IRsk4gRAHgHDxAPikEAvrmO4SFKjQbM6bPAQB0TpGgfIDcYDGLFUY73yogoKo9FpComL6JrhAA

And printed here:

module Meta = {
  @schema
  type t = {
    id: string,
    summary: option<string>,
  }
}

@schema
type t = {
  ...Meta.t,
  messages: array<string>,
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions