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

GitHub actions windows #6494

Merged
merged 3 commits into from
Jan 21, 2020
Merged

GitHub actions windows #6494

merged 3 commits into from
Jan 21, 2020

Conversation

phadej
Copy link
Collaborator

@phadej phadej commented Jan 20, 2020

No description provided.

@phadej
Copy link
Collaborator Author

phadej commented Jan 20, 2020

@Mistuke what might cause

      Exception: tests\IntegrationTests2\regression/3324\q\q.cabal.backup: renameFile:renamePath:MoveFileEx "\\\\?\\D:\\a\\cabal\\cabal\\cabal-install\\tests\\IntegrationTests2\\regression\\3324\\q\\q.cabal.backup" Just "\\\\?\\D:\\a\\cabal\\cabal\\cabal-install\\tests\\IntegrationTests2\\regression\\3324\\q\\q.cabal": permission denied (Access is denied.)

Writing to that file is ok, is it somehow held open, so cannot be renameFiled to?

And how one can force closing etc. properly, so file can be restored?

@phadej phadej force-pushed the github-actions-windows branch 3 times, most recently from 0f8b288 to 8231402 Compare January 20, 2020 20:50
@Mistuke
Copy link
Collaborator

Mistuke commented Jan 20, 2020

@Mistuke what might cause

      Exception: tests\IntegrationTests2\regression/3324\q\q.cabal.backup: renameFile:renamePath:MoveFileEx "\\\\?\\D:\\a\\cabal\\cabal\\cabal-install\\tests\\IntegrationTests2\\regression\\3324\\q\\q.cabal.backup" Just "\\\\?\\D:\\a\\cabal\\cabal\\cabal-install\\tests\\IntegrationTests2\\regression\\3324\\q\\q.cabal": permission denied (Access is denied.)

Writing to that file is ok, is it somehow held open, so cannot be renameFiled to?

And how one can force closing etc. properly, so file can be restored?

Yeah, It's usually an indication that the file is open somewhere with an exclusive lock. The lock is only released when the last handle to the file is closed.

The handle may not be opened by you, it may be held by another process (antivirus, or indexing service for instance). I would look at whatever produced the backup file to see if closeHandle was actually called.

Things that remove/move files we tend to add a retry loop for haskell/hsc2hs@0f68aff it's short and in most cases won't loop, but if something has it locked it'll usually get freed pretty quickly.

@phadej
Copy link
Collaborator Author

phadej commented Jan 20, 2020

@Mistuke thanks for the hsc2hs link, that helpful (currently I just do nothing, as it's only tests, so if file isn't not reverted to the original, it's not a big issue).

Windows really makes some "easy" things really cumbersome.

@Mistuke
Copy link
Collaborator

Mistuke commented Jan 20, 2020

Windows really makes some "easy" things really cumbersome.

Yeah, it's all a consequence of layering over time. I tried to get some support for this in stuff like directory but some people have been rejecting the idea. I might just do it in Win32.

@phadej
Copy link
Collaborator Author

phadej commented Jan 20, 2020

there's removePathForcibly, that's already something. If there's similar-ish "best-effort" thing for moving files, it should be in directory (maybe not as renameFile). Reinventing things is very consuming.

@phadej phadej force-pushed the github-actions-windows branch from 8231402 to 6dba31f Compare January 20, 2020 23:02
@phadej phadej force-pushed the github-actions-windows branch from 6dba31f to 56197e1 Compare January 20, 2020 23:08
@phadej phadej merged commit 4026d57 into haskell:master Jan 21, 2020
@phadej phadej deleted the github-actions-windows branch January 21, 2020 08:45
@phadej phadej mentioned this pull request Jul 10, 2020
@phadej phadej added this to the 3.4.0.0-rc1 milestone Jul 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants