learn-ocaml icon indicating copy to clipboard operation
learn-ocaml copied to clipboard

Bug: `learn-ocaml build` does not rebuild exercises with changes in dependencies listed in `depend.txt`

Open dm0n3y opened this issue 2 years ago • 4 comments

Repro steps:

  1. Set up an exercise with grader code dependencies in depend.txt as described in https://github.com/lsylvestre/learn-ocaml/blob/master/docs/tutorials/step-8.md. Get the exercise to build successfully using learn-ocaml build.
  2. Make a breaking change in on the dependencies and rerun learn-ocaml build. Expected result: failed build Actual result: build command reports no changes

dm0n3y avatar Mar 20 '22 18:03 dm0n3y

As a temporary workaround, how can I clear the previously cached build state?

dm0n3y avatar Mar 20 '22 18:03 dm0n3y

Hi @dmoon1221, thanks a lot for your report!

As a temporary workaround, how can I clear the previously cached build state?

I didn't attempt to reproduce it yet, but meanwhile, a workaround should just be to remove the www folder generated by learn-ocaml build (generally in the current directory), and run learn-ocaml build anew.

Let us know if this sidesteps the issue.

BTW just out of curiosity: which distribution of the learn-ocaml program are you using? − I mean:

  • a learn-ocaml binary taken from the release assets
  • the learn-ocaml binary built from an opam install
  • or another flavor? :)

erikmd avatar Mar 20 '22 23:03 erikmd

Thanks! That was helpful. Specifically I wanted to clear the build cache for the specific exercise I was developing, so that I wouldn't have to wait to build every other exercise in our corpus to get feedback. I was able to do that by removing the exercise-specific json file within the www directory.

We're using our own fork of learn-ocaml, the tiny difference from current master being a modification to the compile button so that it also syncs the edit state.

dm0n3y avatar Mar 21 '22 03:03 dm0n3y

OK, thanks for your feedback!

Regarding your other remark, BTW:

We're using our own fork of learn-ocaml, the tiny difference from current master being a modification to the compile button so that it also syncs the edit state.

I'd be curious to know if this change was especially useful (1) for your workflow as a teacher (e.g. to better see the impact of the Compile feedback on students' answer), or (2) because some students lost their code at some point… e.g. because of #316 (which fortunately, is now solved in v0.14.0)

(Anyway, if you think it's worth it to discuss further this point about Compile / Sync, feel free to open a separated issue for this one :)

erikmd avatar Mar 21 '22 22:03 erikmd