You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The main purpose of this issue is to document a usability bug caused by the way exercism download ... currently updates exercises on the Haskell track. It seems that there are some situations where exercise version migrations cause problems, and this issue describes three such edge cases.
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 type exercism download --exercise=... --track=haskell, all the files that were updated are downloaded, except the ones the student once ran exercism submit ... on.
This causes the following problems on the Haskell track:
The solution file itself cannot be overriden by a stub, since that would mean that the student loses their solution. But if the stub has breaking changes, such as changes to a type signature, or an exported data type, the old solution may no longer successfully compile against test/Tests.hs, and there may not be any clear hint on how to proceed: While the stub file does contain the most recent type signatures or data types, they are often deliberately inferred in the test suite -- for example to allow for overloaded solutions. So the student has a solution that won't compile and no clear indication of what is missing to make it compile.
The project file, package.yaml may have been submitted so that the solution can compile on the mentor's or the automated mentoring system's machine. So if the student submitted a package.yaml, and a later update to the exercise depends on packages that are neither listed in the previous version or the student version of package.yaml, the solution may no longer successfully compile against test/Tests.hs, and the error messages will report of modules that don't exist, but not necessarily suggest what packages should be added to make these modules available.
The test file, test/Tests.hs may have been submitted because the student has enabled a commented-out test, or supplied a test of their own, to show the mentor that it passes this. For example, the Diamond exercise received a property-based test suite in Diamond: Implement property-based tests #843 that would seem ideal for the student to improve on, since the README essentially contains recipes for more properties. But if the student submits improved properties, they will never receive updates to the ones handed out.
The text was updated successfully, but these errors were encountered:
sshine
changed the title
Problem updating exercise: package.yaml, test/Tests.hs don't get updated if submitted
Bug: Files don't get updated on exercism download ... if submitted
Sep 30, 2019
Diamond's test suite is extended with a set of property-based tests.
These are in part inspired by the list of properties from README.md, and in
part by Mark Seemann's blog post on property-based checks for exactly this
exercise:
https://blog.ploeh.dk/2015/01/10/diamond-kata-with-fscheck/
Only a subset of the properties mentioned are implemented. This leaves room
for students to extend the test suite further, although exercism/exercism#5052
and #847 indicate that we may not wish to encourage this in the near future.
Because @barrymoo's property-based tests uncovered a bug in the example
solution, the example solution is replaced with one that passes current tests.
Investigate whether exercism/website#2049 helps with this. Supposedly now all editor.files are included in the important files which calculate whether an exercise has changed.
The main purpose of this issue is to document a usability bug caused by the way
exercism download ...
currently updates exercises on the Haskell track. It seems that there are some situations where exercise version migrations cause problems, and this issue describes three such edge cases.A similar but not equivalent problem is experienced exercism/ocaml#368.
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 type
exercism download --exercise=... --track=haskell
, all the files that were updated are downloaded, except the ones the student once ranexercism submit ...
on.This causes the following problems on the Haskell track:
The solution file itself cannot be overriden by a stub, since that would mean that the student loses their solution. But if the stub has breaking changes, such as changes to a type signature, or an exported data type, the old solution may no longer successfully compile against test/Tests.hs, and there may not be any clear hint on how to proceed: While the stub file does contain the most recent type signatures or data types, they are often deliberately inferred in the test suite -- for example to allow for overloaded solutions. So the student has a solution that won't compile and no clear indication of what is missing to make it compile.
The project file, package.yaml may have been submitted so that the solution can compile on the mentor's or the automated mentoring system's machine. So if the student submitted a package.yaml, and a later update to the exercise depends on packages that are neither listed in the previous version or the student version of package.yaml, the solution may no longer successfully compile against test/Tests.hs, and the error messages will report of modules that don't exist, but not necessarily suggest what packages should be added to make these modules available.
The test file, test/Tests.hs may have been submitted because the student has enabled a commented-out test, or supplied a test of their own, to show the mentor that it passes this. For example, the Diamond exercise received a property-based test suite in Diamond: Implement property-based tests #843 that would seem ideal for the student to improve on, since the README essentially contains recipes for more properties. But if the student submits improved properties, they will never receive updates to the ones handed out.
The text was updated successfully, but these errors were encountered: