Skip to content

Latest commit

 

History

History
83 lines (62 loc) · 2.25 KB

CONTRIBUTING.md

File metadata and controls

83 lines (62 loc) · 2.25 KB

Contributing

Requesting a feature

If you would like to request a feature, please, create an issue.

Reporting a bug

If you want to report a bug, there are few options:

  1. You can contribute a minimal falling test with your use case. It would make things easier for us to proceed with the fix.
  2. You can contribute a minimal falling test and a fix. Even better :)
  3. If you don't feel like contributing a test, please, create an issue with as many details as possible and we will try to figure out something.

Contributing a test

There might be 2 types of issues:

  1. Compile-time error.
  2. Runtime error (related to logic or just runtime crashes).

If you are facing the former, add PPX test in ppx/test.
If you are facing the latter, add integration test in specs.

See the corresponding README for details.

It would be great if you could reduce your test case to minimal size. I.e. instead of copy/pasting code from your app as is, try to remove unrelated parts and keep only what's related to the error.

Technical details

Repository structure

- docs/       # Documentation
- examples/   # Examples
- lib/        # ReScript library
  - src/      # ReScript library sources
- ppx/        # PPX
  - bin/      # PPX binary
  - lib/      # PPX implementation
  - sandbox/  # PPX sandbox for debugging
  - test/     # PPX tests
- specs/      # Integration tests

Setup

This repo uses yarn workspaces to manage frontend related dependencies and esy to manage PPX related dependencies (optionally, you can use nix shell instead of esy for development).

Install Yarn dependencies:

yarn install

Build ReScript library:

# In lib/ folder
yarn rescript build -with-deps

Build public interface of the ReScript lib:

# Apparently `rescript` doesn't have `bsb -install` counterpart
# So you need to build any app in this workspace that relies on `re-formality`

# E.g. in ppx/sandbox folder
yarn rescript build -with-deps

Esy flow Install Esy dependencies:

esy install

Build PPX:

esy build

Nix/Devbox flow Build PPX:

dune build