PMunch / futhark

Automatic wrapping of C headers in Nim
MIT License
394 stars 22 forks source link

Error: index out of bounds, the container is empty in 0.13.0 #105

Closed kreatoo closed 6 months ago

kreatoo commented 6 months ago

Hello,

I am receiving the error on the title ever since 0.13.0 released.

https://github.com/kreatolinux/src/blob/master/kpkg/modules/libarchive.nim

This is the code (if needed).

Hint: used config file '/home/kreato/.choosenim/toolchains/nim-2.0.4/config/nim.cfg' [Conf]
Hint: used config file '/home/kreato/.choosenim/toolchains/nim-2.0.4/config/config.nims' [Conf]
........................................................................................................................................................................
/home/kreato/.nimble/pkgs2/norm-2.8.2-16034980543ad6c0e15af63c2081248fa28033c2/norm/sqlite.nim(235, 131) Hint: 'select' cannot raise 'LoggingError' [XCannotRaiseY]
/home/kreato/.nimble/pkgs2/norm-2.8.2-16034980543ad6c0e15af63c2081248fa28033c2/norm/sqlite.nim(209, 140) Hint: 'select' cannot raise 'LoggingError' [XCannotRaiseY]
/home/kreato/.nimble/pkgs2/norm-2.8.2-16034980543ad6c0e15af63c2081248fa28033c2/norm/sqlite.nim(235, 131) Hint: 'select' cannot raise 'LoggingError' [XCannotRaiseY]
...............................................................
stack trace: (most recent call last)
futhark.nim(758, 30)     importcImpl
futhark.nim(730, 14)     getCommonPrefix
/home/kreato/Sources/src/kpkg/modules/libarchive.nim(9, 3) template/generic instantiation of `importc` from here
/home/kreato/.nimble/pkgs2/futhark-0.13.0-63bd5b46069aec76db338e709bcbf3904cc0bb1e/futhark.nim(689, 14) template/generic instantiation of `importcImpl` from here
/home/kreato/.nimble/pkgs2/futhark-0.13.0-63bd5b46069aec76db338e709bcbf3904cc0bb1e/futhark.nim(730, 14) Error: index out of bounds, the container is empty

This is the output on 0.13.0.

On 0.12.5, it builds fine.

PMunch commented 6 months ago

Pushed a v0.13.1 version now which fixes the issue.

Thanks for reporting this! It was caused by not specifying any path values and so one of the project mode systems got confused.