Skip to content
This repository has been archived by the owner on Sep 19, 2018. It is now read-only.

Can't use Buffer module in Jenga #26

Open
rgrinberg opened this issue Jun 11, 2016 · 5 comments
Open

Can't use Buffer module in Jenga #26

rgrinberg opened this issue Jun 11, 2016 · 5 comments

Comments

@rgrinberg
Copy link

Doing something like ignore (Buffer.create 128) in your jengaroot.ml doesn't work:

line 43, characters 12-25:\nError: Unbound module Buffer\n
@trefis
Copy link
Contributor

trefis commented Jun 13, 2016

The jengaroot.ml is an ocaml_plugin plugin.
As explained here such plugins are compiled using the environment embedded with your executable. In the case of jenga the environment is defined in myocamlbuild.ml and doesn't include the stdlib.

To use the Buffer module you can probably use Core.Std.Caml.Buffer. Alternatively you can build your own jenga embedding the cmis from the stdlib.

@trefis trefis closed this as completed Jun 13, 2016
@rgrinberg
Copy link
Author

Thanks for the reply. I will see how I can build my own jenga
executable.

However, the workaround with the qualified Buffer path doesn't work
either.

On 06/13, Thomas Refis wrote:

The jengaroot.ml is an ocaml_plugin plugin.
As explained here such plugins are compiled using the environment embedded with your executable. In the case of jenga the environment is defined in myocamlbuild.ml and doesn't include the stdlib.

To use the Buffer module you can probably use Core.Std.Caml.Buffer. Alternatively you can build your own jenga embedding the cmis from the stdlib.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#26 (comment)

@trefis
Copy link
Contributor

trefis commented Jun 13, 2016

What's the issue when using the fully qualified path?

@trefis trefis reopened this Jun 13, 2016
@rgrinberg
Copy link
Author

You're right. Looks like it's a different issue. The module seem to be there - I can alias it with module M = Core.Std.Caml.Buffer for example. But none of the bindings seem to be present inside the module:

Error: Unbound value Core.Std.Caml.Buffer.create

@Nick-Chapman
Copy link

Core.Std.Caml.Buffer is defined as an alias for the standard buffer module, but the problem is that we dont embed the buffer.cmi for this. So currently, building your own jenga.exe is probably the only solution. Sorry.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants