compiler/modules/nimblecmd

  Source   Edit

Implements some helper procs for Nimble (Nim's package manager) support.

Types

NimblePathResult = object
  pkgs*: NimbleDirAdd
  addedPaths*: seq[AbsoluteDir]
  Source   Edit
NimblePkgAddResult = enum
  nimblePkgInvalid, nimblePkgAdded, nimblePkgUpdated, nimblePkgOlder
  Source   Edit
Version = distinct string
  Source   Edit

Procs

proc `$`(ver: Version): string {.borrow, ...raises: [], tags: [].}
  Source   Edit
proc `<`(ver: Version; ver2: Version): bool {....raises: [ValueError], tags: [].}
This is synced from Nimble's version module.   Source   Edit
proc addPath(conf: ConfigRef; path: AbsoluteDir) {....raises: [], tags: [].}
  Source   Edit
proc getPathVersionChecksum(p: string): tuple[name, version, checksum: string] {.
    ...raises: [], tags: [].}
Splits path p in the format /home/user/.nimble/pkgs/package-0.1-febadeaea2345e777f0f6f8433f7f0a52edd5d1b into ("/home/user/.nimble/pkgs/package", "0.1", "febadeaea2345e777f0f6f8433f7f0a52edd5d1b")   Source   Edit
proc newVersion(ver: string): Version {....raises: [], tags: [].}
  Source   Edit
proc nimblePath(conf: ConfigRef; path: AbsoluteDir): NimblePathResult {.
    ...raises: [OSError, ValueError, IOError], tags: [ReadDirEffect, ReadIOEffect].}
  Source   Edit