And the gen.sh file expects a single argument to be passed to it which is the path to the JS file that was generated by the rescript compiler. This is a relative path in the ReScript v11 build system. It’s impossible for me to know to what the path is relative – but if I had to guess, I’d say it’s relative to node_modules/rescript/. All I know is that it starts with ../../.
We use this script to compile a Flow types file from the @genType-generated TypeScript file. This is crucial for us to move forward with our rescript codebase without breaking important business features in our legacy flowtyped JS codebase.
I’ve run into a similar problem with that path resolution and try_package_path when testing ppx updates with relative paths in “ppx-flags”:
"ppx-flags": ["../ppx"]
try_package_path: upward traversal did not find 'spice-ppx-test/../ppx' starting at...
I think it’s because it’s searching for spice-ppx-test, the name field from rescript.json, instead of the actual directory name?
I needed to use like "@greenlabs/ppx-spice": "workspace:../" in package.json so that @greenlabs/ppx-spice gets symlinked and use this instead in rescript.json.
This has nothing to do with “ppx-flags”, “js-post-build” is simply not there.
Please create a GitHub issue for whatever problem you have with ppx-flag.