esy-ocaml / hello-ocaml

an example esy-powered OCaml project
55 stars 12 forks source link

hello.byte doesn't work #5

Open chenglou opened 7 years ago

chenglou commented 7 years ago

After esy install && esy build:

❯ ./hello.byte
Fatal error: unknown C primitive `lwt_unix_bind_job'

We should be doing esy ocamlrun hello.byte, but this isn't obvious for newcomers.

andreypopp commented 7 years ago

Try esy ./hello.byte, it needs a proper env

chenglou commented 7 years ago

That has the overhead of calling esy, right?

andreypopp commented 7 years ago

Yes, this has to be fixed though — by reusing the cached env if available. On Tue, 31 Jan 2017 at 08:05 Cheng Lou notifications@github.com wrote:

That has the overhead of calling esy, right?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/andreypopp/esy-ocaml-project/issues/5#issuecomment-276276057, or mute the thread https://github.com/notifications/unsubscribe-auth/AAB3gkg6XWx36bQNSRP_DJrdmF1_1GhFks5rXsD9gaJpZM4LyOVP .

chenglou commented 7 years ago

But fetching from the cache also has an overhead right? Especially if we start up node in the process

andreypopp commented 7 years ago

The plan is to make this entirely in bash, without starting node. On Tue, 31 Jan 2017 at 08:16 Cheng Lou notifications@github.com wrote:

But fetching from the cache also has an overhead right? Especially if we start up node in the process

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/andreypopp/esy-ocaml-project/issues/5#issuecomment-276277315, or mute the thread https://github.com/notifications/unsubscribe-auth/AAB3gtP-S0tK7TJd1l97XPNmjuhkHEl9ks5rXsO_gaJpZM4LyOVP .

chenglou commented 7 years ago

What about windows? Apart from the new bash stuff

andreypopp commented 7 years ago

I think we can get the there but it wasn't my focus recently so really can't comment on that. The latest try to get this running on win was stumbled upon non availability of opam-installer-bin package for the platform. On Tue, 31 Jan 2017 at 08:20 Cheng Lou notifications@github.com wrote:

What about windows? Apart from the new bash stuff

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/andreypopp/esy-ocaml-project/issues/5#issuecomment-276277671, or mute the thread https://github.com/notifications/unsubscribe-auth/AAB3gqzIWTelEEEDmc8CPl4kRxU9q--Oks5rXsSKgaJpZM4LyOVP .

chenglou commented 7 years ago

Hummm k. I'm asking because for the js compilation story, we're making reason work on Windows and that'd have been the last piece left. If we embark on esy then it'd be adding yet another windows-incompatible thing. We can worry about this later I guess.

Bash startup is instant right? My zsh with all the configs starts up slower than node

andreypopp commented 7 years ago

Yeah, bash startup is pretty fast. We also make it not read profile and bashrc so that env is "pure".