nim-in-action-code
nim-in-action-code copied to clipboard
Remove deprecated ident type, getNum -> getInt
I have, in chapter 9 about the config macro:
- fixed import (json functions were used inside the macro)
- Remove deprecated NimIdent type: NimIdent->string, object.ident -> object.strVal
- getNum is now getInt
- move away example under a when isMainModule section. It allows to test the file without having to comment them each time we use the macro in another file. Avoids to import the test along the macro.
Oh sorry for the branch choice, these changes have been added by ulterior versions than 1.2.6, I have run code with 1.6.6 (current latest stable).
When did these changes become required for successful compilation? Do we need a new branch for that version?
Actually no, I have done testing with 1.2.6, I get the same warnings (deprecated since 0.18.1 !) and the same getNum error. Obviously, I got same error and warnings with ulterior 1.4.8 version.
Do you get these as warnings or do they fail compilation? The branches only need to compile successfully.
I get one error because getNum() does not exist in the json library