FubuMvcArchive / ripple

Super charged dependency management with Nuget without the merge hell
http://fubuworld.com/ripple
Other
45 stars 35 forks source link

Better support for locked files #204

Closed SimonCropp closed 6 years ago

SimonCropp commented 11 years ago

We use MSBuild tasks fairly heavily. This means that while we have VisualStudio open those files will be locked.

So if a ripple restore is attempted it fails with the following error

  ========================
  String: Error occurred: 
  ========================

  An unhandled exception occurred:
  Exception:
  Detected locked files. Exiting.
  StackTrace:
     at ripple.RippleAssert.Fail(String message, Object[] substitutions) in c:\Code\ripple\src\ripple\RippleAssert.cs:line 22
     at ripple.Model.Solution.AssertNoLockedFiles() in c:\Code\ripple\src\ripple\Model\Solution.cs:line 535
     at ripple.Steps.ExplodeDownloadedNugets.Execute(RippleInput input, IRippleStepRunner runner) in c:\Code\ripple\src\ripple\Steps\ExplodeDownloadedNugets.cs:line 17
     at ripple.RippleOperation.Execute(Boolean throwOnFailure) in c:\Code\ripple\src\ripple\RippleOperation.cs:line 96
     at ripple.Commands.RestoreCommand.Execute(RestoreInput input) in c:\Code\ripple\src\ripple\Commands\RestoreCommand.cs:line 67
     at ripple.RippleOperation.CommandExecutionExpression.Execute[TInput,TCommand](TInput input, TCommand command) in c:\Code\ripple\src\ripple\RippleOperation.cs:line 202

The interesting thing here is that the files that are locked are actually all correct. They dont need to be restored.

Now this is valid however I think it can be handled better.

How about only trying to replace nuget files if the combined hash of those files differ?

jmarnold commented 11 years ago

I think we are a little aggressive about the check right now. Perhaps simply changing it to assert against the directories and packages being restored? Right now the restore command blindly says "If anything is locked (regardless of if I have to do anything).

On Tue, Sep 24, 2013 at 12:50 AM, Simon Cropp notifications@github.comwrote:

We use MSBuild tasks fairly heavily. This means that while we have VisualStudio open those files will be locked.

So if a ripple restore is attempted it fails with the following error

======================== String: Error occurred:

An unhandled exception occurred: Exception: Detected locked files. Exiting. StackTrace: at ripple.RippleAssert.Fail(String message, Object[] substitutions) in c:\Code\ripple\src\ripple\RippleAssert.cs:line 22 at ripple.Model.Solution.AssertNoLockedFiles() in c:\Code\ripple\src\ripple\Model\Solution.cs:line 535 at ripple.Steps.ExplodeDownloadedNugets.Execute(RippleInput input, IRippleStepRunner runner) in c:\Code\ripple\src\ripple\Steps\ExplodeDownloadedNugets.cs:line 17 at ripple.RippleOperation.Execute(Boolean throwOnFailure) in c:\Code\ripple\src\ripple\RippleOperation.cs:line 96 at ripple.Commands.RestoreCommand.Execute(RestoreInput input) in c:\Code\ripple\src\ripple\Commands\RestoreCommand.cs:line 67 at ripple.RippleOperation.CommandExecutionExpression.Execute[TInput,TCommand](TInput input, TCommand command) in c:\Code\ripple\src\ripple\RippleOperation.cs:line 202

The interesting thing here is that the files that are locked are actually all correct. They dont need to be restores?

Now this is valid however I think it can be handled better.

How about only trying to replace nuget files if the combined hash of those files differ?

— Reply to this email directly or view it on GitHubhttps://github.com/DarthFubuMVC/ripple/issues/204 .