janestreet / janestreet/ppx_expect

Syntax error with Reason files and uncaught exceptions

Open
#18 5 comments 0 reactions 0 assignees View on GitHub
enhancement forwarded-to-js-devs help wanted
Dominant language
OCaml
Stars
194
Forks
35
PR merge metrics
No merged PRs in 30d

Description

Using ppx_expect v0.13.0, ppxlib 0.12.0, when exception happens in a test, ppx_expect generates invalid attribute:

```
[@@expect.uncaught_exn {|
.....
|}];
```

In Reason all attributes use single `@` symbol.

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with ppx_expect v0.13.0 and ppxlib 0.12.0 using a Reason test that raises an exception. Search the uncaught_exn generation path and inspect the emitted attribute; done means the generated Reason syntax uses a single @ and no longer produces a syntax error.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.