Skip to content

The optional file "depent.txt" is not working #366

@git-amd

Description

@git-amd

Hi,

In the context of some learn-ocaml exercises, I need to preload some external code (".ml" and ".cma" files). I tried to use the optional file "depend.txt" as described in the manual (http://ocaml-sf.org/learn-ocaml/tutorials/step-8.html). However, this seems to fail to work. I cannot manage to make the external code available to the student's code.

Here is the description of one failed experiment. I'm trying to gain access to some module "Q" that exports the symbol "q".

- Definition of module Q

> cat my-learn-ocaml-repository/exercises/lib/q.ml
   let q = 123 ;;
   let w = 456 ;;
> cat my-learn-ocaml-repository/exercises/lib/q.mli
   val q: int

- Checking the module Q

> ocamlc -c q.mli q.ml
> ocaml q.cmo
        OCaml version 4.05.0
# Q.q;;
- : int = 123
# Q.w;;
Error: Unbound value Q.w

- The file "depend.txt"

> cat my-learn-ocaml-repository/exercises/demo/depend.txt
../lib/q.mli
../lib/q.ml

- Rebuilding the repository and launching the learn-ocaml server

> touch my-learn-ocaml-repository/exercises/demo/test.ml
> learn-ocaml build  --repo my-learn-ocaml-repository
Learnocaml v.0.12 running.
Updating app at ./www
demo                         [OK]
> learn-ocaml serve
Learnocaml server v.0.12 starting on port 8080
Found the following teacher tokens:
  - X-1JJ-OZA-V41-XXX

- Using the exercise "demo" in the web browser

   Q.q;;
Unbound module Q

Thank you,

- Artur Miguel Dias

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions