rescript-lang / rescript-lang/rescript

Compiler prevents adding attributes in front of {

Open
#7,814 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
OCaml
Stars
7.5k
Forks
485
Avg merge
1d 2h
Merged PRs (30d)
55

Description

The compiler (v11) does not support @s.strict in the following structure:

@schema
type t = @s.strict {
  email: string,
  name: string,
}

This is expected to work at least by some library developers, see original bug report: https://github.com/DZakh/sury/issues/151

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the v11 compiler failure using the @schema type and @s.strict attribute shown in the issue, then read the linked sury bug report for context. Done means the compiler accepts this structure and preserves the expected attribute behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.