Comments (7)
Thanks, this has been fixed in dbuenzli/brr@5b1dbed. It seems I missed that in the PR by Jérôme and subsequent commit of mine that was supposed to sanitize all that.
from js_of_ocaml.
There is a bug in prr
.
In file fut.ml
, the definition of tick
should be:
let tick ~ms =
fut @@ Jv.Promise.create @@ fun res _rej ->
ignore (Jv.apply (Jv.get Jv.global "setTimeout") Jv.[| callback ~arity:1 res; of_int ms |])
from js_of_ocaml.
@vouillon many thanks for taking time to look into it. I just applied your suggested fix and now the test passes!
As prr
is merely a fork (and out-of-date version) of brr
and it seems that brr
still has the same code, we will open a bug report on brr
as well.
Do you mind to share how you traced the root cause down? We found it quite difficult to trace such bugs as stack trace isn't very helpful (even if source map is on..)
from js_of_ocaml.
This looked like a calling convention mismatch (an OCaml function called from JavaScript as if it was a JavaScript function).
The error was in some prr
code related to promises (function Jv.Promise.create
), and indeed in a callback.
And the stack trace mentions Timeout._onTimeout
, so I searched for a setTimeout
.
from js_of_ocaml.
Wow that's impressive and thanks for the hint!
Fixing fut.ml
made our codebase all worked again. I think this issue can be closed as it's now apparent that it's due to a misuse instead of a bug in jsoo.
(@kxc-wraikny opened this issue on behalf of our team but @kxc-wraikny is taking a break until Mar 28;
so I will be handing the communication until then.)
from js_of_ocaml.
Thanks, this has been fixed in dbuenzli/brr@5b1dbed. It seems I missed that in the PR by Jérôme and subsequent commit of mine that was supposed to sanitize all that.
@dbuenzli Thanks! I think I missed it in my PR as well.
from js_of_ocaml.
Thank you all again!
from js_of_ocaml.
Related Issues (20)
- [BUG] regression causing some definitions in recursive functions to be out of scope HOT 3
- [BUG] bad version reported after opam pin HOT 1
- [BUG] Uncaught TypeError: runtime.caml_thread_initialize is not a function HOT 3
- [FEATURE REQUEST] experiment with let and const bindings.
- [BUG] Menhir internal failure on 5.7 with Dune's release profile HOT 7
- Formatting and linting the runtime with Biome HOT 7
- [BUG] binding properties are incorrectly minified HOT 2
- [BUG] Missing primitives on OCaml 5.2 HOT 4
- Assertion fails in lib/parse_bytecode.ml HOT 2
- [BUG] separate compilation cause runtime duplication when using --toplevel or --dynlink
- [BUG] js_of_ocaml is excessively memory hungry HOT 20
- [FEATURE REQUEST] More customization (or documentation) of `--source-map`. HOT 1
- [FEATURE REQUEST] Ability to impede sharing constants HOT 1
- [BUG] Using two Js_of_ocaml compiled libraries in the same runtime causes issues with js stubs HOT 3
- [BUG] ppx_expect output is being included in built javascript files HOT 19
- [BUG] Fix the toplevel with separate compilation
- [BUG] Incorrect Handling of `0u` Prefix in Int32.of_string HOT 1
- [BUG] Missing TextDecoder from reserved
- [BUG] Runtile failure with `-linkall` since 5.1.0 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from js_of_ocaml.