`generated_files` ... directory not found on second run of exercise.
vertexcite opened this issue · comments
(On MacOS 11.2.x)
Using watch
, if tests run, then file modified, the automatic rerun fails as follows:
$ stack exec -- haskellings watch
Successfully compiled : Expressions.hs
Successfully compiled : Types1.hs
Successfully compiled : Types2.hs
Successfully compiled : Types3.hs
Successfully compiled : Types4.hs
Successfully compiled : Types5.hs
Successfully compiled : Functions1.hs
Successfully ran : Functions1.hs
This exercise succeeds! Remove 'I AM NOT DONE' to proceed!
Functions1.hs modified and saved, and then:
Running exercise: Functions1
Successfully compiled : Functions1.hs
Tests failed on exercise : Functions1.hs
/bin/sh: /Users/[my-user-name]/Documents/develop/haskellings/generated_files/functions/Functions1: No such file or directory
(Actual output edited for above log, [my-user-name] is my actual user name.)
Same happens if you quit watch
mode and run it directly:
$ stack exec -- haskellings run Functions1
Successfully compiled : Functions1.hs
Tests failed on exercise : Functions1.hs
/bin/sh: /Users/[my-user-name]/Documents/develop/haskellings/generated_files/functions/Functions1: No such file or directory
Revision info:
git log | head -5
commit f3bd41422782546058168a791b79ff42e26e7710
Author: Functional Fox <516090+functional-fox@users.noreply.github.com>
Date: Sun Mar 28 20:54:06 2021 +0200
Use 2-tuple instead of 3-tuple in exercise (#36)
Dah I'm running into this every so often myself. Seems somewhat non-deterministic. Every so often the compilation won't properly produce the executable. Not sure why yet.
@vertexcite As I'm checking this again, I'm seeing some odd behavior so I want to confirm that you see the same thing. Can you try running these steps?
- Confirm that this error is recurring by running
haskellings run Functions1
- Comment out this line, which removes the generated compile directory: https://github.com/MondayMorningHaskell/haskellings/blob/master/src/Config.hs#L147
- Re-compile:
stack install
- Try running
haskellings run Functions1
again and see if the error occurs again. - You should be able to now look at the directory
generated_files/exercises
. What files are present there? - Try running
haskellings run Functions1
again (yes, third time) without any modifications. Does it work now?
Should be fixed by #44. I was unable to reproduce the issue after upgrading to GHC 8.10.4. Feel free to re-open this issue if this persists on the new master
.