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

Pointing dependency to specific version is not enough #777

Closed
halcwb opened this issue Apr 14, 2015 · 7 comments
Closed

Pointing dependency to specific version is not enough #777

halcwb opened this issue Apr 14, 2015 · 7 comments
Labels

Comments

@halcwb
Copy link
Contributor

halcwb commented Apr 14, 2015

I had a problem in which I had to point a dependency to a specific version. So, I changed this in the dependency file. However, later on I discovered that I also should delete the lock file as the wrong version was downloaded according to the out of sync lock file. Shouldn't changing the dependency file be enough without having to manually delete the lock file? See also issue: fsprojects/FSharp.Formatting#294

@forki
Copy link
Member

forki commented Apr 14, 2015

did you run paket install?

@halcwb
Copy link
Contributor Author

halcwb commented Apr 14, 2015

Yes, I tried the following procedure:

  1. Add the version number to the specific lib in the paket.dependencies
  2. Safe the file
  3. Delete the package lib folder
  4. Run .paket\paket install

Only without also deleting the lock file, the wrong version (= latest version) was installed instead of the specific version. After I manually deleted the lock file first, it worked.

@forki
Copy link
Member

forki commented Apr 14, 2015

Ok then this is a bug. Can you please provide the original dependencies file original lockfile? Also please describe the change you did to the dependencies file.

The idea is:
*change dependencies file

  • run paket install

=> lock file gets updated. But only according to you changes in the dependencies file.

(deleting packages folder will never have an impact)

@halcwb
Copy link
Contributor Author

halcwb commented Apr 14, 2015

Ok, the original dependency file looked like:

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

nuget Fake
nuget SourceLink.Fake
nuget FSharp.Formatting
nuget NUnit.Runners
nuget Nuget.CommandLine 2.8.3
nuget AutoMapper
nuget Deedle
nuget Ext.Direct.Mvc4 3.0.2
nuget Faker.Net
nuget FsCheck
nuget FSPowerPack.Community
nuget FsUnit
nuget Funq
nuget Microsoft.AspNet.WebApi 5.2.2
nuget RavenDB.Embedded 2.5.2874
nuget ServiceStack.Api.Swagger
nuget ServiceStack.Logging.Log4Net
nuget ServiceStack.Server
nuget Tynamix.ObjectFiller
nuget Unquote

github fsharp/FAKE modules/Octokit/Octokit.fsx

and the lock file was:

NUGET
  remote: https://www.nuget.org/api/v2
  specs:
    AutoMapper (3.3.1)
    Deedle (1.0.6)
      FSharp.Data (2.0.14)
    Ext.Direct.Mvc4 (3.0.2)
      Microsoft.AspNet.Mvc (>= 4.0.20710.0)
      Newtonsoft.Json (>= 4.5.11)
    FAKE (3.27.5)
    Faker.Net (1.0.3)
    FsCheck (2.0.0)
      FSharp.Core (>= 3.1.2.1)
    FSharp.Compiler.Service (0.0.87)
    FSharp.Core (3.1.2.1)
    FSharp.Data (2.0.14)
      Zlib.Portable (>= 1.10.0) - framework: portable-net40 sl50 wp80 win80
    FSharp.Formatting (2.8.0)
      FSharp.Compiler.Service (>= 0.0.86)
      FSharpVSPowerTools.Core (>= 1.7.0)
    FSharpVSPowerTools.Core (1.8.0)
      FSharp.Compiler.Service (>= 0.0.87)

GITHUB
  remote: fsharp/FAKE
  specs:
    modules/Octokit/Octokit.fsx (97a4f822ae28d612566c5338d90ac79bcd936a2d)
      Octokit

(File abbreviated)

I then changed the dependency file by specifically adding
nuget FSharpVSPowerTools.Core 1.7.0

But the problem is, I think, that FSharpVsPowerTools already will be added by the Formatting lib, as the Formatting lib is dependent on that. Note that I did run the simplify command prior to this.

So, I suspect that the nuget FSharp.Formatting will trigger the fetch of FSharpVSPowerTools prior to the resolution by the dependency file addition.

@forki
Copy link
Member

forki commented Apr 14, 2015

But the problem is, I think, that FSharpVsPowerTools already will be added by the Formatting lib, as the Formatting lib is dependent on that.

yep. but we should detect that.

@forki forki added the bug label Apr 14, 2015
@forki forki closed this as completed in e4aca73 Apr 14, 2015
@forki
Copy link
Member

forki commented Apr 14, 2015

thanks for providing me the data. I think I fixed it.

I would appreciate if you could try again and confirm that the bug is indeed fixed in 0.41.3

@halcwb
Copy link
Contributor Author

halcwb commented Apr 21, 2015

Thanks for fixing this. Indeed this seems to work.

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

No branches or pull requests

2 participants