miere43 / nim-registry

Deal with Windows Registry from Nim
http://miere.ru/docs/registry/
MIT License
29 stars 5 forks source link

`undeclared identifier: 'useWinUnicode'`error occurred when compiling with Nim 2.0.0 #10

Closed fukusuket closed 1 year ago

fukusuket commented 1 year ago

Hello, Thank you so much for great tool :) I am reporting this because a compilation error occurred with Nim 2.0.0.

Describe the issue Compilation fails with Nim 2.0.0.

Step to Reproduce

  1. Install Nim 2.0.0
  2. nimble init sample
  3. Add dependency requires "winregistry >= 1.0.0"
  4. Write https://github.com/miere43/nim-registry#nim-registry sample code
  5. nimble build

Expected behavior Compilation succeeds.

Actual behavior Compilation failed with following error.

% nimble build
  Verifying dependencies for sample@0.1.0
     Info:  Dependency on winregistry@>= 1.0.0 already satisfied
  Verifying dependencies for winregistry@1.0.0
   Building sample/sample using c backend
/Users/fukusuke/.nimble/pkgs2/winregistry-1.0.0-30462eb902c219db72c018c4c3669ecaee08e107/winregistry.nim(66, 6) Error: undeclared identifier: 'useWinUnicode'
candidates (edit distance, scope distance); see '--spellSuggest':
 (8, 2): 'NimNode'
       Tip: 4 messages have been suppressed, use --verbose to show them.
nimble.nim(229)          buildFromDir

    Error:  Build failed for the package: sample

Environment

nim -v
Nim Compiler Version 2.0.0 [MacOSX: amd64]
Compiled at 2023-08-19
Copyright (c) 2006-2023 by Andreas Rumpf

active boot switches: -d:release
% nimble -v
nimble v0.14.2 compiled at 2023-08-19 16:19:52
git hash: couldn't determine git hash

Additional context It appears that useWinUnicode was removed in the commit below.

miere43 commented 1 year ago

Hello, thanks for the report, I will look into this.

miere43 commented 1 year ago

Fixed in v2.0.0.

fukusuket commented 1 year ago

Thank you for quick fix :)