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.

paket 5.136.0 is not used in "magic" mode

See original GitHub issue

Description

Paket 5.136.0 is not used in “magic” mode.

Repro steps

  1. Download paket.bootstrapper.exe
  2. Run paket.botstrapper.exe
  3. Observe it downloads paket.exe 5.136.0
  4. Delete paket.exe
  5. Rename paket.bootstrapper.exe to paket.exe
  6. Run paket.exe
  7. Observe it runs paket.exe 5.135.0

Expected behavior

Expected running 5.136.0 in both cases.

Actual behavior

“Magic” mode still uses 5.135.0.

Known workarounds

Don’t use “magic” mode.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
vbfoxcommented, Feb 12, 2018

Essentially “It’s not a bug, it’s a feature” 😉

Updating on the internet is slow, and paket can run dozen of times during a build so the magic mode bootstrapper must ensure that it’s not slowing everything down. Also having the version change between 2 executions in the same build (or even manually) can wreck havok.

One of the way it does that is by forcing the --max-file-age= setting to 12 hours: If it finds a paket version that is more recent that 12 hours it will use it (And if it doesn’t and the version didn’t change it update the time so there is at most one check per 12 hours).

But there is also the weirdness of why the magic mode didn’t take your 5.136.0 version that the non-magic mode downloaded and put in the nuget cache. And it’s due to the magic mode having an additional cache specific to the magic mode (In windows Temp dir). This cache is theoretically removable now that the bootstrapper is hardened against parallel invocations but well let’s say I never really had the time to do it 😃

If you want it to always go to the network the following line can be added to paket.dependencies to force it to always check version:

version --max-file-age=0

Also for production deployments of paket I strongly suggest that you don’t let the version float and manually maintain it in your paket.dependencies (Also for repeatable builds and keeping all devs and CI in sync, same reason why the paket.lock file exists)

version 5.136.0
0reactions
forkicommented, Feb 13, 2018

@MiloszKrajewski any chance you could send a PR?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Paket/RELEASE_NOTES.md at master · fsprojects/Paket
A dependency manager for .NET with support for NuGet packages and Git repositories. - Paket/RELEASE_NOTES.md at master · fsprojects/Paket.
Read more >
release-notes
A dependency manager for .NET with support for NuGet packages and git repositories.
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