status-im / nim-confutils

Simplified handling of command line options and config files
Apache License 2.0
64 stars 16 forks source link

configuration field type qualified by module yields an error #49

Closed kaiserd closed 2 years ago

kaiserd commented 2 years ago

Using a type qualified by a module name (e.g. specialint.SINT) yields the following error:

Error: unhandled exception: [IdentDefs] Unsupported child node:
DotExpr
  Ident "specialint"
  Ident "SInt" [AssertionError]

Here is a small example generating this error:

main.nim

import
  confutils,
  ./specialint

type
  TestConf* = object
    La* {.
      desc: "La"
      name: "la" }: specialint.SInt

when isMainModule:
  let conf = TestConf.load()
  echo repr conf

specialint.nim

type
  SInt* = distinct int

I tested this within the nimbus build system environment of nwaku.