Skip to content

Compile error when logging cstring #186

@huantianad

Description

@huantianad

Sorry, not much time right now to do a nice error report, but should be simple to reproduce I hope. Trying to log a cstring as a property results in a compile error:

  Nim Output /home/runner/work/levelsync/levelsync/src/levelsync.nim(29, 7) template/generic instantiation of `error` from here
        ... /home/runner/.nimble/pkgs2/chronicles-0.12.2-02febb20d088120b2836d3306cfa21f434f88f65/chronicles.nim(367, 10) template/generic instantiation of `log` from here
        ... /home/runner/.nimble/pkgs2/chronicles-0.12.2-02febb20d088120b2836d3306cfa21f434f88f65/chronicles.nim(268, 36) template/generic instantiation of `chroniclesExpandItIMPL` from here
        ... /home/runner/.nimble/pkgs2/chronicles-0.12.2-02febb20d088120b2836d3306cfa21f434f88f65/chronicles/log_output.nim(736, 24) template/generic instantiation of `setProperty` from here
        ... /home/runner/.nimble/pkgs2/chronicles-0.12.2-02febb20d088120b2836d3306cfa21f434f88f65/chronicles/textblocks.nim(136, 4) template/generic instantiation of `writeValue` from here
        ... /home/runner/.nimble/pkgs2/chronicles-0.12.2-02febb20d088120b2836d3306cfa21f434f88f65/chronicles/textblocks.nim(129, 4) template/generic instantiation of `writeValueImpl` from here
        ... /home/runner/.nimble/pkgs2/chronicles-0.12.2-02febb20d088120b2836d3306cfa21f434f88f65/chronicles/textblocks.nim(109, 6) template/generic instantiation of `writeStyledValue` from here
        ... /home/runner/.nimble/pkgs2/chronicles-0.12.2-02febb20d088120b2836d3306cfa21f434f88f65/chronicles/textblocks.nim(111, 29) Error: type mismatch
        ... Expression: splitLines(value)
        ...   [1] value: cstring
        ... Expected one of (first mismatch at [position]):
        ... [1] func splitLines(s: string; keepEol = false): seq[string]
        ... [1] iterator splitLines(s: string; keepEol = false): string

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions