-
Notifications
You must be signed in to change notification settings - Fork 10
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
Esy integration #23
Comments
I'm actually working on plain JS bsb right now and it's looking like this is not going to be hard at all to support. (I haven't looked too deeply into the bsb-native stuff, except for the amount we experimented with together last week). Happy to answer any other questions. |
Someone might interpret this as meaning that the binary |
Each remaining issues is either an important blocker, or merely perf:
Number three is the most important one to solve. Why does bsb-native a hard coded assumption about where the stdlib is? Isn't bsb-native just a binary that generates a ninja file which calls |
I agree with the points @jordwalke listed. Few more thoughts:
This is not a blocker for supporting bsb-native in general with Esy (building dependencies which use bsb-native once and put them to global store). But a real blocker for using bsb-native for development with Esy as without this it wouldn't be possible to use incremental compilation. I want to stress though that it's more preferable to make |
I'll start with a small explanation and we'll go from there.
Esy's a package manager for Reason. It allows using any build system to build packages, as long as the build system obeys a bunch of rules.
Right now bsb-native (and bsb) do not obey the rules to work under Esy. There are two big chunks of work that we can identify:
META
andpackagename.install
see http://projects.camlcity.org/projects/findlib.html) so that Esy can read them. This needs to be a command line argument that will build using ocamlfind (always) and generate the files.The first bullet I'm almost done with. I'm pretty simply merging opam_of_pakagejson into bsb-native and allowing the user to generate the findlib files. I've been having some trouble really testing that the files are correct though, still needs a bit of love but I'll push to a branch and tag this issue.
The 2nd bullet point's a bit of a pickle but is not strictly needed for cooperating with Esy. The problem is that bsb makes assumptions of where the stdlib is relative to where
bsb.exe
is (same for where ocaml is etc...). Those assumptions do not hold in Esy world when we enable global caching, unfortunately.Those are the things that we can do inside of bsb-native. That said, this does not allow any Esy user to access any bsb-native package. One would have to go to all bsb-native packages and update their package.json to contain new Esy-specific fields like such. I think we could very easily make Esy understand how to call bsb-native (simply detecting the presence of a
bsconfig.json
file, or a devDependency onbsansouci/bsb-native
). All that Esy needs to do is callbsb -make-library
(literally), because Esy builds in order and we'd be building using ocamlfind which will have its environment all setup by Esy automatically.The reasons for making Esy understand bsb is two fold:
Would love some thoughts and help with any of this <3
The text was updated successfully, but these errors were encountered: