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

Output WHY a package wasn't updated to the latest version #786

Closed
forki opened this issue Apr 19, 2015 · 5 comments · Fixed by #999
Closed

Output WHY a package wasn't updated to the latest version #786

forki opened this issue Apr 19, 2015 · 5 comments · Fixed by #999

Comments

@forki
Copy link
Member

forki commented Apr 19, 2015

See fsprojects/FSharp.Formatting#301 (comment)

@forki
Copy link
Member Author

forki commented Aug 13, 2015

Create a paket.dependencies fie with the following content:

source https://www.nuget.org/api/v2/

nuget FAKE  3.37.1

then run paket update nuget FAKE.

We expect FAKE to be still on 3.37.1 but we want to see a message/warning that this not the latest since it's pinnend in the dependencies file.

@forki
Copy link
Member Author

forki commented Aug 13, 2015

And we should do the same for all packages when running paket update.

@mrinaldi
Copy link
Contributor

I'm wondering how we should output that.

I believe we should be a little more verbose on update but I'm not sure if it should be the default or we should have a flag for that.

This is a WIP:

Paket version 1.31.0.0
Updating Ninject.Extensions.Logging.Log4Net in D:\Projects\paket-test\paket.dependencies
Resolving packages:
 Resolving Ninject.Extensions.Logging.Log4Net  (from D:\Projects\paket-test\paket.dependencies)
 - Ninject.Extensions.Logging.Log4Net 3.2.3
 Resolving Ninject.Extensions.Logging >= 3.2.0.0 < 3.3.0.0 (from Ninject.Extensions.Logging.Log4Net 3.2.3)
 - Ninject.Extensions.Logging 3.2.3
  Ninject >= 3.2.0.0 < 3.3.0.0 (from Ninject.Extensions.Logging 3.2.3)
  Conflicts with:
    Ninject >= 2.2.0.0 < 2.3.0.0 (from Ninject.Extensions.Interception 2.2.1.2)
 - Ninject.Extensions.Logging 3.2.2
  Ninject >= 3.2.0.0 < 3.3.0.0 (from Ninject.Extensions.Logging 3.2.2)
  Conflicts with:
    Ninject >= 2.2.0.0 < 2.3.0.0 (from Ninject.Extensions.Interception 2.2.1.2)
 - Ninject.Extensions.Logging 3.2.1
  Ninject >= 3.2.0.0 < 3.3.0.0 (from Ninject.Extensions.Logging 3.2.1)
  Conflicts with:
    Ninject >= 2.2.0.0 < 2.3.0.0 (from Ninject.Extensions.Interception 2.2.1.2)
 - Ninject.Extensions.Logging 3.2.0
  Ninject >= 3.2.0.0 < 3.3.0.0 (from Ninject.Extensions.Logging 3.2.0)
  Conflicts with:
    Ninject >= 2.2.0.0 < 2.3.0.0 (from Ninject.Extensions.Interception 2.2.1.2)
 - Ninject.Extensions.Logging.Log4Net 3.2.2
  Ninject >= 3.2.0.0 < 3.3.0.0 (from Ninject.Extensions.Logging 3.2.3)
  Conflicts with:
    Ninject >= 2.2.0.0 < 2.3.0.0 (from Ninject.Extensions.Interception 2.2.1.2)
  Ninject >= 3.2.0.0 < 3.3.0.0 (from Ninject.Extensions.Logging 3.2.2)
  Conflicts with:
    Ninject >= 2.2.0.0 < 2.3.0.0 (from Ninject.Extensions.Interception 2.2.1.2)
  Ninject >= 3.2.0.0 < 3.3.0.0 (from Ninject.Extensions.Logging 3.2.1)
  Conflicts with:
    Ninject >= 2.2.0.0 < 2.3.0.0 (from Ninject.Extensions.Interception 2.2.1.2)
  Ninject >= 3.2.0.0 < 3.3.0.0 (from Ninject.Extensions.Logging 3.2.0)
  Conflicts with:
    Ninject >= 2.2.0.0 < 2.3.0.0 (from Ninject.Extensions.Interception 2.2.1.2)
 - Ninject.Extensions.Logging.Log4Net 3.2.1
  Ninject >= 3.2.0.0 < 3.3.0.0 (from Ninject.Extensions.Logging 3.2.3)
  Conflicts with:
    Ninject >= 2.2.0.0 < 2.3.0.0 (from Ninject.Extensions.Interception 2.2.1.2)
  Ninject >= 3.2.0.0 < 3.3.0.0 (from Ninject.Extensions.Logging 3.2.2)
  Conflicts with:
    Ninject >= 2.2.0.0 < 2.3.0.0 (from Ninject.Extensions.Interception 2.2.1.2)
  Ninject >= 3.2.0.0 < 3.3.0.0 (from Ninject.Extensions.Logging 3.2.1)
  Conflicts with:
    Ninject >= 2.2.0.0 < 2.3.0.0 (from Ninject.Extensions.Interception 2.2.1.2)
  Ninject >= 3.2.0.0 < 3.3.0.0 (from Ninject.Extensions.Logging 3.2.0)
  Conflicts with:
    Ninject >= 2.2.0.0 < 2.3.0.0 (from Ninject.Extensions.Interception 2.2.1.2)
 - Ninject.Extensions.Logging.Log4Net 3.2.0
  Ninject >= 3.2.0.0 < 3.3.0.0 (from Ninject.Extensions.Logging 3.2.3)
  Conflicts with:
    Ninject >= 2.2.0.0 < 2.3.0.0 (from Ninject.Extensions.Interception 2.2.1.2)
  Ninject >= 3.2.0.0 < 3.3.0.0 (from Ninject.Extensions.Logging 3.2.2)
  Conflicts with:
    Ninject >= 2.2.0.0 < 2.3.0.0 (from Ninject.Extensions.Interception 2.2.1.2)
  Ninject >= 3.2.0.0 < 3.3.0.0 (from Ninject.Extensions.Logging 3.2.1)
  Conflicts with:
    Ninject >= 2.2.0.0 < 2.3.0.0 (from Ninject.Extensions.Interception 2.2.1.2)
  Ninject >= 3.2.0.0 < 3.3.0.0 (from Ninject.Extensions.Logging 3.2.0)
  Conflicts with:
    Ninject >= 2.2.0.0 < 2.3.0.0 (from Ninject.Extensions.Interception 2.2.1.2)
 - Ninject.Extensions.Logging.Log4Net 3.0.1
 - Ninject.Extensions.Logging 3.0.1
  Ninject >= 3.0.0.0 < 3.1.0.0 (from Ninject.Extensions.Logging 3.0.1)
  Conflicts with:
    Ninject >= 2.2.0.0 < 2.3.0.0 (from Ninject.Extensions.Interception 2.2.1.2)
 - Ninject.Extensions.Logging.Log4Net 2.2.0.4
 - Ninject.Extensions.Logging 2.2.0.4
 Resolving Ninject >= 2.2.0.0 < 2.3.0.0 (from Ninject.Extensions.Logging 2.2.0.4)
 - Ninject 2.2.1.4
 Resolving log4net >= 1.0.4 (from Ninject.Extensions.Logging.Log4Net 2.2.0.4)
 - log4net 2.0.3
Paket failed with:
        Could not update package: ninject.extensions.logging.log4net
    Ninject >= 3.2.0.0 < 3.3.0.0 (from Ninject.Extensions.Logging 3.2.3)
      Ninject >= 2.2.0.0 < 2.3.0.0 (from Ninject.Extensions.Interception 2.2.1.2)

    Ninject >= 3.0.0.0 < 3.1.0.0 (from Ninject.Extensions.Logging 3.0.1)
      Ninject >= 2.2.0.0 < 2.3.0.0 (from Ninject.Extensions.Interception 2.2.1.2)

Note that this is as verbose as it can be. The regular use case probably won't be that verbose.

This is what has been added:

Before listing the package and version, it outputs why it's resolving that. For example:
From paket.dependencies:
Resolving Ninject.Extensions.Logging.Log4Net (from D:\Projects\paket-test\paket.dependencies)

From a top-level package:
Resolving Ninject.Extensions.Logging >= 3.2.0.0 < 3.3.0.0 (from Ninject.Extensions.Logging.Log4Net 3.2.3)

Everytime it finds a conflict, it outputs the package it's trying to resolve and the package it has conflicted to:

  Ninject >= 3.2.0.0 < 3.3.0.0 (from Ninject.Extensions.Logging 3.2.3)
  Conflicts with:
    Ninject >= 2.2.0.0 < 2.3.0.0 (from Ninject.Extensions.Interception 2.2.1.2)

This one is a warning (yellow) output.

In case it can't update anything, it will fail with:

Paket failed with:
        Could not update package: ninject.extensions.logging.log4net
    Ninject >= 3.2.0.0 < 3.3.0.0 (from Ninject.Extensions.Logging 3.2.3)
      Ninject >= 2.2.0.0 < 2.3.0.0 (from Ninject.Extensions.Interception 2.2.1.2)

    Ninject >= 3.0.0.0 < 3.1.0.0 (from Ninject.Extensions.Logging 3.0.1)
      Ninject >= 2.2.0.0 < 2.3.0.0 (from Ninject.Extensions.Interception 2.2.1.2)

Note that the failing message will only be shown if the paket.lock has not been changed (no package has been updated at all). In addition, it will now show all conflicts but one conflict per package/version pair.

However, if a package is updated but not to the lastest version, it will be reported as a warning conflict but paket will not fail.

Let me know what you think and how I should proceed from there.

@mrinaldi
Copy link
Contributor

Hey @forki, do you have any thoughts on my previous comment?

@forki
Copy link
Member Author

forki commented Aug 24, 2015

we already have -v flag for verbose mode. We should only trace the most useful information during normal runs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants