reasonml / reasonml/reason

Support conditional compilation / static if

Open
#1,359 14 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

KIND: FEATURE REQUEST Parser
Dominant language
OCaml
Stars
10.3k
Forks
438
PR merge metrics
No merged PRs in 30d

Description

Hey everyone :D
I saw that Bucklescript has support for condition compilation but it's a preprocessor fed into -pp, which means we can't use it in conjuction with Reason (since refmt is also a preprocessor).

How could we support static if statement like Bucklescript does?
It would help the cross platform story a lot in my opinion!

Contributor guide

No contributing guide indexed for this repository

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

No files, tests, or entry points are named. Start by reviewing Reason's preprocessing path and BuckleScript's conditional compilation documentation; done means supporting static if in Reason without conflicting with refmt and enabling the proposed cross-platform use.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.