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

Bug: learn-ocaml master builds with many warnings #542

Open
erikmd opened this issue Apr 22, 2023 · 2 comments
Open

Bug: learn-ocaml master builds with many warnings #542

erikmd opened this issue Apr 22, 2023 · 2 comments

Comments

@erikmd
Copy link
Member

erikmd commented Apr 22, 2023

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:

  1. 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
    …
    
  2. 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
    
  3. 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:

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

@erikmd
Copy link
Member Author

erikmd commented Apr 26, 2023

Note: there are yet more warnings if we replace

DUNE_ARGS = --root . --profile=release --default-target @install

with

DUNE_ARGS = --root . --profile=dev --default-target @install

@AltGr
Copy link
Collaborator

AltGr commented May 4, 2023

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.

  1. 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.

  2. and 3. are no longer present on Implement pre-compilation of exercises and graders #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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants