-
Notifications
You must be signed in to change notification settings - Fork 22
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
Be more relaxed about ppx attributes. #15
Comments
This is likely also an issue for |
Completely removing this check would be a bit dodgy as this would mean that if the user explicitly put an attribute it would be silently ignored. However, we could whitelist attributes generated by reason in ppxlib. We already do this for merlin for instance. What would help is to come up with a convention for machine generated attributes that can safely be ignored. For instance using the |
We currently use the attributes |
Ok, are you happy to prefix the name of these attributes with |
A |
We won't be able to go retroactively update older versions of Reason already in use that use the |
I'd like to support this request. We cannot use the |
How about temporarily hard coding |
FastpackTest remains OCaml because of this issue: janestreet/ppx_inline_test#15
We can do both at once, it's the same amount of work to do either. I created this ticket to track this issue |
Closing this, because it looks like @jeremiedimino solved this by doing both a special case for attributes starting with "reason" or "refmt" and the general thing of ignoring attribute that start with underscores. |
In Reason, we preserve the original string content in the AST and attach them to parsed strings (which are manipulated to some extent by the parsing process).
When you write:
let%test "literal" = ..
You effectively end up with:
And the
ppx_inline_test
ppx reports: "Error: Attributes not allowed here"If we'd like to use ppx_inline_test with Reason, then we will need ppx_inline_test to be a little more relaxed about allowing attributes on the string literal. Is this possible?
reasonml/reason#2134
The text was updated successfully, but these errors were encountered: