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 Ast_pattern error reporting. #391

Open
panglesd opened this issue Feb 28, 2023 · 9 comments
Open

Improve Ast_pattern error reporting. #391

panglesd opened this issue Feb 28, 2023 · 9 comments

Comments

@panglesd
Copy link
Collaborator

The error reported by Ast_pattern are not very informative, especially for the user of the PPX, who might not know anything about the AST.

Here is an example of an error generated by an unmatched AST pattern:

Error: PStr expected

Possible improvements:

  • Make a more complete sentence, with more information: Error: a "structure" node was expected, instead of a "..."
  • Allow for custom error message (or custom additional information) in the API. It is especially interesting for the alt function, which only expects from one branch. Example of a custom error message (see Implement new module type syntax ppx_import#87):
Error: [%%import] Type pattern (PTyp) is not supported, only type and module
         type declarations are allowed
@nangahamandine
Copy link

Hello, I'd like to work on this issue
Can you please assign it to me?

@nangahamandine
Copy link

nangahamandine commented Mar 15, 2023

I noticed that on the referenced issue, changes were made in the ocaml-ppx/ppx-import. I've successfully cloned and built ocaml-ppx/ppxlib. Will I need to clone multiple extensions of ocaml-ppx? Or do I stick with ppxlib for now?

@Burnleydev1
Copy link
Contributor

Hello @nangahamandine, I think for this issue you will need just the ppxlib

@nangahamandine
Copy link

Sure, thanks

@marrious11
Copy link
Contributor

Hi @nangahamandine, I wish to find out if you've completed this issue already!

@meghaaa30
Copy link

hey! I am an outreachy applicant, I would like to work on this issue. can you please assign it to me?

@panglesd
Copy link
Collaborator Author

@nangahamandine are you still actively working on this issue?
@marrious11 have you started working on it, or do you still want to?

Do not hesitate to ask for support, or precision on the task. But let us know if the issue can be assigned to someone else!

If this issue is already taken, there are others with still no-one working on them, listed on #389.

@marrious11
Copy link
Contributor

Well, sir @panglesd, I'd hoped to but since I meet a comment on it from @nangahamandine, I thought she has been reading through, and perhaps working on it too:
But I also started working on it in my own small way though.
We could work on it together if it is okay by you sir!

@nangahamandine
Copy link

I've not been able to do much. My time commitments changed so I've had little to no time to make changes or contributions
Please go ahead and work on the issue
Good luck!

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

5 participants