-
Notifications
You must be signed in to change notification settings - Fork 41
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
Change bisect_ppx to dev dependency when possible #267
Comments
The relevant ticket: rescript-lang/rescript-compiler#3761 |
@andywhite37 What do you think about manually removing the |
@utkarshkukreti - Yeah, I think that would be fine to do. I'm not crazy about having that dependency in the non-dev dependencies anyway. I'm not going to be able to do it right this second, but we can make a release next week that removes it. |
@andywhite37 works for me, thanks! |
@utkarshkukreti - sorry we haven't been able to get to this so far. If you want to submit a PR to remove the dependency, I would be okay with that. It would be nice to make that depenency removal fairly non-invasive, b/c it's useful to be able to run the coverage locally when needed. Otherwise, we'll try to get to this soon. |
@utkarshkukreti does the Windows build failure happen when Bucklescript tries to compile, or is it a It looks like a script is available that can conditionally add (or maybe remove?) it during CI: https://github.com/wyze/conditional_bisect If possible, I think it would be good for us to find a CI solution like this so that we can avoid having to remember to edit files before a release (ideally even more of our release process could be pushed into CI). But maybe in the meantime we could just manually make a release without bisect. My other concern is that our one dependency, Bastet, also uses |
@mlms13 I believe it's in the postinstall step (here's the log), so it needs to be removed from package.json too.
Oh, I didn't consider this :(. Yeah, removing from Relude is not enough in that case, it needs to be removed from bs-bastet too. |
Ugh, I didn't realize bastet was also using it. Yeah, maybe |
@mlms13 @andywhite37 I haven't tested it, but I think moving bisect_ppx to a dev dependency and then using conditional_bisect in ci (or manually in dev) should work? I'll open a request on the bastet repo to do the same after I've tested that this works. |
Cool, that works for me, thanks @utkarshkukreti |
So I tried this but since it's the npm install step that fails on Windows, moving it to dev dependencies still doesn't let you compile the package while developing on Windows. I haven't used bisect_ppx, but according to the author of conditional_bisect, it's meant to be used only in CI. Will only running bisect on CI affect your workflow? |
Ok, just realized that he uses |
I don't think coverage should be a CI-only workflow. I used to run the jest coverage locally all the time to see what needed coverage. Tracking coverage percentages via CI is kind of just a nice-to-have in my opinion. Prior to bisect_ppx, we used Jest coverage, but it was not great because it ran coverage on the compiled JS code, rather than the actual OCaml/Reason code. bisect_ppx seemed like it would be better because it would run the instrumentation on the actual ocaml/reason code, but ppxs in general have proven again and again to be fragile and not cross-platform, and bisect_ppx is apparently no exception to that. If it were me by myself, I would probably just switch back to jest coverage and declare the bisect_ppx effort a miss. It sucks that we have to jump through all these hoops and mess with dependencies just to run coverage on the code. Does anyone have any ideas? I'm not in favor of a CI-only workflow for running coverage, and it would be nice if the solution we go with doesn't involve a dependency on pre-compiled binaries that aren't cross-platform. @utkarshkukreti - are you able to |
Somewhat related to this, I tried building in the 9.1.1 version of rescript, but seems a module bisect needs to compile has been removed recently.
|
Hongbo mentions why it's broken. They removed Marshal and so it doesn't work, though he claims Marshal never worked anyways so in theory this should be fixable. https://forum.rescript-lang.org/t/some-thoughts-on-community-building/1474?u=notchris
|
I tried to update to [email protected] too, and I have the same error, my project is compiling when I remove things relative to |
Sorry for the delayed action/response - thanks for submitting that PR! I haven't been following the saga of bisect_ppx and rescript - is there a chance it will ever work again? If not, I'm sort of inclined to just remove it completely and go back to the jest coverage we had before. If there is a chance it might work again at some point, we can do the prepackage script - I'll try to checkout the PR soon |
Don't really know, but in fact |
Yeah, I agree it is only for dev time - the issue has always been that reason/bucklescript/rescript didn't support ppxs as dev dependencies, so it always had to exist as a prod dependency. It's been left as a prod dependency b/c otherwise we'd have to do this package.json juggling like we're considering now, which I'd kind of like to avoid. I'd rather just have dependencies setup in a sane way in the package.json, and for things to just work without all this intervention, so that's why I'm inclined to just get rid of bisect_ppx and the complexity that comes with it. Jest is not great, but it kind of got the job done before, and seemed to just work. |
Has anyone chatted with @Risto-Stevcev about his interest in doing something like this in Bastet as well? I really liked the idea of If things aren't going to improve on the Rescript side, I'd tend to agree with @andywhite37 that we're better off removing the dependency instead of fighting the direction of upstream. |
Alternatively... how is Melange's support for dev-only PPXs? (cc @anmonteiro) It might be time to accept the fact that Relude has never lined up with the Rescript vision, and we should embrace Melange instead. I already kind of want to do this for other reasons (let ops), but I was hoping we'd be able to make one final 1.0 release that still officially supports Rescript. That said, Bucklescript/Rescript has been breaking Relude through poorly-communicated changes for years, and I'm running out of energy to guarantee that Relude will always be compatible with the Rescript compiler. |
I hope you guys keep supporting ReScript! |
Melange doesn't support dev-time PPXes right now, but it shouldn't be very hard to add it. I'll create an issue upstream and work on it soon. |
Hopefully the relude family can upgrade to the latest bisect-ppx version, since aantron said he updated it to no longer reference the Marshal module? |
@utkarshkukreti @WhyThat @mlms13 Hey sorry I'm late for this one, Github never showed the mention in my notifications at all for some reason until this last comment I'm swamped this next week with work but I'm taking vactation after that, I can take a look at these chain then |
bisect_ppx is a code coverage tool that is only needed at dev time, and not for prod installs. Right now, bucklescript only allows ppxs as normal dependencies, but this is supposed to change sometime in the future. When it's possible to have dev ppx dependencies, move bisect_ppx to a dev dep.
The text was updated successfully, but these errors were encountered: