Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code path using NativeColors appears to fail #130

Open
kdeme opened this issue Apr 20, 2023 · 0 comments
Open

Code path using NativeColors appears to fail #130

kdeme opened this issue Apr 20, 2023 · 0 comments

Comments

@kdeme
Copy link
Contributor

kdeme commented Apr 20, 2023

Noticed this on Windows speficially, but potentially anywhere when selected NativeColors:

[NimScript] exec: nim c --out:build/fluffy -d:chronicles_log_level=TRACE -d:chronosStrictException -d:PREFER_BLST_SHA256=false --verbosity:0 --hints:off -d:release -d:chunked_rlpx_enabled -d:legacy_eth66_enabled fluffy/fluffy.nim
D:\a\nimbus-eth1\nimbus-eth1\vendor\nim-json-rpc\json_rpc\clients\httpclient.nim(53, 15) template/generic instantiation of `async` from here
D:\a\nimbus-eth1\nimbus-eth1\vendor\nim-json-rpc\json_rpc\clients\httpclient.nim(94, 16) template/generic instantiation of `closeRefs` from here
D:\a\nimbus-eth1\nimbus-eth1\vendor\nim-json-rpc\json_rpc\clients\httpclient.nim(79, 15) template/generic instantiation of `debug` from here
D:\a\nimbus-eth1\nimbus-eth1\vendor\nim-chronicles\chronicles.nim(363, 10) template/generic instantiation of `log` from here
D:\a\nimbus-eth1\nimbus-eth1\vendor\nim-chronicles\chronicles.nim(298, 18) template/generic instantiation of `initLogRecord` from here
D:\a\nimbus-eth1\nimbus-eth1\vendor\nim-chronicles\chronicles\log_output.nim(734, 41) template/generic instantiation of `initLogRecord` from here
D:\a\nimbus-eth1\nimbus-eth1\vendor\nim-chronicles\chronicles\log_output.nim(549, 15) template/generic instantiation of `appendHeader` from here
D:\a\nimbus-eth1\nimbus-eth1\vendor\nim-chronicles\chronicles\log_output.nim(501, 23) template/generic instantiation of `appendLogLevelMarker` from here
D:\a\nimbus-eth1\nimbus-eth1\vendor\nim-chronicles\chronicles\log_output.nim(489, 12) template/generic instantiation of `fgColor` from here
D:\a\nimbus-eth1\nimbus-eth1\vendor\nim-chronicles\chronicles\log_output.nim(444, 39) Error: type mismatch: got <DynamicOutput>
but expected one of:
template getOutputStream(o: FileOutput): File
  first type mismatch at position: 1
  required type for o: FileOutput
  but expression ' {.gcsafe.}:
  addr defaultChroniclesStreamOutputs
[][0]' is of type: DynamicOutput
template getOutputStream(o: StdErrOutput): File
  first type mismatch at position: 1
  required type for o: StdErrOutput
  but expression ' {.gcsafe.}:
  addr defaultChroniclesStreamOutputs
[][0]' is of type: DynamicOutput
template getOutputStream(o: StdOutOutput): File
  first type mismatch at position: 1
  required type for o: StdOutOutput
  but expression ' {.gcsafe.}:
  addr defaultChroniclesStreamOutputs
[][0]' is of type: DynamicOutput

expression: getOutputStream( {.gcsafe.}:
  addr defaultChroniclesStreamOutputs
[][0])
stack trace: (most recent call last)
D:\a\nimbus-eth1\nimbus-eth1\vendor\nimbus-build-system\vendor\Nim\lib\system\nimscript.nim(429, 18)
D:\a\nimbus-eth1\nimbus-eth1\nimbus.nims(75, 15) fluffyTask
D:\a\nimbus-eth1\nimbus-eth1\nimbus.nims(45, 8) buildBinary
D:\a\nimbus-eth1\nimbus-eth1\vendor\nimbus-build-system\vendor\Nim\lib\system\nimscript.nim(273, 7) exec
D:\a\nimbus-eth1\nimbus-eth1\vendor\nimbus-build-system\vendor\Nim\lib\system\nimscript.nim(273, 7) Error: unhandled exception: FAILED: nim c --out:build/fluffy -d:chronicles_log_level=TRACE -d:chronosStrictException -d:PREFER_BLST_SHA256=false --verbosity:0 --hints:off -d:release -d:chunked_rlpx_enabled -d:legacy_eth66_enabled fluffy/fluffy.nim [OSError]
mingw32-make: *** [Makefile:207: fluffy] Error 1
Error: Process completed with exit code 2.

Errors occur specifically when selected NativeColors in fgColor, resetColors and applyStyle:

elif record.colors == NativeColors:

This is probably occuring because other platforms the default NativeColors is replaced with AnsiColors here:

when not defined(windows):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant