Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message when initial migration fails #553

Open
NathanReb opened this issue Jan 13, 2025 · 0 comments
Open

Improve error message when initial migration fails #553

NathanReb opened this issue Jan 13, 2025 · 0 comments

Comments

@NathanReb
Copy link
Collaborator

@johnridesabike just reported a migration error they encountered in #550 and rightly pointed out that the error message is quite misleading. Indeed getting the following message while using OCaml 5.3 is a bit disturbing:

$ dune build
File "main.ml", line 6, characters 4-25:
6 |   | effect Random_bits, k -> Effect.Deep.continue k (Random.bits ())
        ^^^^^^^^^^^^^^^^^^^^^
Error: migration error: effect pattern is not supported before OCaml 5.03

What's happening there is that we failed to migrate from the compiler AST (here, 5.3) to ours (here, 4.14). When that happens we should wrap the error message to provide that context so the user has a better idea of what's going on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant