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 build does not rebuild exercises with changes in dependencies listed in depend.txt #478

Closed
dm0n3y opened this issue Mar 20, 2022 · 4 comments · Fixed by #481

Comments

@dm0n3y
Copy link
Contributor

dm0n3y commented Mar 20, 2022

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
Copy link
Contributor Author

dm0n3y commented Mar 20, 2022

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

@erikmd
Copy link
Member

erikmd commented Mar 20, 2022

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? :)

@dm0n3y
Copy link
Contributor Author

dm0n3y commented Mar 21, 2022

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.

@erikmd
Copy link
Member

erikmd commented Mar 21, 2022

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 :)

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

Successfully merging a pull request may close this issue.

2 participants