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

Update js_of_ocaml upper bounds in preparation to release 6.0.0 #26980

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

vouillon
Copy link
Member

No description provided.

@mseri
Copy link
Member

mseri commented Nov 28, 2024

Thanks

@mseri
Copy link
Member

mseri commented Nov 28, 2024

Would it be possible to paste here the errors in some representative cases?

@vouillon
Copy link
Member Author

JavaScript numbers are not longer mapped to OCaml floats but are given type Js.number Js.t. This causes most of the errors.

A few JavaScript properties (and method parameters) were wrongly given type int. This has been fixed by ocsigen/js_of_ocaml#1747. This incompatible changes breaks the latest release of eliom and eliom-toolkit.

incr_dom.v0.15.1:

# File "src/js_misc.ml", line 40, characters 15-25:
# 40 |   Float.( >= ) rect##.top 0.
#                     ^^^^^^^^^^
# Error: This expression has type
#          Js_of_ocaml__.Js.number_t = Js_of_ocaml__.Js.number Js_of_ocaml.Js.t
#        but an expression was expected of type Core.Float.t = float

eliom.11.1.0:

File "src/lib/client/eliommod_dom.ml", line 697, characters 15-62:
697 |   { html_top = Dom_html.document##.documentElement##.scrollTop
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: This expression has type Js_of_ocaml__.Js.number_t = Js.number Js.t
       but an expression was expected of type int

ocsigen-toolkit.4.1.0:

File "src/widgets/ot_picture_uploader.eliom", line 329, characters 38-50:
329 |               (fun ev -> float_of_int ev##.clientX)
                                            ^^^^^^^^^^^^
Error: This expression has type
         Js_of_ocaml__.Js.number_t = Js_of_ocaml__.Js.number Js_of_ocaml.Js.t
       but an expression was expected of type int

@mseri
Copy link
Member

mseri commented Nov 28, 2024

Thanks a lot

@mseri mseri merged commit 87bde52 into ocaml:master Nov 28, 2024
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants