graphql-ppx icon indicating copy to clipboard operation
graphql-ppx copied to clipboard

graphql_ppx does not support OpenBSD/adJ

Open vtamara opened this issue 3 years ago • 5 comments

Trying to install pupilfirst (https://developers.pupilfirst.com/docs/development_setup/) it stops when running CXX=c++ yarn with:

error /.../pupilfirst/node_modules/@baransu/graphql_ppx_re: Command failed.
Exit code: 1                            
Command: node ./copyPlatformBinaryInPlace.js
Arguments:                              
Directory: /.../pupilfirst/node_modules/@baransu/graphql_ppx_re
Output:                                 
graphql_ppx does not support this platform :(
                                        
graphql_ppx comes prepacked as built binaries to avoid large
dependencies at build-time.

If you want graphql_ppx to support this platform natively,
please open an issue at our repository, linked above. Please

The platform is:

OS: OpenBSD/adJ 6.7 Node: 12.16.1

vtamara avatar Jan 10 '21 00:01 vtamara

It can probably use the same executable as Linux. Can you see if that works?

jfrolich avatar Jan 10 '21 01:01 jfrolich

I thought there was some compatibility layer on BSD so that ELF binaries would work there. If that doesn't work, you might need to compile the ppx yourself.

jfrolich avatar Jan 10 '21 03:01 jfrolich

I thought there was some compatibility layer on BSD so that ELF binaries would work there. If that doesn't work, you might need to compile the ppx yourself.

In OpenBSD/adJ there is not.

I would like to compile ppx by myself.

One question, the instructions to compile are https://beta.graphql-ppx.com/docs/contributing/ ?

If those are the instructions to compile, up to now I have found 2 problems:

  1. bs-plataform was not supported in OpenBSD
  2. esy is not supported in OpenBSD

And I have tried to advance on solutions for both:

  1. For the first one, I sent a PR that was accepted: https://github.com/rescript-lang/rescript-compiler/pull/4903
  2. For the second I opened this issue: https://github.com/esy/esy/issues/1257.

vtamara avatar Jan 11 '21 12:01 vtamara

Once you have those it's pretty easy to compile, just esy b. It produces an exe and that is the only thing you need to provide in your bsconfig.json. (We do have a small runtime file for complex queries with multiple fragments in the bucklescript folder (you can just copy that into your project).

jfrolich avatar Jan 11 '21 14:01 jfrolich

Having this issue on Mac M1. Any suggestions?

thubamamba avatar Dec 28 '21 16:12 thubamamba