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

nimble build should complain when it requires X >=N and X has nimble develop at version < N #854

Closed
timotheecour opened this issue Sep 23, 2020 · 3 comments

Comments

@timotheecour
Copy link
Member

timotheecour commented Sep 23, 2020

I was going to file a bug under inim but after investigation this is a bug in nimble:

inim nimble specifies noise >= 0.1.4 but nimble build still uses noise@0.1.3, causing build errors without indication of what caused the error:

$ nimble dump noise|grep version
version: "0.1.3"

$ git clone https://github.com/AndreiRegiani/INim
$ cd INim

$ git rev-parse HEAD
89b1657444b6b4c6641b3842bc0a08606eedd175

$ grep noise inim.nimble
requires "noise >= 0.1.4"

# $ nimble develop # Error: Cannot develop packages that are binaries only. (=> https://github.com/nim-lang/nimble/issues/853)

$ nimble build
Verifying dependencies for inim@0.6.0
   Warning: The .nimble-link file is pointing to a missing file: /Users/timothee/git_clone/nim/nester/nester.nimble
      Hint: Remove '/Users/timothee/.nimble/pkgs/nester-#head' or restore the file it points to.
      Info: Dependency on cligen@>= 1.0.0 already satisfied
  Verifying dependencies for cligen@0.9.46
      Info: Dependency on noise@>= 0.1.4 already satisfied
  Verifying dependencies for noise@0.1.3
   Building inim/inim using c backend
       Tip: 5 messages have been suppressed, use --verbose to show them.
     Error: Build failed for package: inim
        ... Details:
inim.nim(351, 8) Error: undeclared identifier: 'ktCtrlX'

turns out it's because I had done nimble develop on an old clone of noise, which was stuck at 0.1.3:

find ~/.nimble/pkgs/noise-*
/Users/timothee/.nimble/pkgs/noise-#head
/Users/timothee/.nimble/pkgs/noise-#head/nimblemeta.json
/Users/timothee/.nimble/pkgs/noise-#head/noise.nimble-link

proposal

nimble build should (by default) complain that nimble develop version is too old since we have requires "noise >= 0.1.4" and nimble dump noise|grep version returns 0.1.3

related

@c-blake
Copy link

c-blake commented Sep 23, 2020

This seems like it may relate to the behavior of nimble never auto-updating any #head install (which I think most find counter-intuitive).

@timotheecour
Copy link
Member Author

timotheecour commented Sep 23, 2020

This seems like it may relate to the behavior of nimble never auto-updating any #head install (which I think most find counter-intuitive).

related to #332 (and duplicates-ish #386)

but i think these are 2 separate issues;

  • nimble develop should point to a fixed directory name that doesn't get updated when the linked dir gets modified (eg: $HOME/.nimble/pkgs/noise-#develop)
  • nimble install sompackage@#head should show the HEAD commit hash (eg: $HOME/.nimble/pkgs/noise-#c704533) instead of symbolic one (head)

either way, an RFC would be nice to discuss this to make sure it's well thought through

@dom96
Copy link
Collaborator

dom96 commented Sep 25, 2020

IMO this will be resolved once lock files are implemented. Further complicating how Nimble manages develop/head packages is unnecessary.

@dom96 dom96 closed this as completed Sep 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants