minorg icon indicating copy to clipboard operation
minorg copied to clipboard

BUG: "Error: generic instantiation too nested"

Open wjyoung65 opened this issue 1 year ago • 1 comments

Did you check docs and existing issues?

  • [X] I have searched the existing issues.
  • [X] I have searched the existing discussions.

Converter version (minorg --version)

latest commit

Operating System / Version

Linux Mint 22

Input File Type (Please add flavor if exists; obsidian markdown)

nim

Describe the Bug

Hit an error trying to compile minorg from scratch:

$  nimble build --verbose
     Info:  Nimble data file "/home/wayne/.nimble/nimbledata2.json" has been loaded.
   Building minorg/minorg using c backend
  Executing /home/wayne/.nimble/bin/nim c --colors:on --noNimblePath -d:NimblePkgVersion=2.4.6 --path:/home/wayne/.nimble/pkgs2/unicodedb-0.12.0-4452416471e2fe8726eb6070ed6e
a7368171cc09 --path:/home/wayne/.nimble/pkgs2/nim_pandoc-4.0.0-b761cc1f00175b2a29d352467e9f62c893f69a06 --path:/home/wayne/.nimble/pkgs2/regex-0.23.0-89466caa353b571cdcd8271
f2c797ba2c15a89f2 --path:/home/wayne/.nimble/pkgs2/cligen-1.6.16-087127d5fdadcfc931b98e4a0006360d1dc6d5d4 -o:/home/wayne/projects/minorg/minorg /home/wayne/projects/minorg/m
inorg.nim
/home/wayne/.nimble/pkgs2/nim_pandoc-4.0.0-b761cc1f00175b2a29d352467e9f62c893f69a06/nim_pandoc.nim(53, 1) template/generic instantiation of `refObjectJsonHook` from here
(72, 20) template/generic instantiation of `jsonTo` from here
/home/wayne/.choosenim/toolchains/nim-2.0.8/lib/std/jsonutils.nim(296, 11) template/generic instantiation of `fromJson` from here
/home/wayne/.choosenim/toolchains/nim-2.0.8/lib/std/jsonutils.nim(237, 15) template/generic instantiation of `fromJson` from here
/home/wayne/.choosenim/toolchains/nim-2.0.8/lib/std/jsonutils.nim(153, 17) template/generic instantiation of `fromJson` from here
/home/wayne/.choosenim/toolchains/nim-2.0.8/lib/std/jsonutils.nim(213, 25) Error: generic instantiation too nested
nimble.nim(304)          buildFromDir

    Error:  Build failed for the package: minorg
     Info:  Nimble data file "/home/wayne/.nimble/nimbledata2.json" has been saved.

Filing this issue in case someone else hits it. If I find a solution, will follow up here.

Screenshots, Traceback

No response

Steps to Reproduce

Followed the steps in Compile From Source:

$ curl https://nim-lang.org/choosenim/init.sh -sSf | sh
$ export PATH="$HOME/.nimble/bin:$PATH"
$ choosenim stable
$ nim -v
# ! check nim version >= 2.0.0

nim -v reports:

Nim Compiler Version 2.0.8 [Linux: amd64]
Compiled at 2024-07-03
Copyright (c) 2006-2023 by Andreas Rumpf

git hash: 5935c3bfa9fec6505394867b23510eb5cbab3dbf
active boot switches: -d:release

Then:

$ git clone https://github.com/pysan3/minorg.git
$ cd minorg/
$ nimble setup
# ... Download dependencies and setup the environment.
$ nimble build -d:release  --verbose    <-- error noted here

Expected Behavior

No compile error

wjyoung65 avatar Sep 29 '24 14:09 wjyoung65

Compiles fine with nim 2.0.4, but breaks with 2.0.6 and 2.0.8. The workaround is to use choosenim 2.0.4 instead of choosenim stable. At this point I'm not sure whether the issue lies with minorg or nim, so leaving this open for now.

wjyoung65 avatar Sep 29 '24 23:09 wjyoung65