disruptek / nimph

Nim package hierarchy manager from the future 🧚
MIT License
159 stars 10 forks source link

Exception: 'version' is not accessible using discriminant 'kind' of type 'Release' #99

Closed moigagoo closed 4 years ago

moigagoo commented 4 years ago
  1. Installed nimph on Windows by running the lines in bootstrap.sh one by one manually, making necessary adjustments to port sh to pwsh.
  2. Run nimph.

This error comes out: Exception: 'version' is not accessible using discriminant 'kind' of type 'Release'

disruptek commented 4 years ago

So the problem seems to be that if any Nimble package in your path (which includes ~/.nimble/pkgs by default) is broken, Nimph cannot evaluate the project because nimble dump pukes on it.

The workaround, for now, is to create a nim.cfg with --clearNimblePath to omit the default package environment and use local dependencies until we can warn about such errors.

Also note that nimph-0.6.3 may help.

The permanent fix is for Nimph to do its own nimscript parsing of the .nimble files, which will happen "soon".

98 #24

disruptek commented 4 years ago

Also, if you can tell me how to adjust the bootstrap for Windows, we can provide that for other Windows folks...

disruptek commented 4 years ago

Also, please try 0.6.4 which I just pushed; it will convert 2 and 4-digit version numbers to 3-digits for the purposes of semver...

cc @zevv

zevv commented 4 years ago

Fixed! closes #99

disruptek commented 4 years ago

Guess we'll close it for now. Thanks for the report!

moigagoo commented 4 years ago

@disruptek First, thanks for the quick fix, that was really fast! 🚀

Second, I've submitted a PR with your bootstrap script ported to PowerShell: #100 .