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


options, msgs, lineinfos, pathutils


Version = distinct string
Source Edit


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

© 2006–2021 Andreas Rumpf
Licensed under the MIT License.