Code Monkey home page Code Monkey logo

Comments (3)

hhugo avatar hhugo commented on July 25, 2024

Looking at your CI building the js file, I see

(cd _build/default/src/js && /home/opam/.opam/4.14.1/bin/js_of_ocaml -o interactive_js.bc.js filesystem.js interactive_js.bc-for-jsoo)
Warning: your program contains effect handlers; you should probably run js_of_ocaml with option '--enable=effects'
There are some missing primitives
Dummy implementations (raising 'Failure' exception) will be used if they are not available at runtime.
You can prevent the generation of dummy implementations with the commandline option '--disable genprim'
Missing primitives:
  caml_thread_initialize

which indicate you're using ocaml 4.14.1.

Looking at the diff in the PR, I see you're adding a dependency on saturn_lockfree, which depends on threads.posix for ocaml < 5. (see https://github.com/ocaml-multicore/saturn/blob/main/src_lockfree/dune).
threads.posix is not supported by jsoo.

from js_of_ocaml.

hhugo avatar hhugo commented on July 25, 2024

The "4.14.1" path fragment was misleading. I can see the compiler is upgraded to 5.1.1 before. Looking again, saturn_lockfree depends on domain_shims which unconditionally depends on threads (see https://gitlab.com/gasche/domain-shims/-/blob/trunk/lib/dune?ref_type=heads).
I think we should somehow remove the threads dep from domain_shims on ocaml5. (cc @gasche)

from js_of_ocaml.

toots avatar toots commented on July 25, 2024

Great catch on the threads hard dep, thanks. That fixes it. I'll follow-up there.

from js_of_ocaml.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.