question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make restore command check if dependencies and lock file are in sync

See original GitHub issue

This may be an issue in Paket.VisualStudio in fact so i’ll post in both and well see where it goes

Description

Open a project with changes on Paket.dependencies does not impact paket.lock The Idea should be : When you get the Latest source control version, open it and rebuild it (the solution). You should be using the “dependencies” version, even if it means updation paket.lock (see repro step)

Repro steps

Please provide the steps required to reproduce the problem

  1. Create a solution that use paket and where paket.dependencies have something like : nuget MyLib 1.0

    paket install

The paket.lock is created, Build your solution and the close Visual Studio 2. To simulation a change on SourceControl open your “paket.dependencies” and change it : nuget MyLib 2.0

  1. Re open your solution in Visual Studio Try to rebuild all … You’ll see that “paket.lock” did not took the v2.0 of the lib but is still using 1.0 But paket.dependencies indicate v2.0

Expected behavior

Please provide a description of the behavior you expect.

Actual behavior

Known workarounds

Force “Install manually” when you open the solution (it’s a bit f*** up right ?)

Related information

  • Operating system : Win10
  • Release 3.1.9
  • Lastest Vs Extension also
  • .NET Framework 4.5.x

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:40 (33 by maintainers)

github_iconTop GitHub Comments

1reaction
matthidcommented, Jun 23, 2016

@tebeco What nobody has said jet: You should really add the lockfile to your source control if it isn’t (and your report sounds like it isn’t). That way you get exactly the same version as the one running paket update or paket install. That’s really the way to use paket. There is never a reason to not have the lockfile added to your source control. Plus what @baronfel has already said. You cannot expect paket to do something differently when neither paket install nor paket update has been called. That’s exactly the advantage paket tries to deliver.

This issue shows that throwing an error is probably the better default behavior (but imho its wrong because restore should not need to read paket.dependencies).

0reactions
forkicommented, Jun 27, 2016

yes sorry.

I changed ti to print a warning instead of failing the restore. I will continue to fix the out-of-date check. Sorry for causing so much trouble,

337407

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enable repeatable package restore using lock file
If the lock file is out of sync, restore command will update the lock file with the latest resolved closure of packages.
Read more >
paket restore
dependencies and paket.lock are in sync --fail-on-checks abort if any checks fail --group, -g <name> restore dependencies of a single group -- ...
Read more >
How To Align package.json and package-lock.json When ...
How align package.json and package-lock.json where dependency versions are out of sync? Regenerate the package-lock. Example: npm init -- ...
Read more >
Managing the Project Lock File
This recipe addresses the question of whether or not you should check in the project.lock.json file that is generated when you execute the...
Read more >
Getting Started with Paket – Part 1 - The Cockney Coder
Remember that since paket automatically checks if the lock and dependencies file are out of sync (which they now are), it will automatically ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found