As expected, release frequency and size is winding down as the style settles in - v0.6 is a fairly small release compared to v0.5.
The main highlight must be that takes care of an ugly wart, namely the lonely , appearing on a single line in function calls - the change is easiest to see in the PR that introduced it:
# pre
initSrcGen(
g,
if conf == nil:
newPartialConfigRef()
else:
conf
,
)
#post
initSrcGen(
g,
if conf == nil:
newPartialConfigRef()
else:
conf,
)
Apart from that, the code allows itself to be compiled with any 2.0 release in the hopes of the language grammar not changing from one point release to another - if it were to do so, the potency of the included correctness checker would go down a notch.
There's a few other minor cleanups and fixes for nim-libp2p, the latest of our larger projects to format itself :)
As usual, there's a commit showcasing what the compiler would look like, formatted.
Enjoy the release! - if you're using the vscode plugin, you'll still need to update nph manually.
Thanks! That lonely comma will find some company then :)
Nph is great
nph 0.6.1 is out simplifying installation but otherwise containing no significant changes.
Since the 0.6 release, nimlangserver, and therefore the vscode extension has learned to use nph to format code - if you have nph installed, ctrl-shift-i in vscode has you covered!
On OSX Sonoma v14.7
nph -v v0.6.0-0-g31bdced
nim -v Nim Compiler Version 2.2.0 [MacOSX: amd64] Compiled at 2024-10-02 Copyright (c) 2006-2024 by Andreas Rumpf active boot switches: -d:release
nimble install nph
nimble.nim(304) buildFromDir
Any suggestions?
There's now a handy github action that checks nph formatting in CI:
name: Check `nph` formatting
on:
pull_request:
jobs:
nph:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check `nph` formatting
uses: arnetheduck/nph-action@v1
with:
version: latest
options: "."
fail: true
suggest: trueThanks ... that did the trick.
After upgrading nimble.... for some unknown reason the "nimble install nph" installed a whole new distribution of Nim 2.0.14! to build the package... A bit surprising... Now to cleanup the unwanted leftovers :-).