Skip to content

BUG: choosenim saves to downloads/master.tar.gz which causes clashes when master gets updated; should use git hashes or tags instead #65

@timotheecour

Description

@timotheecour

This line in logs looks like a bug:

Info: /Users/timothee/.choosenim/downloads/master.tar.gz already downloaded

Because /Users/timothee/.choosenim/downloads/master.tar.gz could have been saved by another version of master.
Instead, caches should always use git commit hash.

eg:
choosenim '#v0.17.0'

Downloading Nim v0.17.0 from GitHub
[##################################################] 100.0% 0kb/s
 Extracting v0.17.0.tar.gz
   Building Nim #v0.17.0
   Warning: Building from latest C sources. They may not be compatible with the Nim version you have chosen to install.
      Info: /Users/timothee/.choosenim/downloads/master.tar.gz already downloaded
 Extracting master.tar.gz
   Building C sources
   Building koch
 Exception: choosenim.nim(206)       choosenim
        ... choosenim.nim(187)       performAction
        ... choosenim.nim(89)        choose
        ... choosenim.nim(72)        chooseVersion
        ... choosenim.nim(46)        installVersion
        ... builder.nim(91)          build
        ... builder.nim(43)          buildCompiler
        ... utils.nim(19)            doCmdRaw
        ... Execution failed with exit code 1
        ... Command: ./bin/nim c koch
        ... Output: Hint: used config file '/Users/timothee/.choosenim/toolchains/nim-#v0.17.0/config/nim.cfg' [Conf]
        ... Hint: used config file '/Users/timothee/.config/nim.cfg' [Conf]
        ... Hint: used config file 'koch.nim.cfg' [Conf]
        ... Hint: system [Processing]
        ... lib/system.nim(408, 27) Error: type mismatch: got <type int>
        ... but expected one of:
        ... proc high[T](x: T): T
        ... expression: high(int)
   Cleaning failed build
     Error: choosenim.nim(206)       choosenim
        ... choosenim.nim(187)       performAction
        ... choosenim.nim(89)        choose
        ... choosenim.nim(72)        chooseVersion
        ... choosenim.nim(46)        installVersion
        ... builder.nim(100)         build
        ... Build failed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions