bau/toolchain

Search:
Group by:

Checks Nim and Atlas versions against configured constraints.

Types

ToolchainCheck = object
  ok*: bool                  ## True when every required tool is present and compatible.
  messages*: seq[string]     ## Human-readable detections or failure messages.
Result of checking configured external tools.

Procs

proc checkToolchain(cfg: BauConfig): ToolchainCheck {....raises: [], tags: [
    ReadDirEffect, ReadEnvEffect, ReadIOEffect, ExecIOEffect, RootEffect,
    TimeEffect], forbids: [].}
Check detected tool versions against the project's toolchain policy.
proc detectedAtlasVersion(): string {....raises: [OSError, IOError, ValueError], tags: [
    ReadDirEffect, ReadEnvEffect, ReadIOEffect, ExecIOEffect, RootEffect,
    TimeEffect], forbids: [].}
Return the version reported by atlas --version, or an empty string.
proc detectedNimVersion(): string {....raises: [OSError, IOError, ValueError], tags: [
    ReadDirEffect, ReadEnvEffect, ReadIOEffect, ExecIOEffect, RootEffect,
    TimeEffect], forbids: [].}
Return the version reported by nim --version, or an empty string.
proc ensureToolchain(cfg: BauConfig) {....raises: [IOError], tags: [ReadDirEffect,
    ReadEnvEffect, ReadIOEffect, ExecIOEffect, RootEffect, TimeEffect],
                                       forbids: [].}
Raise IOError when the configured toolchain requirements are not met.
proc versionSatisfies(actual, requirement: string): bool {....raises: [ValueError],
    tags: [], forbids: [].}

Return whether a version satisfies a simple comparison requirement.

Supported operators are >=, >, <=, <, =, and bare equality.