Skip to content

Instantly share code, notes, and snippets.

@genotrance
Last active March 25, 2019 18:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save genotrance/03465051162d70dd48f938f103201104 to your computer and use it in GitHub Desktop.
Save genotrance/03465051162d70dd48f938f103201104 to your computer and use it in GitHub Desktop.
Nimble lock files

Project setup

  • Create project
  • Setup for per project nimbleDir
    • New field in .nimble
    • Nimble anyway generates command line for nim so no change in nim/nim.cfg

Lock file creation workflow

  • Delete project nimbleDir or uninstall specific package
  • Install deps at preferred levels using nimble
    • nimble install abc@version or abc@#hash
    • Everything goes into local project nimble director
  • Eventually nimble update will delete/install in per project case
  • Run nimble freeze to create/update lock file
  • Check-in lock file into repo
  • Release

Typical install

  • If lock file exists
    • Install all deps into local project repo
  • Else
    • Follow traditional nimble dependency process

nim-lang/nimble#127 discusses requirement in detail.

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