joy-framework / joy

A full stack web framework written in janet
https://joy.swlkr.com
MIT License
537 stars 30 forks source link

Check for existence of entr before invoking #99

Closed cpjolicoeur closed 1 year ago

cpjolicoeur commented 2 years ago

This will remove the "TODO" not and first check if entr is available for use

swlkr commented 2 years ago

Hm I think the build failures might be related to spork somehow, will have to check that out. Other than that, this is great! Always good to knock down todos

cpjolicoeur commented 2 years ago

Hm I think the build failures might be related to spork somehow, will have to check that out. Other than that, this is great! Always good to knock down todos

Yeah, quite a few pieces of need need to/should be updated to their spork counterparts.

I haven’t gone through all of it yet to update all the places enough to submit a formal PR

tionis commented 2 years ago

Using which is not portable, if you want to use the shell for that use command -v.
That would be the POSIX compliant way.

cpjolicoeur commented 2 years ago

@tionis thanks for the heads up on that. I've updated the commit accordingly

tionis commented 2 years ago

While this is better I still don't think it's a good idea to rely on the shell here, reduces cross compatibility.
I don't have any better Idea though at the moment (we could just execute entr without arguments and see if it fails), using the watchful library and doing it in janet might be possible but a bit overkill

cpjolicoeur commented 2 years ago

I'd be more than happy to have another solution, if a better one presents itself. My thoughts/concerns were to remove the current hard expectation that entr be available on a users machine, since right now there is no check at all.

swlkr commented 1 year ago

I think this is a big enough problem that I'm just going to remove the dependency on enter altogether