SciNim / nim-plotly

plotly wrapper for nim-lang
https://scinim.github.io/nim-plotly/
MIT License
179 stars 15 forks source link

add threads:off to examples config file #82

Closed ringabout closed 2 years ago

ringabout commented 2 years ago

Hello the maintainers of the nim-plotly. Nim v2 will make threads:on derfault. It seems that nim-plotly behaves differently with and without threads:on. So I add a config file to make sure it continues to compile.

Ref https://github.com/nim-lang/Nim/pull/19368

Clonkk commented 2 years ago

There is indeed a difference with/without threads but it's still supposed to work in both case.

Does this cause CI issue ?

ringabout commented 2 years ago

Yeah, here is the error message:

  /home/runner/work/Nim/Nim/pkgstemp/plotly/examples/fig18_subplots.nim(117, 5) template/generic instantiation of `[]=` from here
  /home/runner/work/Nim/Nim/pkgstemp/plotly/src/plotly/plotly_subplots.nim(363, 24) Warning: See corresponding Defect; IndexError is deprecated [Deprecated]
  /home/runner/work/Nim/Nim/pkgstemp/plotly/examples/fig18_subplots.nim(121, 5) Error: type mismatch: got <Grid>
  but expected one of:
  proc show(grid: Grid; filename: string; htmlPath = "";
            htmlTemplate = defaultTmplString; removeTempFile = false;
            autoResize = true)
    first type mismatch at position: 2
    missing parameter: filename
  1 other mismatching symbols have been suppressed; compile with --showAllMismatches:on to see them

  expression: show(grid)
Vindaar commented 2 years ago

I think I'd prefer to fix the underlying issue that the code is broken in one case instead of forcing --threads:off there. I'll try to fix it now. If for some reason I don't manage for now, I'll merge this instead.

ringabout commented 2 years ago

Thank you!

Vindaar commented 2 years ago

This should be unnecessary now. :ok_hand: Ping me if I'm wrong.

ringabout commented 2 years ago

It works, thank you again!