chung-leong / zigar

Enable the use of Zig code in JavaScript project
https://chung-leong.github.io/zigar/
MIT License
177 stars 2 forks source link

"Module was abandoned" error #406

Closed chung-leong closed 2 months ago

chung-leong commented 2 months ago
  2) Integration tests (node-zigar, Debug)
       Function calling
         should write to a file using fprintf:
     Error: Module was abandoned
      at NodeEnvironment.throwError (<anonymous>:5366:40)
      at NodeEnvironment.getViewAddress (<anonymous>:4884:30)
      at NodeEnvironment.getTargetAddress (<anonymous>:5861:30)
      at NodeEnvironment.updatePointerAddresses (<anonymous>:5446:30)
      at NodeEnvironment.invokeThunk (<anonymous>:5877:14)
      at fopen (<anonymous>:5224:23)
      at Context.<anonymous> (file:///home/cleong/zigar/zigar-compiler/test/integration/function-calling/tests.js:794:17)
chung-leong commented 2 months ago

The same test zig file is being used twice, that's why. The module is unloaded after the first test, after which Node won't load it again.