learn-ocaml
learn-ocaml copied to clipboard
Bug: learn-ocaml master builds with many warnings
Related user(s):
No response
Related issue(s) or PR(s):
No response
Related project scope(s):
build
Bug description:
Doing a fresh build anew, I noticed there are many warnings raised by make
or make install
(see attached log)
@AltGr could you take a look?
In particular, it seems there are three kinds of warning, and the first kind looks serious, though I'm unsure:
-
js_of_ocaml src/app/learnocaml_description_main.bc.js warning: free variables in primitive code "define_ocaml_mode" (/home/erik/forge/git/learn-ocaml/_build/default/src/ace-lib/ace_bindings.js:19) vars: ace …
-
File ".testing.objs/byte/test_lib.cmti": Warning: Couldn't find the following modules: Fun_ty Introspection_intf File "learnocaml_report.odoc": Warning: Couldn't find the following modules: Json_encoding Stdlib File "test_lib.odoc": Warning: Couldn't find the following modules: Fun_ty Introspection_intf Learnocaml_report Parsetree Stdlib Ty
-
File "src/grader/test_lib.mli", line 963, characters 7-35: Warning: While resolving the expansion of include at File "src/grader/test_lib.mli", line 1247, character 3 Failed to resolve reference unresolvedroot(Learnocaml_report).Failure Couldn't find "Learnocaml_report" File "src/grader/test_lib.mli", line 959, characters 7-37: Warning: While resolving the expansion of include at File "src/grader/test_lib.mli", line 1247, character 3 Failed to resolve reference unresolvedroot(LearnOcaml_report).Success1 Couldn't find "LearnOcaml_report" …
Full log of make; make opaminstall
:
- see attached file.
To reproduce:
No response
Expected behavior:
No response
learn-ocaml --version
No response
git describe --long --always --abbrev=40 --tags
v0.14.1-18-g8878c9b5557fb8ddc76aa3b68d03a25f06983a2d
What OS do you use?
GNU/Linux
What OS version/distribution do you use?
Debian
What browser(s) do you use with learn-ocaml?
No response
What browser(s) version did you used to reproduce the issue?
No response
Screenshots (if need be):
No response
Additional context:
No response
Note: there are yet more warnings if we replace
https://github.com/ocaml-sf/learn-ocaml/blob/8878c9b5557fb8ddc76aa3b68d03a25f06983a2d/Makefile#L4
with
DUNE_ARGS = --root . --profile=dev --default-target @install
The reason for --profile=release
is that dev
uses debug flags to jsoo
that simply didn't scale with the project (like --sourcemap
, etc; I wasn't patient enough for compilation to terminate)
Of course it has been a while so maybe that was fixed since, but at the time there was no other way to avoid these flags.
-
free variable "ace" in primitive code "define_ocaml_mode"
: this is known,ace
is defined in an external js module that we load separately. I didn't find a reasonable workaround but the warning is harmless. -
and 3. are no longer present on #481 it seems; they seem to be mostly odoc warnings ?
Note: there are yet more warnings if we replace [...]
Some unused opens and values from what I could see: the root dune
file disables warnings 32 and 33, we could re-enable them and fix the 5 instances. These are hygiene warnings, not safety warnings, so I don't think it's high priority.