-
Notifications
You must be signed in to change notification settings - Fork 2
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
Can have Ppx_deriving_json_runtime.Primitives
working internally?
#19
Comments
Ppx_deriving_json_runtime.Primitives
working inPpx_deriving_json_runtime.Primitives
working internally?
The only reason I can think of not doing this is to override the primitives such as string/int/..., so I propose to make things rare a bit harder for those use-cases and provide a section on the docs explaining how to do it:
and keep the inlining inside the ppx, as @pedrobslisboa suggests. |
I don't think this is a good idea for the reasons stated in the linked ppx_deriving_router issue. Better to stay consistent. If the local open in a module is too annoying, or needs to be spread in multiple modules, can always add |
Also, I would do this change on ppx_deriving_router as well. The entire point of this issue is to make default behaviour simpler, while allow more advanced use-cases more explicit/verbose.
|
There's a possibility to do
I disagree, all JST ppx work that way.
I'm all for making things simpler but what you propose will make things a bit easier, not simpler. Because special casing few types is actually making things more complex and less consistent. |
But special casing is shadowing type string, which is... not very common? |
Description
I'm curious about it. We have to add
Ppx_deriving_json_runtime.Primitives
for every usage; can we have it internally?Like (Code just as a sample, not tested or something):
Is it to avoid depending on
Ppx_deriving_json_runtime.Primitives
name, as it can break if the name changes?What is the motivation?
The text was updated successfully, but these errors were encountered: