choosenim icon indicating copy to clipboard operation
choosenim copied to clipboard

choosenim '#v0.17.0' fails

Open Feinbube opened this issue 8 years ago • 4 comments

I installed choosenim on Ubuntu 16.04 using curl https://nim-lang.org/choosenim/init.sh -sSf | sh

When I try to switch to 0.17.0 using choosenim '#v0.17.0'

I get the following exception:

        ... lib/system.nim(408, 27) Error: type mismatch: got (type int)
        ... but expected one of: 
        ... proc high[T](x: T): T

(I tried to follow the "Let's Make a Game in Nim" video by Jez Impbox: https://www.youtube.com/watch?v=EwM1Z3WdqjM)

Feinbube avatar Jan 07 '18 22:01 Feinbube

Full error log:

frank@nim:~/dev/nico$ choosenim '#v0.17.0'
Downloading Nim v0.17.0 from GitHub
      Info: /home/frank/.choosenim/downloads/v0.17.0.tar.gz already downloaded
 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: /home/frank/.choosenim/downloads/master.tar.gz already downloaded
 Extracting master.tar.gz
   Building C sources
   Building koch
 Exception: Traceback (most recent call last)
        ... choosenim.nim(155)       choosenim
        ... choosenim.nim(136)       performAction
        ... choosenim.nim(78)        choose
        ... choosenim.nim(61)        chooseVersion
        ... choosenim.nim(35)        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 '/home/frank/.choosenim/toolchains/nim-#v0.17.0/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
   Cleaning failed build
     Error: Traceback (most recent call last)
        ... choosenim.nim(155)       choosenim
        ... choosenim.nim(136)       performAction
        ... choosenim.nim(78)        choose
        ... choosenim.nim(61)        chooseVersion
        ... choosenim.nim(35)        installVersion
        ... builder.nim(100)         build
        ... Build failed

Feinbube avatar Jan 07 '18 22:01 Feinbube

Warning: Building from latest C sources. They may not be compatible with the Nim version you have chosen to install.

Sadly, there isn't much choosenim can do here. If you want 0.17.0 then choosenim 0.17.0 should work though, perhaps choosenim can suggest that in this instance.

dom96 avatar Jan 08 '18 13:01 dom96

choosenim 0.17.0 works -- and looks nice, too. Thank you :)

Maybe it is enough to add a comment to the video. @ftsf

Feinbube avatar Jan 08 '18 14:01 Feinbube

I'll try to improve choosenim's output when I get a chance as well.

dom96 avatar Jan 08 '18 17:01 dom96