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

Restore with local override fails when run multiple times #2755

Closed
lexarchik opened this issue Sep 11, 2017 · 8 comments · Fixed by #2770
Closed

Restore with local override fails when run multiple times #2755

lexarchik opened this issue Sep 11, 2017 · 8 comments · Fixed by #2770

Comments

@lexarchik
Copy link
Contributor

paket-local.zip

Similar to #2690 but IO Exception with packages folder instead of global cache.
Paket version 5.93.1
Repro:
unpack zip and run paket restore multiple times.

Paket failed with
-> IOException: The file 'Z:\paket-local\packages\packageA\packageA.1.0.nupkg' already exists.
@batzen
Copy link
Contributor

batzen commented Sep 15, 2017

This seems to be related to #2731 and should be fixed if #2734 gets merged.

@lexarchik
Copy link
Contributor Author

but #2734 already merged in 5.93.1

@batzen
Copy link
Contributor

batzen commented Sep 15, 2017

oh, missed that... sorry. then it's something different.
i am also experiencing this issue...

@batzen
Copy link
Contributor

batzen commented Sep 15, 2017

PS C:\DEV\OSS_Own\FluentRibbon\Fluent.Ribbon> .\.paket\paket.exe restore --verbose
Paket version 5.96.2
found: C:\DEV\OSS_Own\FluentRibbon\Fluent.Ribbon\paket.dependencies
paket.local override: nuget ControlzEx group Main -> C:\DEV\OSS_Own\ControlzEx\Publish version 4.0.0
Parsing C:\DEV\OSS_Own\FluentRibbon\Fluent.Ribbon\paket.dependencies
NUnit.Console 3.7 already downloaded.
NUnit 3.7.1 already downloaded.
MahApps.Metro 1.5 already downloaded.
NUnit.ConsoleRunner 3.7 already downloaded.
7-Zip.CommandLine 9.20 already downloaded.
NuGet.CommandLine 4.1 already downloaded.
gitlink 2.4 already downloaded.
NUnit.Console 3.7 unzipped to C:\DEV\OSS_Own\FluentRibbon\Fluent.Ribbon\packages\NUnit.Console
NUnit.Extension.NUnitProjectLoader 3.6 already downloaded.
7-Zip.CommandLine 9.20 unzipped to C:\DEV\OSS_Own\FluentRibbon\Fluent.Ribbon\packages\7-Zip.CommandLine
NUnit.Extension.NUnitV2Driver 3.7 already downloaded.
NUnit.Extension.NUnitProjectLoader 3.6 unzipped to C:\DEV\OSS_Own\FluentRibbon\Fluent.Ribbon\packages\NUnit.Extension.NUnitProjectLoader
NUnit.Extension.NUnitV2ResultWriter 3.6 already downloaded.
ControlzEx 4.0.0 unzipped to C:\DEV\OSS_Own\FluentRibbon\Fluent.Ribbon\packages\ControlzEx
NUnit.Extension.TeamCityEventListener 1.0.2 already downloaded.
gitlink 2.4 unzipped to C:\DEV\OSS_Own\FluentRibbon\Fluent.Ribbon\packages\gitlink
NUnit.Extension.VSProjectLoader 3.6 already downloaded.
NUnit.ConsoleRunner 3.7 unzipped to C:\DEV\OSS_Own\FluentRibbon\Fluent.Ribbon\packages\NUnit.ConsoleRunner
StyleCop.Analyzers 1.0.2 already downloaded.
NuGet.CommandLine 4.1 unzipped to C:\DEV\OSS_Own\FluentRibbon\Fluent.Ribbon\packages\NuGet.CommandLine
XamlColorSchemeGenerator 1.0 already downloaded.
NUnit.Extension.NUnitV2ResultWriter 3.6 unzipped to C:\DEV\OSS_Own\FluentRibbon\Fluent.Ribbon\packages\NUnit.Extension.NUnitV2ResultWriter
NUnit.Extension.TeamCityEventListener 1.0.2 unzipped to C:\DEV\OSS_Own\FluentRibbon\Fluent.Ribbon\packages\NUnit.Extension.TeamCityEventListener
NUnit.Extension.NUnitV2Driver 3.7 unzipped to C:\DEV\OSS_Own\FluentRibbon\Fluent.Ribbon\packages\NUnit.Extension.NUnitV2Driver
NUnit.Extension.VSProjectLoader 3.6 unzipped to C:\DEV\OSS_Own\FluentRibbon\Fluent.Ribbon\packages\NUnit.Extension.VSProjectLoader
MahApps.Metro 1.5 unzipped to C:\DEV\OSS_Own\FluentRibbon\Fluent.Ribbon\packages\MahApps.Metro
StyleCop.Analyzers 1.0.2 unzipped to C:\DEV\OSS_Own\FluentRibbon\Fluent.Ribbon\packages\StyleCop.Analyzers
XamlColorSchemeGenerator 1.0 unzipped to C:\DEV\OSS_Own\FluentRibbon\Fluent.Ribbon\packages\XamlColorSchemeGenerator
NUnit 3.7.1 unzipped to C:\DEV\OSS_Own\FluentRibbon\Fluent.Ribbon\packages\NUnit
Performance:
 - Disk IO: 1 second
 - Runtime: 1 second
PS C:\DEV\OSS_Own\FluentRibbon\Fluent.Ribbon> .\.paket\paket.exe restore --verbose
Paket version 5.96.2
found: C:\DEV\OSS_Own\FluentRibbon\Fluent.Ribbon\paket.dependencies
paket.local override: nuget ControlzEx group Main -> C:\DEV\OSS_Own\ControlzEx\Publish version 4.0.0
Parsing C:\DEV\OSS_Own\FluentRibbon\Fluent.Ribbon\paket.dependencies
NUnit 3.7.1 already downloaded.
NUnit.ConsoleRunner 3.7 already downloaded.
gitlink 2.4 already downloaded.
7-Zip.CommandLine 9.20 already downloaded.
NuGet.CommandLine 4.1 already downloaded.
MahApps.Metro 1.5 already downloaded.
NUnit 3.7.1 already copied
MahApps.Metro 1.5 already copied
NUnit.Console 3.7 already downloaded.
NUnit.Console 3.7 already copied
gitlink 2.4 already copied
7-Zip.CommandLine 9.20 already copied
NUnit.Console 3.7 already extracted
NuGet.CommandLine 4.1 already copied
7-Zip.CommandLine 9.20 already extracted
NUnit.ConsoleRunner 3.7 already copied
NUnit 3.7.1 already extracted
gitlink 2.4 already extracted
NUnit.Extension.NUnitProjectLoader 3.6 already downloaded.
NUnit.Extension.NUnitV2Driver 3.7 already downloaded.
NUnit.Extension.NUnitV2ResultWriter 3.6 already downloaded.
NUnit.Extension.NUnitProjectLoader 3.6 already copied
MahApps.Metro 1.5 already extracted
NUnit.Extension.NUnitProjectLoader 3.6 already extracted
NUnit.Extension.TeamCityEventListener 1.0.2 already downloaded.
NUnit.Extension.NUnitV2Driver 3.7 already copied
NUnit.Extension.TeamCityEventListener 1.0.2 already copied
NuGet.CommandLine 4.1 already extracted
NUnit.ConsoleRunner 3.7 already extracted
NUnit.Extension.TeamCityEventListener 1.0.2 already extracted
StyleCop.Analyzers 1.0.2 already downloaded.
NUnit.Extension.VSProjectLoader 3.6 already downloaded.
NUnit.Extension.NUnitV2ResultWriter 3.6 already copied
XamlColorSchemeGenerator 1.0 already downloaded.
StyleCop.Analyzers 1.0.2 already copied
NUnit.Extension.VSProjectLoader 3.6 already copied
NUnit.Extension.VSProjectLoader 3.6 already extracted
Something went wrong while downloading ControlzEx 4.0.0
Message: The file 'C:\DEV\OSS_Own\FluentRibbon\Fluent.Ribbon\packages\ControlzEx\ControlzEx.4.0.0.nupkg' already exists.
  ==> Trying again
XamlColorSchemeGenerator 1.0 already copied
NUnit.Extension.NUnitV2Driver 3.7 already extracted
NUnit.Extension.NUnitV2ResultWriter 3.6 already extracted
XamlColorSchemeGenerator 1.0 already extracted
StyleCop.Analyzers 1.0.2 already extracted
Something went wrong while downloading ControlzEx 4.0.0
Message: The file 'C:\DEV\OSS_Own\FluentRibbon\Fluent.Ribbon\packages\ControlzEx\ControlzEx.4.0.0.nupkg' already exists.
  ==> Last trial
Performance:
 - Disk IO: 255 milliseconds
 - Runtime: 1 second
Paket failed with
-> IOException: The file 'C:\DEV\OSS_Own\FluentRibbon\Fluent.Ribbon\packages\ControlzEx\ControlzEx.4.0.0.nupkg' already exists.
   StackTrace:
        at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
        at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
        at [email protected](Unit unitVar)
        at [email protected](AsyncParams`1 args)
     --- End of stack trace from previous location where exception was thrown ---
        at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
        at Microsoft.FSharp.Control.AsyncBuilderImpl.commit[a](AsyncImplResult`1 res)
        at Microsoft.FSharp.Control.CancellationTokenOps.RunSynchronouslyInCurrentThread[a](CancellationToken token, FSharpAsync`1 computation)
        at Microsoft.FSharp.Control.CancellationTokenOps.RunSynchronously[a](CancellationToken token, FSharpAsync`1 computation, FSharpOption`1 timeout)
        at Microsoft.FSharp.Control.FSharpAsync.RunSynchronously[T](FSharpAsync`1 computation, FSharpOption`1 timeout, FSharpOption`1 cancellationToken)
        at [email protected](Unit unitVar0)
        at Paket.Utils.RunInLockedAccessMode[a](String rootFolder, FSharpFunc`2 action)
        at Paket.RestoreProcess.Restore(String dependenciesFileName, FSharpOption`1 projectFile, Boolean force, FSharpOption`1 group, FSharpList`1 referencesFileNames, Boolean ignoreChecks, Boolean failOnChecks, FSharpOption`1 targetFrameworks)
        at [email protected](ParseResults`1 results)
        at Paket.Program.processWithValidationEx$cont@37[a](Boolean silent, FSharpFunc`2 commandF, a result, Unit unitVar)
        at Paket.Program.processWithValidation[T](Boolean silent, FSharpFunc`2 validateF, FSharpFunc`2 commandF, ParseResults`1 result)
        at Paket.Program.handleCommand(Boolean silent, Command command)
        at Paket.Program.main()

@lexarchik
Copy link
Contributor Author

it seems restore also fails after disabling local override, but in this time with IOException in ~/.nuget

@lexarchik
Copy link
Contributor Author

lexarchik commented Sep 16, 2017

Also there is weird problem with .nupkg naming
If package has version "1.0" in lock file then normal restore copy to "packages" file package.1.0.0.nupgk
but local-overrided restore copy file package.1.0.nupkg, does not extract it and does not display any errors.

@batzen
Copy link
Contributor

batzen commented Sep 16, 2017

It's not only that.
paket.local seems to be totally broken. Even though the nupk file gets copied nothing in "lib" etc. gets replaced by it's contents.

Even regular restore seems to be broken, at least from what i expect it to do... If you delete some directories/components in "packages" in previous versions and called "restore" those directories/components got restored. Now they are not restored anymore...

@lexarchik
Copy link
Contributor Author

Hmm. I think check/restore content of packages/packagename folder in every restore is too slow. I like restore speed of new paket versions and skipping manually corrupted packages in packages folder is small price for that speed.

But restore errors on enabling/disabling local overriding is annoying problem:(

lexarchik pushed a commit to lexarchik/Paket that referenced this issue Sep 16, 2017
matthid added a commit that referenced this issue Sep 17, 2017
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 a pull request may close this issue.

2 participants