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

Latest published version isn't working #3

Open
sync opened this issue Aug 2, 2019 · 2 comments
Open

Latest published version isn't working #3

sync opened this issue Aug 2, 2019 · 2 comments

Comments

@sync
Copy link
Contributor

sync commented Aug 2, 2019

thanks for updating reason-macros-bin, but I am having issues running latest published binaries. I could get it to run when I was manually copying the ppx for each platform etc.. but since you updated the library, bsb compilation is failing on my test project: you can see the pr here for a reproduction: https://github.com/sync/maccy/pull/4

First issue is that the ppx.js script needs to have execution permission set.

ninja: no work to do.
[2/7] Building src/Icon.mlast
sh: /Users/anthonymittaz/Projects/Reason/maccy/node_modules/reason-macros-bin/ppx.js: Permission denied
File "/Users/anthonymittaz/Projects/Reason/maccy/src/Icon.re", line 1:
Error: Error while running external preprocessor
Command line: /Users/anthonymittaz/Projects/Reason/maccy/node_modules/reason-macros-bin/ppx.js '/var/folders/zr/9zn3j55909q8lnvg5r967qs80000gn/T/camlppx064345' '/var/folders/zr/9zn3j55909q8lnvg5r967qs80000gn/T/camlppx8e5f1f'

[3/7] Building src/Index.mlast
sh: /Users/anthonymittaz/Projects/Reason/maccy/node_modules/reason-macros-bin/ppx.js: Permission denied
File "/Users/anthonymittaz/Projects/Reason/maccy/src/Index.re", line 1:
Error: Error while running external preprocessor
Command line: /Users/anthonymittaz/Projects/Reason/maccy/node_modules/reason-macros-bin/ppx.js '/var/folders/zr/9zn3j55909q8lnvg5r967qs80000gn/T/camlppx6fb90a' '/var/folders/zr/9zn3j55909q8lnvg5r967qs80000gn/T/camlppx9625ae'

and if you check master it is working fine
sorry to be a pain 😃
btw once i change the permisison issue i get another error

File "/Users/anthonymittaz/Projects/Reason/maccy/src/Icon.re", line 1:
Error: External preprocessor does not produce a valid file
Command line: /Users/anthonymittaz/Projects/Reason/maccy/node_modules/reason-macros-bin/ppx.js '/var/folders/zr/9zn3j55909q8lnvg5r967qs80000gn/T/camlppxc42632' '/var/folders/zr/9zn3j55909q8lnvg5r967qs80000gn/T/camlppx8228fc'

[3/7] Building src/Index.mlast
File "/Users/anthonymittaz/Projects/Reason/maccy/src/Index.re", line 1:
Error: External preprocessor does not produce a valid file
Command line: /Users/anthonymittaz/Projects/Reason/maccy/node_modules/reason-macros-bin/ppx.js '/var/folders/zr/9zn3j55909q8lnvg5r967qs80000gn/T/camlppxa6a3c9' '/var/folders/zr/9zn3j55909q8lnvg5r967qs80000gn/T/camlppxa4eb2f'

error Command failed with exit code 2.
@cem2ran
Copy link

cem2ran commented Aug 11, 2019

@jaredly I haven't been able to consume this package from npm. after making ppx.js executable I'm also getting:
Error: External preprocessor does not produce a valid file

@ozanmakes
Copy link

I use a script like this:

#!/usr/bin/env bash

DIR="$(cd "$(dirname "$0")/.."; pwd -P)"

chmod +x $DIR/node_modules/reason-macros-bin/*

node "$DIR/node_modules/reason-macros-bin/ppx.js" "$DIR/Shared.macros.re" $1 $2

with "ppx-flags": [ "./scripts/ppx_macros.sh" ] in bsconfig.json

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

3 participants