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

#head versions are not updated upon nimble install #318

Closed
yglukhov opened this issue Jan 13, 2017 · 5 comments
Closed

#head versions are not updated upon nimble install #318

yglukhov opened this issue Jan 13, 2017 · 5 comments

Comments

@yglukhov
Copy link
Member

This behavior has changed with recent changes is nimble. Previously nimble would download #head every time.

# foo/foo.nimble
version       = "0.1.0"
author        = "Anonymous"
description   = "foo"
license       = "MIT"
requires "nake#head"

First run - nake is downloaded:

$ nimble install -dy
  Verifying dependencies for foo@0.1.0
   Warning: No nimblemeta.json file found in /Users/yglukhov/.nimble/pkgs/nimble-#head
 Installing nake@#head
Downloading https://github.com/fowlmouth/nake using git
   Warning: File inside package 'nake' is outside of permitted namespace, should be named 'nake.nim' but was named 'nakefile.nim' instead. This will be an error in the future.
      Hint: Rename this file to 'nake.nim', move it into a 'nake/' subdirectory, or prevent its installation by adding `skipFiles = @["nakefile.nim"]` to the .nimble file. See https://github.com/nim-lang/nimble#libraries for more info.
  Verifying dependencies for nake@#head
 Installing nake@#head
   Building nake/nake using c backend
   Warning: Binary 'nake' was already installed from source directory. Will be overwritten.
   Warning: Symlink already exists in /Users/yglukhov/.nimble/bin. Replacing.
   Success: nake installed successfully.

Second run - nake is not downloaded:

$ nimble install -dy
  Verifying dependencies for foo@0.1.0
   Warning: No nimblemeta.json file found in /Users/yglukhov/.nimble/pkgs/nimble-#head
      Info: Dependency on nake@#head already satisfied
   Warning: File inside package 'nake' is outside of permitted namespace, should be named 'nake.nim' but was named 'nakefile.nim' instead. This will be an error in the future.
      Hint: Rename this file to 'nake.nim', move it into a 'nake/' subdirectory, or prevent its installation by adding `skipFiles = @["nakefile.nim"]` to the .nimble file. See https://github.com/nim-lang/nimble#libraries for more info.
  Verifying dependencies for nake@#head
@dom96
Copy link
Collaborator

dom96 commented Jan 13, 2017

I think the update command will take care of this.

@genotrance
Copy link
Contributor

I think depending on #head is problematic regardless of whether this issue is fixed or not.

If I install package1 that depends on something@#head, it will pull it at the time of install and probably succeed.

After some time, if I install package2 which also depends on something@#head:

  • Current broken case - nimble will just try to use the old something@#head which probably might not work but at least package1 still works
  • Fixed case - nimble will pull the new something@#head and probably package2 will work but package1 might now break since it needs to be updated to work with new something@#head

@dom96
Copy link
Collaborator

dom96 commented Jul 24, 2019

Depending on #head is perfectly fine. The problem you are describing is solved using lock files, these will define a commit and "freeze" the dependency in place. Only an explicit nimble update will update the commit hashes, and allow the user to verify that everything still works.

@genotrance
Copy link
Contributor

So does this need to be fixed or can we close?

@yglukhov
Copy link
Member Author

yglukhov commented Sep 4, 2019

It's pretty outdated, I think we can close it, as the lockfiles which are going to be implemented will change the requirements completely.

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

No branches or pull requests

3 participants