c-blake / cligen

Nim library to infer/generate command-line-interfaces / option / argument parsing; Docs at
https://c-blake.github.io/cligen/
ISC License
496 stars 23 forks source link

Error: undeclared identifier: shallowCopy #230

Closed theAkito closed 7 months ago

theAkito commented 7 months ago

Error Output

~/.nimble/pkgs/cligen-1.5.4/cligen/sysUt.nim(16, 27) Error: undeclared identifier: 'shallowCopy'
candidates (edit distance, scope distance); see '--spellSuggest': 
 (6, 6): 'alloc'
 (6, 6): 'alloc0'
 (6, 6): 'allocImpl'

Running on

Nim Compiler Version 2.0.0 [Linux: amd64]
Compiled at 2023-08-01
Copyright (c) 2006-2023 by Andreas Rumpf

git hash: a488067a4130f029000be4550a0fb1b39e0e9e7c
active boot switches: -d:release
c-blake commented 7 months ago

1.5.4 is a very old version of cligen - May 2021 and this problem was already fixed in 839286cbc6ca1bae5d24a41a915ec1b15f6cd66e .

theAkito commented 7 months ago

1.5.4 is a very old version of cligen - May 2021 and this problem was already fixed in 839286c .

Yes, it's an upstream issue. I cannot delete the 1.5.4 version and have to manually delete the Nimble folders and configurations for this dependency... Reading through the error made it clear.

I do not have 1.5.4 officially installed! Nimble just never really deleted it.

c-blake commented 7 months ago

I don't know what to say about nimble fragilities &| missing features. You could try one of the many alternative pkg mgrs. Out in the Broader World both build systems and package managers have also proliferated like crazy. People seem to disagree on what they want too much in these things creating real "too many cooks in the kitchen" problems.

Personally, I don't really use nimble. All I do is test installation of my various packages via nimble, but I always do that against everything-wiped package repos { rm -rf /opt/nimble/bin/* /opt/nimble/pkgs2/*-*(/); I also have a ~/.config/nimble/nimble.ini containing the one line nimbleDir = "/opt/nimble/" }. So, I never see won't-delete/upgrades-wrong problems like you describe and have almost no advice on working around them (other than starting from scratch). Sorry I cannot help more!

theAkito commented 7 months ago

I don't know what to say about nimble fragilities &| missing features. You could try one of the many alternative pkg mgrs. Out in the Broader World both build systems and package managers have also proliferated like crazy. People seem to disagree on what they want too much in these things creating real "too many cooks in the kitchen" problems.

Personally, I don't really use nimble. All I do is test installation of my various packages via nimble, but I always do that against everything-wiped package repos { rm -rf /opt/nimble/bin/* /opt/nimble/pkgs2/*-*(/); I also have a ~/.config/nimble/nimble.ini containing the one line nimbleDir = "/opt/nimble/" }. So, I never see won't-delete/upgrades-wrong problems like you describe and have almost no advice on working around them (other than starting from scratch). Sorry I cannot help more!

That is some great advice & information right there. Thank you very much!

I will probably wipe Nimble und re-install it and if it then still does not work properly, I will check out alternatives.

I "solved" the actual dependency problem of this issue now, by manually deleting all cligen folders in ~/.nimble and deleting everything regarding cligen in the nimbledata[2]?.json files!