diff options
author | Vladimír Čunát | 2024-08-29 07:57:41 +0200 |
---|---|---|
committer | Vladimír Čunát | 2024-08-29 07:57:41 +0200 |
commit | 3616b80947ac88f515581f8de03d1c9e51503660 (patch) | |
tree | 763e6a6b5ac418c4b42cab323757c8295937a26b /pkgs/development/web | |
parent | e8d2ddc82ea71d2ddec3775b36e0c7057558d7a0 (diff) | |
parent | 24536bf02cd9b199fdca550ba7e4f53b9a94119a (diff) |
nodejs: suppress Python warnings on x86_64-darwin (#337386)
Diffstat (limited to 'pkgs/development/web')
-rw-r--r-- | pkgs/development/web/nodejs/nodejs.nix | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/pkgs/development/web/nodejs/nodejs.nix b/pkgs/development/web/nodejs/nodejs.nix index 96c8d9f64551..07c945e2b230 100644 --- a/pkgs/development/web/nodejs/nodejs.nix +++ b/pkgs/development/web/nodejs/nodejs.nix @@ -270,6 +270,23 @@ let checkFlags = [ # Do not create __pycache__ when running tests. "PYTHONDONTWRITEBYTECODE=1" + ] ++ lib.optionals (stdenv.buildPlatform.isDarwin && stdenv.buildPlatform.isx86_64) [ + # Python 3.12 introduced a warning for calling `os.fork()` in a + # multi‐threaded program. For some reason, the Node.js + # `tools/pseudo-tty.py` program used for PTY‐related tests + # triggers this warning on Hydra, on `x86_64-darwin` only, + # despite not creating any threads itself. This causes the + # Node.js test runner to misinterpret the warnings as part of the + # test output and fail. It does not reproduce reliably off Hydra + # on Intel Macs, or occur on the `aarch64-darwin` builds. + # + # This seems likely to be related to Rosetta 2, but it could also + # be some strange x86‐64‐only threading behaviour of the Darwin + # system libraries, or a bug in CPython, or something else + # haunted about the Nixpkgs/Hydra build environment. We silence + # the warnings in the hope that closing our eyes will make the + # ghosts go away. + "PYTHONWARNINGS=ignore::DeprecationWarning" ] ++ lib.optionals (!stdenv.buildPlatform.isDarwin || lib.versionAtLeast version "20") [ "FLAKY_TESTS=skip" # Skip some tests that are not passing in this context |