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

NU1103 error message lists oldest versions, not newest versions #6658

Closed
natemcmaster opened this issue Mar 9, 2018 · 3 comments · Fixed by NuGet/NuGet.Client#2189
Closed
Assignees
Labels
Area:ErrorHandling warnings and errors/log messages & related error codes. Priority:1 High priority issues that must be resolved in the current sprint.
Milestone

Comments

@natemcmaster
Copy link

Follow-up to in-person meeting about https://github.com/dotnet/cli/issues/8485

The error message when restoring using wildcards shows the oldest version of the package, not the newest.

Repro

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="dotnet-watch" Version="*" />
  </ItemGroup>

</Project>

dotnet restore

We have two versions of dotnet-watch on nuget.org right now, 2.1.0-preview1-final, and 0.0.1-alpha.

0.0.1-alpha was a placeholder to squat on the package name, and is unlisted on nuget.org, so we would like to see 2.1.0-preview1-final in the error message instead.

Expected

/private/tmp/test1/test1.csproj : error NU1103: Unable to find a stable package dotnet-watch with version 
/private/tmp/test1/test1.csproj : error NU1103:   - Found 2 version(s) in nuget.org [ Nearest version: 2.1.0-preview1-final ]

Actual

/private/tmp/test1/test1.csproj : error NU1103: Unable to find a stable package dotnet-watch with version 
/private/tmp/test1/test1.csproj : error NU1103:   - Found 2 version(s) in nuget.org [ Nearest version: 0.0.1-alpha ]

@nkolev92

@nkolev92 nkolev92 added the Area:ErrorHandling warnings and errors/log messages & related error codes. label Mar 9, 2018
@nkolev92 nkolev92 added this to the Backlog milestone Mar 9, 2018
@nkolev92 nkolev92 added the Priority:1 High priority issues that must be resolved in the current sprint. label Mar 9, 2018
@nkolev92
Copy link
Member

nkolev92 commented Mar 9, 2018

This is definitely a bug.
I managed to reproduce it.
It's not a regression.

The related code is here.

It doesn't consider floating versions.

The fix should be minor, but need to do a further analysis to confirm that.

/cc @rrelyea
I assume we want this fixed soon?

Should it go for .300 version?
What would the right timeline there.

/cc @livarcocc @wli3 @KathleenDollard

@livarcocc
Copy link

I vote for .300 version of the CLI.

@KathleenDollard
Copy link

I agree with @livarcocc on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area:ErrorHandling warnings and errors/log messages & related error codes. Priority:1 High priority issues that must be resolved in the current sprint.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants