dom96 / httpbeast

A highly performant, multi-threaded HTTP 1.1 server written in Nim.
MIT License
442 stars 51 forks source link

Errors with hot code reloading #75

Closed nepeckman closed 2 years ago

nepeckman commented 2 years ago

I'm trying to create a dev server that benefits from hot code reloading, and I'm running into a strange issue when I import httpbeast while also compiling with --hotcodereloading:on. No project code needed to reproduce, just import httpbeast and compiling with the flag produces the following error for me:

error: ‘log__pureZlogging_107___Uq1DNQ0bb1OcS7GXX7ZrsA’ undeclared (first use in this function); did you mean ‘log__pureZlogging_107___Uq1DNQ0bb1OcS7GXX7ZrsA_actual’?
  396 |         log__pureZlogging_107___Uq1DNQ0bb1OcS7GXX7ZrsA = (tyProc__a9aA8tkMKeA4YjWsIcoguwA) hcrRegisterProc("/home/vehpeckman/.cache/nim/testserver_d/libstdlib_logging.nim.c.so", "log__pureZlogging_107___Uq1DNQ0bb1OcS7GXX7ZrsA", (void*)log__pureZlogging_107___Uq1DNQ0bb1OcS7GXX7ZrsA_actual);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |         log__pureZlogging_107___Uq1DNQ0bb1OcS7GXX7ZrsA_actual

Nim Compiler Version 1.6.6 [Linux: amd64] Compiled at 2022-05-05

Is this a known issue? Is there any work around?

dom96 commented 2 years ago

No idea but it's not a httpbeast issue. Raise this in the Nim repo please.