-
Notifications
You must be signed in to change notification settings - Fork 525
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
Fix #3410 - UnauthorizedAccessException writing to MyProject.paket.references.cached #3617
Fix #3410 - UnauthorizedAccessException writing to MyProject.paket.references.cached #3617
Conversation
Can you please take a look at the CI errors? Thx |
Hmmm. I can't reproduce the Windows failure, nor the Linux failure on Mono 4.6. I'll try grab latest Mono (5.x) and see if I can figure anything out. |
There seems to be a bug of some kind in Mono 5 where set_IsReadOnly throws an exception because the existing set of attributes is -1. In any event, file-read-only is really just a Windows concept. .NET only emulates it on *nix by adjusting the file write permission (chmod -w).
The core issue seems to be a bug in Mono where I haven't managed to cleanly reproduce, and it seems odd to be messing with read-only on Linux, since read-only is actually a Windows thing. On Linux and macOS, Mono and .NET Core emulate the read-only bit by adjusting the file write bits. As such, I've locked the file-read-only behavior to Windows only, which is probably the only place where this sort of bug would be legitimately encountered anyway. |
It's still red on the appveyor. |
|
Yeah, looking into it now. Do you have any idea why another test is also failing with a readonly file error? I'm not familiar with the internal test infrastructure or if there are dependencies between tests / dirty state / etc. |
the other one may be unrelated |
🤞 it'll be good now |
@forki any idea what's with integration test |
It says:
|
I can see that, but I cannot for the life of me figure out why. Are tests run in parallel, perhaps? |
I can't even reproduce it locally anymore. 😢 |
Same problem and that project is also .net core project😫 |
@forki fixed appveyor 😄 |
thanks!!! |
Root cause as discussed in #3410 - a source control system that marks
paket.references
as read-only.I mostly made the integration test by copying it from the one above. It fails without the changes from the second commit, and passes with them. 😃
I made two changes:
obj\foo.csproj.paket.references.cached
we clear the read-only flag, so that Paket can upgrade from a broken version without issue.obj\foo.csproj.paket.references.cached
we clear the read-only flag, so that this doesn't re-occur, and so none of the intermediaryobj
files are read-only.