Closed genotrance closed 5 years ago
Per @Araq, $
is now in system/dollar.nim.
https://github.com/c-blake/cligen/blob/master/cligen/argcvt.nim#L8
It is an easy fix:
from typetraits import `$` # needed for $T
should be removed, as this $
is now available by default, no need to import typetraits
.
But we'll add it back to remain backward-compatible.
But we'll add it back to remain backward-compatible.
Done. Should be fine now.
This came up once before in December just prior to Nim 0.19.2 when @timotheecour had that $
moved to system
. So, best to guard it here so that the core Nim crew can delete it someday.
(That other time was this issue: https://github.com/c-blake/cligen/issues/84 ). Anyway, cligen
should now work fine if you delete that export
, but I don't know how many other packages might fail.
I can say that searching through like 150 git clones of nim packages that I don't see a single other instance of the from.*typetraits.*import.*\$
pattern. I expect almost everyone just import typetraits
in which case at worst it's an unneeded import. (Personally, I use that from..import
form because I dislike unneeded imports and like to reinforce what modules various things live in. I even put //
side-comments in C code for each #include
saying which decls require the header, but that practice seems very rare.)
Despite being in Nim tests, this failure isn't caught.