PMunch / futhark

Automatic wrapping of C headers in Nim
MIT License
355 stars 19 forks source link

nimsuggest cannot find identifiers generated by futhark #62

Closed jackhftang closed 1 year ago

jackhftang commented 1 year ago

I am able to compile, link and run the code. The only problem is that nimsuggest cannot lookup any identifiers. I dig a bit and think that futhark should have generated declaration like this proc tsparsernew(): ptr Tsparser_436207981 {.cdecl, importc: "ts_parser_new".}. It seems to me it is the problem of nimsuggest. I want to confirm that are you experiencing the same problem or it is just me?

Screenshot from 2023-03-17 13-23-55

PMunch commented 1 year ago

Yes, this is a known limitation with Nimsuggest. Essentially it is just Nimsuggest which doesn't properly run the macro. If you follow the suggestion in the "Shipping Wrappers" section of the README it will work. This is because Nimsuggest is able to take then non-futhark path and just grab the cached file instead.

jackhftang commented 1 year ago

I see. Thank you.