Skip to content
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

Error: Str.cmj not found, cmj format is generated by BuckleScript #879

Closed
ConradIrwin opened this issue Oct 27, 2016 · 6 comments
Closed

Comments

@ConradIrwin
Copy link

Hi, I've installed bucklescript using npm install bucklescript and now am trying to compile some OCaml.

Unfortunately I'm getting an error Error: Str.cmj not found, cmj format is generated by BuckleScript.

Looking at node_modules/bs-platform/lib/ocaml/ it seems that while I have a whole lot of files starting with str., and a whole load of files ending with .cmj (see https://gist.github.com/f000c32aa78d55863f3dee7fec8e50b9), I don't seem to have the eponymous str.cmj

I'm very new to both Ocaml and bucklescript, so I'm probably missing something obvious, but I searched for the error message and nothing came up.

I also tried manually compiling str.mli with bsc.exe, but it doesn't seem to generate any output files.

Any help would be much appreciated, and sorry if it's just me being confused.

@bobzhang
Copy link
Member

in OCaml, str is written in C, we did not port it to vanilla ocaml, yet, I would suggest using JS native reg with bindings

@OvermindDL1
Copy link
Contributor

Which are exposed within Js.String for note. :-)

Still would be nice to have the Str module rewritten for bucklescript, should not be hard to do, a beginner task perhaps?

@bobzhang
Copy link
Member

Hi, in OCaml, str library is written in C, which is not ported to ocaml yet. I would suggest you to use JS native regex via bindings

[email protected] At: 10/27/16 01:35:53" data-digest="From: [email protected] At: 10/27/16 01:35:53" style="">
From: [email protected] At: 10/27/16 01:35:53
To: [email protected]
Subject: Re:[bloomberg/bucklescript] Error: Str.cmj not found, cmj format is generated by BuckleScript (#879)

Hi, I've installed bucklescript using npm install bucklescript and now am trying to compile some OCaml.
Unfortunately I'm getting an error Error: Str.cmj not found, cmj format is generated by BuckleScript.
Looking at node_modules/bs-platform/lib/ocaml/ it seems that while I have a whole lot of files starting with str., and a whole load of files ending with .cmj (see https://gist.github.com/f000c32aa78d55863f3dee7fec8e50b9), I don't seem to have the eponymous str.cmj
I'm very new to both Ocaml and bucklescript, so I'm probably missing something obvious, but I searched for the error message and nothing came up.
I also tried manually compiling str.mli with bsc.exe, but it doesn't seem to generate any output files.
Any help would be much appreciated, and sorry if it's just me being confused.

You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@OvermindDL1
Copy link
Contributor

Well that was funky, I'm not used to Github duplicating messages like that. ^.^

@bobzhang
Copy link
Member

@OvermindDL1 depends on how you would like to implement it, convert existing ocaml re into jS re or polyfill underlying c implementations?
PRs are welcome : )

@OvermindDL1
Copy link
Contributor

Hmm, good point, the OCaml and JS regex engines probably implement different styles (bleh no standards)...

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

No branches or pull requests

3 participants