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

paket pack adds wrong prerelease dependency #2024

Closed
tpluscode opened this Issue Nov 17, 2016 · 6 comments

Comments

Projects
None yet
2 participants
@tpluscode
Contributor

tpluscode commented Nov 17, 2016

Description

When paket.lock includes a prerelease package paket pack command adds wrong dependency version to the .nupkg file

Repro steps

  1. Install a prerelease package. Sample entry paket.dependencies:
nuget Nancy prerelease
  1. Create a minimal paket.template
type project
version 0.1
authors tpluscode
  1. Build Release
  2. Create package:
paket pack output nugets

Repro here

Expected behavior

The reference should be >= 2.0.0-barneyrubble

Actual behavior

Actual reference in .nupkg is listed as <dependency id="Nancy" version="0.0.0-prerelease" />

Known workarounds

Adding these lines to paket.template solves the issue

dependencies
  Nancy >= LOCKEDVERSION
@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Nov 18, 2016

Member

If you remove the prerelease in the deps file you will get:

  <dependency id="Nancy" />

which basically means > 0 (but not prerelease).

0.0.0-prerelease is actually ny design. What's wrong with it?

Member

forki commented Nov 18, 2016

If you remove the prerelease in the deps file you will get:

  <dependency id="Nancy" />

which basically means > 0 (but not prerelease).

0.0.0-prerelease is actually ny design. What's wrong with it?

@tpluscode

This comment has been minimized.

Show comment
Hide comment
@tpluscode

tpluscode Nov 18, 2016

Contributor

So 0.0.0-prerelease will install any latest prerelease version, be it 2.0 or 3.0 or whatever?

Contributor

tpluscode commented Nov 18, 2016

So 0.0.0-prerelease will install any latest prerelease version, be it 2.0 or 3.0 or whatever?

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Nov 18, 2016

Member

that's what I hope. yes

Member

forki commented Nov 18, 2016

that's what I hope. yes

@tpluscode

This comment has been minimized.

Show comment
Hide comment
@tpluscode

tpluscode Nov 18, 2016

Contributor

I don't think it's good design. It works when installed with Paket but most consumers will use NuGet that comes with VS.

With NuGet Package Manager the only way to install the desired version 2.0.0-prerelease is use the Dependency behavior to Highest. Unfortunately that installs prerelease versions of all transitive packages. Selecting Highest Patch or Highest Minor installs 0.4 and 0.23 respectively.

Contributor

tpluscode commented Nov 18, 2016

I don't think it's good design. It works when installed with Paket but most consumers will use NuGet that comes with VS.

With NuGet Package Manager the only way to install the desired version 2.0.0-prerelease is use the Dependency behavior to Highest. Unfortunately that installs prerelease versions of all transitive packages. Selecting Highest Patch or Highest Minor installs 0.4 and 0.23 respectively.

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Nov 18, 2016

Member

ok. but that's just Nuget being dumb.

Member

forki commented Nov 18, 2016

ok. but that's just Nuget being dumb.

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Nov 18, 2016

Member

but that said: I thing we could change it to >= LOCKEDVERSION

for prereleases this would make sense

Member

forki commented Nov 18, 2016

but that said: I thing we could change it to >= LOCKEDVERSION

for prereleases this would make sense

@forki forki closed this in 004e83e Nov 18, 2016

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