Giter VIP home page Giter VIP logo

choosenim's People

Contributors

100phlecs avatar dom96 avatar elcritch avatar euantorano avatar farism avatar genotrance avatar guzba avatar haxscramper avatar iffy avatar ilmanzo avatar iranika avatar ire4ever1190 avatar jorjun avatar k0pernicus avatar lbartoletti avatar marcomq avatar moigagoo avatar romanthekat avatar samdmarshall avatar thomastjdev avatar timotheecour avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

choosenim's Issues

UNIX install script has `/tmp` hardcoded

This causes issues when installing on systems where access to /tmp is restricted (such as on shared web hosts that allow restricted SSH access). It should instead use the value of the $TMPDIR environment variable.

Ability to switch to existing installations

  • choosenim ~/projects/nim

Future possibilities:

  • Saving of paths for easier selection? We can achieve something similar using $your_fav_shell so should this be choosenim's job?

Update to stable doesn't select new version

~ » choosenim update stable
   Updating stable
      Info: Already up to date at version 0.17.0
~ » choosenim show         
   Channel: stable
   Version: 0.16.0
      Path: /Users/dom/.choosenim/toolchains/nim-0.16.0
~ » choosenim -v                                                                                                               1 ↵
choosenim v0.2.2 (2017-05-17 22:47:01) [macosx/amd64]

Windows 7 Install Failure

The gcc compiler was not downloaded before attempting to build nim.

    ...      Error: Requested executable is missing. (Path: C:\Users\me\.choosenim\toolchains\mingw32\bin\gcc.exe)

Choosenim output attached.

install-failure.txt

choosenim '#v0.17.0' fails

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)

Can't install Nim 0.17.0: invalid integer: 00000000000

$ choosenim update stable
   Updating stable
Downloading Nim 0.17.0 from nim-lang.org
[##################################################] 100.0% 0kb/s
 Extracting nim-0.17.0.tar.gz
     Error: Unable to extract. Error was 'invalid integer: 00000000000 '.

Manual nim builds work fine but installing choosenim fails

Hello,

I can build nim manually using this script.

I still I wanted to see what choosenim looked like, but I am unable to install it. It fails with this error:

> curl https://nim-lang.org/choosenim/init.sh -sSf | sh
choosenim-init: Downloading choosenim-0.2.2_linux_amd64
/tmp/choosenim-0.2.2_linux_amd64: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /tmp/choosenim-0.2.2_linux_amd64)
/tmp/choosenim-0.2.2_linux_amd64: /lib64/libc.so.6: version `GLIBC_2.15' not found (required by /tmp/choosenim-0.2.2_linux_amd64)

I am using RHEL 6.6.

Is that dependency failure for building choosenim or nim?

OpenSSL Dependency issue

This is in particular a problem for macOS. Older versions come with openssl that is too old and does not support SSL offered by nim-lang.org.

Windows installer still broken

The Windows installer still fails with the following problem:

Downloading C compiler (Mingw32)
Traceback (most recent call last)
choosenim.nim(155)       choosenim
choosenim.nim(136)       performAction
choosenim.nim(74)        choose
choosenim.nim(45)        chooseVersion
download.nim(16)         downloadMingw32
download.nim(169)        downloadFile
download.nim(154)        downloadFileNim
httpclient.nim(1256)     downloadFile
httpclient.nim(951)      parseBody
httpclient.nim(892)      recvFull
httpclient.nim(866)      reportProgress
download.nim(150)        onProgressChanged
terminal.nim(657)        showBar
terminal.nim(396)        eraseLine
system.nim(2724)         sysFatal
Error: unhandled exception: over- or underflow [OverflowError]
The system cannot find the path specified.
        0 file(s) copied.
            Work finished.
            Now you must ensure that the Nimble bin dir is in your PATH:
              C:\Users\Frank\.nimble\bin
Press any key to continue . . .

The issues is actually already fixed in the Nim repo:
nim-lang/Nim#7043

Since choosenim is supposed to be an easy entry to the world of Nim programming, it would be great if this could be fixed in a timely manner.

Serve all downloads from GitHub?

The SSL for nim-lang.org fails with ...

error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure

For some older versions of openssl. Serving from GitHub would solve that problem.

Change the way update works

Right now, choosenim update just redownloads everything and rebuilds from scratch using csources.

I think it should work this way:

  • choosenim update 0.16.0 (or in fact any tag) should be a noop - there is no need to update a fixed version
  • choosenim update "#head" should do a git pull and then use koch to rebuild using the existing nim.

In fact, with this behaviour, the version is redundant: the only case in which it makes sense to update is when being on devel, so there could just be choosenim update to update #head.

With the current behaviour, choosenim is inconvenient to keep up to date with latest Nim daily - a full clone and rebuild is too slow.

Better error message for 'devel' versions

Analytics show users attempting to run choosenim 0.17.3 which results in a "Version 0.17.3 does not exist" error. It would be great to explain to the user that this is a development version and that they should try choosenim devel.

"Access is denied" on Windows when installing/updating Nim.

If some file in "nim-#devel" or "nim-0.17.0" is being used - like opened in some editor, or some executable from this folder is running, choosenim throws this error:

C:\Users\Tiberium>choosenim update devel --verbose
   Updating devel
Downloading Nim devel from GitHub
[##################################################] 100.0% 0kb/s
Error: unhandled exception: Access is denied.
 [OSError]

In my case I was using VSCode with Nim plugin, and this plugin used nimsuggest.exe from "nim-#devel\bin" folder. Closing VSCode solved this issue to me

Build of nim 0.17.2 fails when running the executable on Windows

Info: Nim 0.17.2 already downloaded
Extracting nim-0.17.2.tar.gz
Building Nim 0.17.2
Exception: Execution failed with exit code 1
... Command: build.bat
... Output: gcc -w -O3 -fno-strict-aliasing -Ic_code -c c_code\1_1\compiler_nim.c -o c_code\1_1\compiler_nim.o
... In file included from c_code\1_1\compiler_nim.c:7:0:
... c_code/nimbase.h:482:13: error: size of array 'Nim_and_C_compiler_disagree_on_target_architecture' is negative
... typedef int Nim_and_C_compiler_disagree_on_target_architecture[sizeof(NI) == sizeof(void*) && NIM_INTBITS == sizeof(NI)*8 ? 1 : -1];
... ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
... FAILURE
... CSource compilation failed. Please check that the gcc compiler is in
... the PATH environment variable, and that you are calling the batch script
... that matches the target architecture of the compiler.
Cleaning failed build
Tip: 1 messages have been suppressed, use --verbose to show them.
Error: Build failed

Redundant hint messages

screen shot 2017-08-25 at 14 23 54

Those hints are redundant when installing for the first time. Introduce a switch to disable them?

Overflow error during installation [Windows 10]

Downloading Nim 0.17.2 from nim-lang.org
Traceback (most recent call last)
choosenim.nim(155)       choosenim
choosenim.nim(136)       performAction
choosenim.nim(74)        choose
choosenim.nim(61)        chooseVersion
choosenim.nim(23)        installVersion
download.nim(227)        download
download.nim(221)        downloadImpl
download.nim(169)        downloadFile
download.nim(154)        downloadFileNim
httpclient.nim(1256)     downloadFile
httpclient.nim(951)      parseBody
httpclient.nim(892)      recvFull
httpclient.nim(866)      reportProgress
download.nim(150)        onProgressChanged
terminal.nim(657)        showBar
terminal.nim(396)        eraseLine
system.nim(2724)         sysFatal
Error: unhandled exception: over- or underflow [OverflowError]
        1 file(s) copied.
            Work finished.
            Now you must ensure that the Nimble bin dir is in your PATH:
              C:\Users\dawkot\.nimble\bin
Press any key to continue . . .

Windows installer failure

Running the Windows executable installer throws:

Downloading Nim 0.17.2 from nim-lang.org
Traceback (most recent call last)
choosenim.nim(155)       choosenim
choosenim.nim(136)       performAction
choosenim.nim(74)        choose
choosenim.nim(61)        chooseVersion
choosenim.nim(23)        installVersion
download.nim(227)        download
download.nim(221)        downloadImpl
download.nim(169)        downloadFile
download.nim(154)        downloadFileNim
httpclient.nim(1256)     downloadFile
httpclient.nim(951)      parseBody
httpclient.nim(892)      recvFull
httpclient.nim(866)      reportProgress
download.nim(150)        onProgressChanged
terminal.nim(657)        showBar
terminal.nim(396)        eraseLine
system.nim(2724)         sysFatal
Error: unhandled exception: over- or underflow [OverflowError]
        1 file(s) copied.
            Work finished.
            Now you must ensure that the Nimble bin dir is in your PATH:
              C:\Users\matic\.nimble\bin

Tried it on Windows XP (x86) and Windows 10 (x64).

Installation of #v0.16.0 now fails due to new c sources (?)

The reason that this is installed in the first place is because it forces the newest Nimble to be installed together with Nim 0.16.0. Choosenim instructs the user to install Nim via the #v0.16.0 tag when they attempt to use the older Nimble 0.8.2.

Proposed solution: Implement a --newest-nimble (or similar) flag to force the newest Nimble to be installed with whatever Nim version is selected.

This won't solve the issue that #v0.16.0 cannot be installed, but it should solve the problem demi- was experiencing: https://irclogs.nim-lang.org/29-06-2017.html#20:52:04.

Linux_arm not supported.

pi@raspberrypi:~ $ curl https://nim-lang.org/choosenim/init.sh -sSf | sh
choosenim-init: Error: Sorry, your platform (linux_arm) is not supported by choosenim.

Release channels

Some preset release channels would be nice:

  • stable - for the latest release.
  • devel - for the devel branch.

Add command to list available versions

There should be a subcommand list that lists out the available released versions so we don't have to guess at what is and isn't available (like, why 0.16.0 works but 0.16.1 does not).

Choosenim crash on Windows 10 (64-bit)

> choosenim "#head"

Downloading Nim devel from GitHub
Traceback (most recent call last)
choosenim.nim(155) choosenim
choosenim.nim(136) performAction
choosenim.nim(78) choose
choosenim.nim(61) chooseVersion
choosenim.nim(23) installVersion
download.nim(227) download
download.nim(212) downloadImpl
download.nim(169) downloadFile
download.nim(154) downloadFileNim
httpclient.nim(1256) downloadFile
httpclient.nim(951) parseBody
httpclient.nim(892) recvFull
httpclient.nim(866) reportProgress
download.nim(150) onProgressChanged
terminal.nim(657) showBar
terminal.nim(396) eraseLine
system.nim(2724) sysFatal
Error: unhandled exception: over- or underflow [OverflowError]

cannot open $HOME/.nimble/lib/system.nim

Freshly installed copy, trying to build https://github.com/evacchi/nimoy on macOS Sierra

 Error: Traceback (most recent call last)
    ... nimble.nim(1073)         nimble
    ... nimble.nim(991)          doAction
    ... nimble.nim(973)          execHook
    ... packageparser.nim(313)   getPkgInfoFromFile
    ... packageparser.nim(288)   readPackageInfo
    ... Could not read package info file in <OMISSIS>/nimoy/nimoy.nimble;
    ...   Reading as ini file failed with:
    ...     Invalid section: .
    ...   Evaluating as NimScript file failed with:
    ...     Error: cannot open '/Users/evacchi/.nimble/lib/system.nim'.

in fact the file is missing

% ls /Users/evacchi/.nimble/lib/system.nim                                        
ls: /Users/evacchi/.nimble/lib/system.nim: No such file or directory

Choosenim breaks nimble

nimble tasks
       Tip: 1 messages have been suppressed, use --verbose to show them.
     Error: Could not read package info file in /home/papillon/esperimenti/nimgraph/nimgraph.nimble;
        ...   Reading as ini file failed with: 
        ...     Invalid section: .
        ...   Evaluating as NimScript file failed with: 
        ...     Error: cannot open '/home/papillon/.nimble/lib/system.nim'.

Bootstrapping with choosenim fails

./koch boot -d:release
iteration: 1
compiler/nim0 c -d:release --nimcache:nimcache/r_macosx_amd64 compiler/nim.nim
     Error: Requested executable is missing. (Path: /Users/tiber/.choosenim/toolchains/nim-#devel/bin/nim0)
      Info: If unexpected, please report this error to https://github.com/dom96/choosenim
FAILURE

Reported by @Yardanico

Possible solutions:

  • Treat re"nim[0-9]" as nim in the proxy exe.

Windows install fails to create a working c++ build environment

I'm using choosenim-0.2.2_windows_i386.exe. A working c build environment is created and nim compiles hello world just fine. g++ also exists in the path as a result, but the cpp nim backend target breaks. Attempting to only use g++ to build a cpp hello world also breaks, resulting in the following wchar_s not found error:

$ g++ -o test.exe test.cpp                                                                                                    In file included from C:/Users/user/.choosenim/toolchains/mingw32/i686-w64-mingw32/include/c++/cwchar:44:0,
                 from C:/Users/user/.choosenim/toolchains/mingw32/i686-w64-mingw32/include/c++/bits/postypes.h:40,
                 from C:/Users/user/.choosenim/toolchains/mingw32/i686-w64-mingw32/include/c++/iosfwd:40,
                 from C:/Users/user/.choosenim/toolchains/mingw32/i686-w64-mingw32/include/c++/ios:38,
                 from C:/Users/user/.choosenim/toolchains/mingw32/i686-w64-mingw32/include/c++/ostream:38,
                 from C:/Users/user/.choosenim/toolchains/mingw32/i686-w64-mingw32/include/c++/iostream:39,
                 from test.cpp:1:
C:/Users/user/.choosenim/toolchains/mingw32/i686-w64-mingw32/include/wchar.h:1040:29: fatal error: sec_api/wchar_s.h: No such
file or directory
 #include <sec_api/wchar_s.h>
                             ^
compilation terminated.`

Add a command to update choosenim by itself

If a new version of choosenim has been released, the only way to update it is to remove the current binary, and to run the bash script to install it.
What if adding a new command called self, to play with choosenim itself, like self update or something like that (like rustup)?

choosenim fails to compile on windows 10

I have gcc installed.
error message copy/paste below:

choosenim.nim(85)        choose
        ... choosenim.nim(72)        chooseVersion
        ... choosenim.nim(46)        installVersion
        ... builder.nim(91)          build
        ... builder.nim(23)          buildCompiler
        ... builder.nim(10)          buildFromCSources
        ... utils.nim(19)            doCmdRaw
        ... Execution failed with exit code 1
        ... Command: build.bat
        ... Output: gcc -w -O3 -fno-strict-aliasing -Ic_code -c c_code\1_1\compiler_nim.c -o c_code\1_1\compiler_nim.o
        ... In file included from c_code\1_1\compiler_nim.c:7:0:
        ... c_code/nimbase.h:477:13: error: size of array 'Nim_and_C_compiler_disagree_on_target_architecture' is negative
        ...  typedef int Nim_and_C_compiler_disagree_on_target_architecture[sizeof(NI) == sizeof(void*) && NIM_INTBITS == sizeof(NI)*8 ? 1 : -1];
        ...              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        ... FAILURE

Windows 64 bit builds?

Nim compilation fails for me with this error:

      Info: Nim 0.17.0 already downloaded
 Extracting nim-0.17.0.tar.gz
   Building Nim 0.17.0
 Exception: Execution failed with exit code 1
        ... Command: build.bat
        ... Output: gcc -w -O3 -fno-strict-aliasing -Ic_code -c c_code\1_1\compiler_nim.c -o c_code\1_1\compiler_nim.o
        ... In file included from c_code\1_1\compiler_nim.c:7:0:
        ... c_code/nimbase.h:482:13: error: size of array 'Nim_and_C_compiler_disagree_on_target_architecture' is negative
        ...  typedef int Nim_and_C_compiler_disagree_on_target_architecture[sizeof(NI) == sizeof(void*) && NIM_INTBITS == sizeof(NI)*8 ? 1 : -1];
        ...              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        ... FAILURE
        ... CSource compilation failed. Please check that the gcc compiler is in
        ... the PATH environment variable, and that you are calling the batch script
        ... that matches the target architecture of the compiler.
   Cleaning failed build
       Tip: 1 messages have been suppressed, use --verbose to show them.
     Error: Build failed
        1 file(s) copied.
            Work finished.
            Now you must ensure that the Nimble bin dir is in your PATH:
              C:\Users\moigagoo\.nimble\bin
Press any key to continue . . .

I think that's because I have 64 bit version of gcc installed, whereas the sources are expected to be compiled with a 32 bit version.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.