Hello everyone,
After a couple of days of hard work I am happy to announce the new release of Nimble which includes support for NimScript!
There are many changes in this release, hence the version bump to 0.7.0. I have written an in-depth changelog here. Unfortunately many changes didn't make it into this release, most of these are described on GitHub in the form of issues and are labelled using the High Priority label.
Note: This release does not support Nim 0.12.0, I have also released Nimble 0.6.4 which compiles with 0.12.0 (the previous version did not compile). You can use it if you're stuck with Nim 0.12.0 :)
With this release I wanted to try something different. I decided to record some GIFs showing off the new functionality. Hope you guys like them!
Firstly, the init command has been improved. It now offers much more options:
The update command has been renamed to refresh. Update will be used for another purpose pretty soon. The refresh command downloads the latest package list. This release includes the addition of configurable package lists, you can have multiple package lists and each can have multiple fallback URLs:
Finally, the NimScript support. The .nimble file can now either use the ini format, or the new NimScript format. The NimScript format allows you to use Nim code to describe your package metadata. You can also specify your own commands via tasks, as well as pre and post-hooks. More information can be found in the readme.
Please test it if you can. But remember that this feature is still experimental, it may change significantly or be removed entirely (although that's unlikely). The ini format will stay for the foreseeable future so you can safely continue using it. Please report any issues that you find!
Apart from that another major introduction is proxy support and the publish command which I have already talked about on the forums! This release is also packed with many bug fixes. For a full list of changes see the changelog (or the commits list for a more detailed view).
Oh, and something else I forgot. Nimble now has some more verification rules when it comes to packages. You will now get a warning when installing a package whose name is not a valid Nim identifier.
I hope you guys like this release! Be sure to let me know if you have any issues, questions or comments.
Thanks for reading and hope you have a happy new year!
Question, is this still suppose to work: binDir = "bin"?
Also how do I set multiple requirements? If I add them like this requires: "nim >= 0.12.1, bone_GPIO" I get the following error: Unable to parse dependency version range: Unexpected char in version range: ,.
nim -v
Nim Compiler Version 0.12.0 (2015-10-27)
...
nimblepkg/nimscriptsupport.nim(290, 20) Error: undeclared identifier: 'getModule'
@xyz32: binDir should work like that, yes. Is it not working? As for requires you need to specify it like this: requires "nim >= 0.12.0", "bone_GPIO".
@nimnear: Hrm. Good catch. Currently, v0.6.4 is just a v0.6.2 with a fix which compiles under Nim 0.12.0. Hopefully the fact that it still has the v0.6.2 version won't cause any problems, but I can easily re-tag if it does.
@angluca: What command are you using to install/compile Nimble? Version 0.7.0 does not support Nim 0.12.0 so Nimble should give you an error which tells you that you need at least Nim 0.12.1, but you need to compile/install Nimble using Nimble in order for that to happen.
Traceback (most recent call last)
nimble.nim(990) nimble
nimble.nim(959) doAction
nimble.nim(701) install
nimble.nim(539) installFromDir
packageinfo.nim(259) getPkgInfo
packageinfo.nim(158) readPackageInfo
Error: unhandled exception: Invalid section: [NimbleError]
Traceback (most recent call last)
nimble.nim(960) nimble
nimble.nim(892) doAction
nimble.nim(538) install
nimble.nim(362) installFromDir
packageparser.nim(239) getPkgInfo
packageparser.nim(230) readPackageInfo
Error: unhandled exception: Could not read package info file in /tmp/nimble_12067/githubcom_nimlangnimble_head/nimble.nimble;
Reading as ini file failed with:
Invalid section: .
Evaluating as NimScript file failed with:
Cannot find nimscriptapi.nim. [NimbleError]
It is there, but I am not sure whether it is in the right directory. I installed nimble using nim e install_nimble.nims - maybe this needs to be updated?
I finally tried installing from github and it works fine. Great work! ;-)
I've just begun learning nim ... I have "Nim Compiler Version 0.12.0 (2016-01-16) [Linux: amd64]" installed and working on my Debian Linux system, using the "Installation from github" instructions on http://nim-lang.org/download.html.
Now I am trying to install nimble, by the instructions at https://github.com/nim-lang/nimble.
I see where it says I need some more recent version of nim than the 0.12.0 that I have, but I have no clue how to get any such newer version.
When I get to the "nim c -r src/nimble install" step, it fails, after doing a fair bit of reasonable looking processing and compilation, with the error:
my_nim_subtree/nimble/src/nimblepkg/nimscriptsupport.nim(290, 20) Error: undeclared identifier: 'getModule'
How can I get nimble installed?
@ThePythonicCow The simplest way would be to install Nim exactly the way you have done, but omitting the parameter -b master from the git commands. In this way, you will get the devel branch, which is more up to date.
If you already have it installed, just git checkout devel in the Nim repo, and then nim c koch and ./koch boot -d:release
Excellent, andrea - Thanks!
The last line on my screen now reads "nimble installed successfully." :)
Yes, very sweet. Everything updated perfectly with the 0.13.0 release of Nim.
I'm not sure yet whether I can use Nimble within our enterprise build-system (where we would need our own Git mirrors, our own JSON config, and multiple parallel installations) but it works great for personal projects.
Cargo is awesome, but Rust compiles too damn slow. I don't understand why Rust gets so much attention. Nim is great.
I was talking about that post with colleagues recently. There is a good discussion of it here
A Language Package Manager (LPM) -- like Nimble -- is a much easier proposition than a system for multiple languages. But still not trivial.
Nimble fills a niche for individual developers. For enterprise work, there are several options these days -- EasyBuild, Spack, hashdist, Nixos, Guix ... not to mention OS-specific solutions like RPM, yum, homebrew, macports -- but nothing will satisfy all users. You have to understand the trade-offs of whatever system you choose.