Paket icon indicating copy to clipboard operation
Paket copied to clipboard

paket remove nuget does also a general unwanted update

Open FrenchMigVaz opened this issue 10 years ago • 13 comments

Description

Given a repository with no Groups and with several nuget package references with some of them being outdated

When a paket remove nuget XXX is done to delete definitely a reference, paket also does a full update on every other package

Then everything is messed up

Repro steps

  1. On a repository that has several outdated nuget references
  2. Call paket remove nuget XXX

Expected behavior

The package XXX is removed from paket.dependencies and paket.lock

Actual behavior

The package XXX is removed from paket.dependencies and paket.lock And outdated packages are updated to latest version

Known workarounds

Is deleting the given package lines in paket.dependencies and lock good enough? I don't think so.

Related information

  • Win 7
  • master
  • .NET 4.6
  • paket.exe 2.63.2.0

FrenchMigVaz avatar Apr 28 '16 12:04 FrenchMigVaz

can you please create a zip with a repro?

forki avatar May 02 '16 16:05 forki

Could not repro without our Artifactory instance and private packages with 2.63.2.0

FrenchMigVaz avatar May 03 '16 08:05 FrenchMigVaz

paket runs install after remove and tries to keep versions as stable as possible. Are you using prereleases or unlisted versions?

forki avatar May 03 '16 08:05 forki

We do use prereleases: nuget CommandLineParser prerelease

I have tried to repro with nuget.org and this prerelease, but it still does not repro on a dummy repo.

What do you mean by unlisted versions?

FrenchMigVaz avatar May 03 '16 09:05 FrenchMigVaz

it's possible to "delete" versions by unlisting them. If a version is unlisted then paket will try to use a different version during install.

forki avatar May 03 '16 09:05 forki

Thanks for the explanation, as far as I know we never delete package versions in our private server

FrenchMigVaz avatar May 03 '16 09:05 FrenchMigVaz

the question is why install changes the dependencies for you, but without a repro it's really hard to say.

forki avatar May 03 '16 09:05 forki

I can only repro this with our big codebase and its 70 custom packages, including 2 prereleases, using exclusively Artifactory v2.7 as source. I think we can close this as not repro.

FrenchMigVaz avatar May 03 '16 09:05 FrenchMigVaz

I had another case of this today where removing a prerelease paket did cause a full update in v2; but it worked fine in v3 without causing a full update. It looks like this issue has been fixed in v3, maybe as side effect of other changes in this area.

cdrnet avatar May 31 '16 06:05 cdrnet

Yeah we worked a bit in this and I hope it's fine when we finally go to v3

forki avatar May 31 '16 07:05 forki

This issue still reproducible with latest Paket (3.19.8.0) and scoobadog/Paket-1652 repository.

Here is the output from paket remove nuget Autofac command:

Paket version 3.19.8.0
Removing Package Autofac from C:\Temp\ClassLibrary1\ClassLibrary1\paket.references
References file saved to C:\Temp\ClassLibrary1\ClassLibrary1\paket.references
Removing Autofac from C:\Temp\ClassLibrary1\paket.dependencies (group Main)
Dependencies files saved to C:\Temp\ClassLibrary1\paket.dependencies
Resolving packages for group Main:
 - Newtonsoft.Json 9.0.1
 - System.Runtime.Serialization.Primitives 4.1.1
 - System.IO 4.1.0
 - System.Linq 4.1.0
 - System.Linq.Expressions 4.1.0
 - System.Reflection 4.1.0
 - System.Runtime 4.1.0
 - System.Runtime.Extensions 4.1.0
 - System.Text.RegularExpressions 4.1.0
 - System.ObjectModel 4.0.12
 - System.Collections 4.0.11
 - System.Diagnostics.Debug 4.0.11
 - System.Dynamic.Runtime 4.0.11
 - System.Globalization 4.0.11
 - System.Text.Encoding 4.0.11
 - System.Text.Encoding.Extensions 4.0.11
 - System.Threading 4.0.11
 - System.Threading.Tasks 4.0.11
 - System.Xml.ReaderWriter 4.0.11
 - System.Xml.XDocument 4.0.11
 - Microsoft.CSharp 4.0.1
 - System.Reflection.Extensions 4.0.1
 - System.Resources.ResourceManager 4.0.1
 - System.Reflection.TypeExtensions 4.1.0
 - System.Runtime.InteropServices 4.1.0
 - System.Reflection.Primitives 4.0.1
 - System.Reflection.Emit 4.0.1
 - System.Reflection.Emit.ILGeneration 4.0.1
 - System.IO.FileSystem 4.0.1
 - System.IO.FileSystem.Primitives 4.0.1
 - System.Diagnostics.Tools 4.0.1
 - System.Reflection.Emit.Lightweight 4.0.1
 - System.Threading.Tasks.Extensions 4.0.0
 - Microsoft.NETCore.Platforms 1.0.1
 - Microsoft.NETCore.Targets 1.0.2
     unlisted
 - Microsoft.NETCore.Targets 1.0.1
 - System.Runtime.Handles 4.0.1
Locked version resolution written to C:\Temp\ClassLibrary1\paket.lock
Downloading Microsoft.NETCore.Targets 1.0.1
Downloading Microsoft.CSharp 4.0.1
Downloading Microsoft.NETCore.Platforms 1.0.1
Downloading System.Diagnostics.Tools 4.0.1
Downloading System.Dynamic.Runtime 4.0.11
Downloading System.Globalization 4.0.11
Downloading System.IO.FileSystem 4.0.1
Downloading System.IO.FileSystem.Primitives 4.0.1
Downloading System.Linq.Expressions 4.1.0
Downloading System.ObjectModel 4.0.12
Downloading System.Reflection 4.1.0
Downloading System.Reflection.Emit 4.0.1
Downloading System.Reflection.Emit.ILGeneration 4.0.1
Downloading System.Reflection.Emit.Lightweight 4.0.1
Downloading System.Reflection.Extensions 4.0.1
Downloading System.Reflection.Primitives 4.0.1
Downloading System.Reflection.TypeExtensions 4.1.0
Downloading System.Runtime.Handles 4.0.1
Downloading System.Runtime.Serialization.Primitives 4.1.1
Downloading System.Text.Encoding 4.0.11
Downloading System.Text.Encoding.Extensions 4.0.11
Downloading System.Text.RegularExpressions 4.1.0
Downloading System.Threading.Tasks 4.0.11
Downloading System.Threading.Tasks.Extensions 4.0.0
Downloading System.Xml.ReaderWriter 4.0.11
Downloading System.Xml.XDocument 4.0.11
Garbage collecting Autofac

0x022b avatar Sep 26 '16 10:09 0x022b

Seeing this here too.

jamescrowley avatar Oct 28 '16 11:10 jamescrowley

thanks for repoting a repro sample

forki avatar Oct 28 '16 14:10 forki