xxh32 leaves open handle

Aperta
#658 1 commento 6 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
nodejs, rust, typescript

Direzione di ricerca

Inizia dal percorso di importazione in index.js alla riga 64 e riproduci il problema da test/foo.spec.ts usando l'opzione --detectOpenHandles di Jest. Traccia quale risorsa rimane aperta dopo il completamento di xxh32('foobarbaz'), quindi conferma che il processo di test termina senza l'handle segnalato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Hi, xxh32 (not sure if specifically this function or the lib in general) seems to be leaking some resources. When used as part of jest tests, it randomly causes:
"Jest did not exit one second after the test run has completed."
When executed with --detectOpenHandles:

Jest has detected the following 1 open handle potentially keeping Jest from exiting:


    > 1 | import { xxh32 } from '@node-rs/xxhash';
        | ^
      2 | xxh32('foobarbaz');
      3 |

      at Runtime._loadModule (../../node_modules/jest-runtime/build/index.js:1218:29)
      at Object.<anonymous> (../../node_modules/@node-rs/xxhash/index.js:64:29)
      at Object.<anonymous> (test/foo.spec.ts:1:1)

This issue was originally reported as part of @nestjs repo:
https://github.com/nestjs/nest/issues/11072

While at it, hope it's ok if I mention another issue that prevents adoption by the same lib, which deals with cross-platform development: https://github.com/nestjs/nest/issues/11071
Could you perhaps clarify if this is expected behavior? Is the generated lockfile platform specific? Is this workflow possible/supported? What would be the correct/intended way to handle such situation? Thank you.

Lingua principale
Rust
Stelle
1.5k
Fork
52
Merge medio
1g 2h
PR unite (30g)
14

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di napi-rs/node-rs

Tutte le issue di napi-rs/node-rs

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.