nimble icon indicating copy to clipboard operation
nimble copied to clipboard

FR: verify and satisfy the dependencies, separately from `nimble build`

Open ZoomRmc opened this issue 2 years ago • 3 comments

It would be nice for nimble to have a way for installing a list of dependencies in the same way it does with nimble build.

The case is: I'm writing a package file for a GNU/Linux distributive and would like to use nimble to install dependencies automatically, without an interactive prompt. However, if I use nimble install -y for this, nimble overwrites currently installed packages in its cache. This is problematic in case a user has local changes in those dirs, one example is having symlinks from nimble develop there. If a user has a proper *.nimble config for it's package, nimble build does the correct thing: it satisfies the dependencies but doesn't overwrite anything present. However, If I needed to build the package in some other way (for example, directly with nim c), I would have no way of using nimble to just satisfy the dependencies without the overwriting behaviour of nimble install -y.

Possible solutions:

  1. Add a separate command to satisfy the dependencies, provided as arguments: nimble --satisfy threading>=0.1.0,cligen>=1.5.0
  2. Have a separate argument for nimble install which would prevent interactive prompts but won't reinstall already present packages.

Workaround:

Set --nimbleDir to a temporary folder and use nimble install -y

ZoomRmc avatar Mar 28 '22 14:03 ZoomRmc

Not sure if it helps but you can also do nimble c ...

dom96 avatar Mar 28 '22 16:03 dom96

It requires completely different design. Nimble is a package manager, not a build system.

CyberTailor avatar Jul 13 '22 13:07 CyberTailor

It requires completely different design. Nimble is a package manager, not a build system.

I'm not sure I understand you.

  1. This FR asks for a split of a functionality Nimble already has.
  2. It's exactly about extracting the package management from the build process to allow more flexibility in the latter.

ZoomRmc avatar Jul 20 '22 08:07 ZoomRmc