You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1/ In Makefile.os there are 10 times -ppx -ppx.
Is it normal?
As a test, replacing them by -ppx had no effect on make byte (but had effect on make opt that failed, as it seems to be useful to eliomopt. Anyway it's not blocking)
2/ Replacing deprecated Eliom_content.Html.F.pcdata with Eliom_content.Html.F.txt saved about 700 warning lines when doing make byte (out of about 1200 lines).
List of deprecated modules or functions:
Eliom_content.Html.F.pcdata -> JEliom_content.Html.F.txt
Js -> Js_of_ocaml.Js
Dom_html -> Js_of_ocaml.Dom_html
Dom -> Js_of_ocaml.Dom
Firebug -> Js_of_ocaml.Firebug
Can you update the ocsigen-start *.eliom files in template.distillery/ for the next 1.3.1 release?
It will make the build much less verbose.
You may do it with a sed command much more quickly than handling a PR.
I used the following command for example for Js -> Js_of_ocaml.Js : $ sed -i 's/Js./Js_of_ocaml.Js./g' $(grep -l "Js." *.eliom)
3/ In demo_carousel1.eliom L33, the function To_dom.of_element belongs to the module Eliom_content.Html.
As I had a "Warning 33: unused open Eliom_content.Html." I deleted this open Eliom_content.Html directive, but then the compiler said Unbound module To_dom.
Tweaking theses directives, exchanging their order had no effect. At last, I just opened the module as a prefix to To_dom:
L34 let%lwt () = Ot_nodeready.nodeready (Eliom_content.Html.To_dom.of_element ~%carousel) in
Can you explain why this "unused open Eliom_content.Html" happened?
4/ In file "oc_1_3_0_test2_i18n.eliom" there are several Warning 27: unused variable f (4 lines).
(cause : line 147 and 852)
| En -> (fun ?(capitalize=false) ?(f=false) () -> List.flatten [[txt (if capitalize then "V" else "v")];[txt "alidated"]])
Inserting a null test worked:
L147 | En -> (fun ?(capitalize=false) ?(f=false) () -> List.flatten [[txt (if capitalize then "V" else "v")];[txt "alidated"];[txt (if f then "" else "")]])
L852 | En -> (fun ?(capitalize=false) ?(f=false) () -> String.concat "" [(if capitalize then "V" else "v");"alidated";(if f then "" else "")])
Does this null test still makes sense according to you?
Now I have a zero warning build.
The text was updated successfully, but these errors were encountered:
RogerTarani
changed the title
Cleaning up template.distillery files (Makefile and *.eliom deprecated functions or modules)
Cleaning up template.distillery files (for 1.3.1 release)
Jan 14, 2019
RogerTarani
changed the title
Cleaning up template.distillery files (for 1.3.1 release)
Cleaning up template.distillery files (for 1.4 release)
Jan 14, 2019
1/ In Makefile.os there are 10 times
-ppx -ppx
.Is it normal?
As a test, replacing them by
-ppx
had no effect on make byte (but had effect on make opt that failed, as it seems to be useful to eliomopt. Anyway it's not blocking)2/ Replacing deprecated
Eliom_content.Html.F.pcdata
withEliom_content.Html.F.txt
saved about 700 warning lines when doingmake byte
(out of about 1200 lines).List of deprecated modules or functions:
Eliom_content.Html.F.pcdata -> JEliom_content.Html.F.txt
Js -> Js_of_ocaml.Js
Dom_html -> Js_of_ocaml.Dom_html
Dom -> Js_of_ocaml.Dom
Firebug -> Js_of_ocaml.Firebug
Can you update the ocsigen-start *.eliom files in template.distillery/ for the next 1.3.1 release?
It will make the build much less verbose.
You may do it with a sed command much more quickly than handling a PR.
I used the following command for example for Js -> Js_of_ocaml.Js :
$ sed -i 's/Js./Js_of_ocaml.Js./g' $(grep -l "Js." *.eliom)
3/ In demo_carousel1.eliom L33, the function
To_dom.of_element
belongs to the moduleEliom_content.Html
.As I had a "Warning 33: unused open Eliom_content.Html." I deleted this
open Eliom_content.Html
directive, but then the compiler saidUnbound module To_dom
.Tweaking theses directives, exchanging their order had no effect. At last, I just opened the module as a prefix to To_dom:
Can you explain why this "unused open Eliom_content.Html" happened?
4/ In file "oc_1_3_0_test2_i18n.eliom" there are several
Warning 27: unused variable f
(4 lines).(cause : line 147 and 852)
| En -> (fun ?(capitalize=false) ?(f=false) () -> List.flatten [[txt (if capitalize then "V" else "v")];[txt "alidated"]])
Inserting a null test worked:
Does this null test still makes sense according to you?
Now I have a zero warning build.
The text was updated successfully, but these errors were encountered: