teamwalnut / graphql-ppx

GraphQL language primitives for ReScript/ReasonML written in ReasonML
https://graphql-ppx.com
MIT License
257 stars 53 forks source link

Switch to impl/intf from preprocess_* #289

Open anmonteiro opened 1 year ago

anmonteiro commented 1 year ago

check the different ppxlib preprocessing phases: https://twitter.com/_anmonteiro/status/1644031054544789504

we want to run graphql_ppx in the "global transformations" phase, in order to allow graphql_ppx to be used with other PPXes that use the preprocess phase.

jakubrpawlowski commented 8 months ago

With this change I'm seeing the following warning in every file with autogenerated graphql types:

Error (warning 61 [unboxable-type-in-prim-decl]): This primitive declaration uses type Raw.t, whose representation
may be either boxed or unboxed. Without an annotation to indicate
which representation is intended, the boxed representation has been
selected by default. This default choice may change in future
versions of the compiler, breaking the primitive implementation.
You should explicitly annotate the declaration of Raw.t
with [@@boxed] or [@@unboxed], so that its external interface
remains stable in the future.

Branch: https://github.com/jchavarri/graphql-ppx/commit/1663b3ff8baceac8901c3ced564ca2788a559a89

anmonteiro commented 8 months ago

It sounds unlikely that this branch would cause those warnings. Rather, they might be related to Melange, not the PPX.