Failed to Lock when fetching lib#1149
Conversation
|
Ok it´s path related. I believe its long path or the space on the user name that cause the issue. |
|
Seems like we sometimes leave those lock files around on aborted dub runs, maybe related to a CTRL+C abort (which doesn't cleanup). So far we didn't have any reported issues with https://github.com/dlang/druntime/blob/2db828bd4f21807254b770b3ec304f14596a9805/src/rt/cover.d#L399, so that could make a better replacement. |
|
Dub's current lockFile is here. |
- get rid of lingering locks by replacing FS locks with OS locks The get freed on process termination. On the downside we can't delete the lock files without a race.
|
Thanks for your pull request, @MartinNowak! |
source/dub/internal/utils.d
Outdated
| string path; | ||
| } | ||
| import std.datetime, std.stdio : File; | ||
| import std.algorithm.mutation : move; |
There was a problem hiding this comment.
Fails on 2.066 and below -> std.algorithm : move
|
Looks good. I can also confirm that I ran into this a few times when I cancelled a package download using Ctrl+C. |
- get rid of lingering locks by replacing FS locks with OS locks The get freed on process termination. On the downside we can't delete the lock files without a race.
|
Yikes, stupid dlang/dlang-bot#69, hope the tests will be all right. |

Windows 10
Dub: 1.3.0
cmd: dub run --build=debug --arch=x86 --compiler=dmd
Maybe is relate to long path names?