-
-
Notifications
You must be signed in to change notification settings - Fork 228
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?