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
System.PosixCompat.Files.setFileTimes fails on windows #119
Comments
Thanks for reporting. Apparently this operation isn't supported by unix-compat at all ( http://hdiff.luite.com/cgit/unix-compat/tree/src/System/PosixCompat/Files.hsc#n394 ). Windows does have an API function for this: http://msdn.microsoft.com/en-us/library/ms724933(v=vs.85).aspx , but there might be some problem making it compatible with the unix function (otherwise I have no idea why this wouldn't be implemented). I personally think it's really annoying that yesod devel changes modification times for files that might be open in the user's editor, so maybe it's good to change the behaviour anyway, some ideas:
1 is obviously much easier to implement, 2 is probably better in the end, since, if implemented properly, it can make recompilation much faster, but it will likely have more problems or compatibility issues than 1. Maybe 1 can be implemented first and 2 can be added later? any thoughts? |
A little update: I'm working on an updated yesod devel that doesn't touch user files from the user anymore. It copies all .hs files to dist/src-devel and builds from there (other files don't need to be copied). A major disadvantage is that it requires some changes to the .cabal file, so existing scaffolds need to be updated |
If you want, you can try the updated yesod devel in the new-devel branch. I've updated it to use a different method to force recompiles, which doesn't rely on setFileTimes anymore. It's not completely finished (restarting the program after a change should be improved), but it should work on Windows now. Leave a comment if you still have problems. |
on windows XP the following code throws an exception:
the exception:
System.PosixCompat.Files.setFileTimes: not supported: illegal operation.
because of that
yesod devel
does not reload the application when a file is modified.The text was updated successfully, but these errors were encountered: