bisect_ppx icon indicating copy to clipboard operation
bisect_ppx copied to clipboard

Fix for `rescript 10.0.1`

Open quinn-dougherty opened this issue 1 year ago • 4 comments

Taking a quick stab at this: https://github.com/aantron/bisect-starter-rescript/issues/3

when you try rescript 10 with bisect_ppx:

 $ rescript
Dependency on bisect_ppx
rescript: [1/4] src/common/bisect_common-Bisect.cmi
FAILED: src/common/bisect_common-Bisect.cmi
File "/home/.../bisect-starter-rescript/node_modules/bisect_ppx/src/common/bisect_common.mli", line 68, characters 42-53:
Error: Unbound type constructor out_channel

I piggy-backed a flake.nix for a reproducible development environment, mostly for personal use. We can cherry-pick it out of the PR if we don't want it.

quinn-dougherty avatar Aug 15 '22 21:08 quinn-dougherty

Confused why out_channel can be unbounded, since it's clearly in stdlib which apparently is open'd at the top of every file. https://v2.ocaml.org/releases/4.13/api/Stdlib.html#TYPEout_channel

@christianoc told me on https://github.com/rescript-lang/rescript-compiler/issues/5596 that some things to do with Pervasives (which is the same thing as Stdlib) were removed from rescript 10.0, I also notice in the rescript-compiler CONTRIBUTING.md file it says that ocaml 4.14 is used, but I don't think that's related.

quinn-dougherty avatar Aug 31 '22 07:08 quinn-dougherty

The issue: https://github.com/aantron/bisect_ppx/issues/406

quinn-dougherty avatar Aug 31 '22 07:08 quinn-dougherty

Would this same PR work with the older version of ReScript? The new version should only affect compiling ReScript projects. What part is currently failing?

cristianoc avatar Aug 31 '22 11:08 cristianoc

Would this same PR work with the older version of ReScript?

I added rescript-9 and rescript-10 as two separate processes to test. I think I expect constraints like "if you're on rescript 9 then your bisect_ppx version has to be <=2.7.1" and "if you're on rescript 10 then your bisect_ppx version has to be >=2.9.1", ultimately.

The new version should only affect compiling ReScript projects. What part is currently failing?

Based on discussion in https://github.com/aantron/bisect_ppx/pull/400, I think CI gradually started failing because the resolver started pulling down later versions of ppxlib. Note that in the last commit to master in march, many jobs were failing.

quinn-dougherty avatar Sep 01 '22 01:09 quinn-dougherty

Any quick fix for this for ReScript?

dsiu avatar Sep 30 '22 05:09 dsiu