exercism / ocaml

Exercism exercises in OCaml.
https://exercism.org/tracks/ocaml
MIT License
93 stars 50 forks source link

Problem updating exercise: Both dune and jbuild files exist #368

Closed sshine closed 1 year ago

sshine commented 4 years ago

The main purpose of this issue is to document a usability bug caused by the way exercism download currently updates exercises on the OCaml track. It seems that there are some situations where exercise version migrations cause problems, and this is one such edge case.

If users return to an exercise that has been updated in the meantime, and they click the website button that forwards their solution to the latest version, and they then type exercism download --exercise=... --track=ocaml, all the files that were updated are downloaded (except the ones they once ran exercism submit ... on).

If this was a while ago, from before we replaced jbuild with dune removed the jbuild file in favor of the dune file in #314 (we used dune already, but where it looked at the jbuild file until it became deprecated), then issuing a make will trigger the following error:

$ make
dune clean
dune runtest
Error: Directory . has both a 'dune' and 'jbuild' file.
This is not allowed
Makefile:4: recipe for target 'test' failed
make: *** [test] Error 1

Perhaps we should extend Makefile to conditionally remove the jbuild file and inform that this has happened. Perhaps we should not do anything about this problem. Perhaps we should address this in a track-generic way. For now, this is a testimony to its existence.

georgyo commented 1 year ago

I don't think this is an issue anymore, please reopen if that is not correct.