Open Industrial opened 2 months ago
Try to skip that test?
Please try zeroing in more on what the issue actually is. In particular:
Minimal flake.nix
:
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
};
outputs = inputs @ {self, ...}: let
pkgs = import inputs.nixpkgs {
system = "x86_64-linux";
};
in {
devShells = {
"x86_64-linux" = {
default = pkgs.mkShell {
packages = with pkgs; [
haskell.packages.ghcjs.ghcjs-base
];
};
};
};
};
}
$ nix flake metadata
:
Resolved URL: git+file:///run/media/tom/Data/Code/typescript/skeleton-nodejs?dir=test
Locked URL: git+file:///run/media/tom/Data/Code/typescript/skeleton-nodejs?dir=test
Path: /nix/store/vpv1lybkk9wzcxih4ps2cwii1y7bdd9h-source
Revision: 3ffba97ce9a07df4b48c33d6e3718c1c473b00ed-dirty
Last modified: 2024-09-08 11:37:48
Inputs:
└───nixpkgs: github:nixos/nixpkgs/9bb1e7571aadf31ddb4af77fc64b2d59580f9a39
How do I get a build log for a derivation that hangs in the build phase?
Seems like reproducing (what I believe is the same issue) is as simple as:
import GHC.Clock
main = getMonotonicTime >>= print
I don't know how to run ghcjs jsexes at the CLI, so I have the browser backtrace which seems close enough:
uncaught exception in Haskell main thread: ReferenceError: h$getMonotonicNSec is not defined [rts.js:6573:28](file:///home/lukas/Main.jsexe/rts.js)
h$baseZCGHCziClockzigetMonotonicTime1_e@file:///home/lukas/Main.jsexe/out.js:28564:3
h$runThreadSlice@file:///home/lukas/Main.jsexe/rts.js:7499:11
h$runThreadSliceCatch@file:///home/lukas/Main.jsexe/rts.js:7467:12
h$mainLoop@file:///home/lukas/Main.jsexe/rts.js:7462:9
partiallyApplied/<@file:///home/lukas/Main.jsexe/rts.js:2504:25
runIfPresent@file:///home/lukas/Main.jsexe/rts.js:2518:21
onGlobalMessage@file:///home/lukas/Main.jsexe/rts.js:2554:29
Smells like a ghcjs problem, though we don't exactly ship the upstream ghcjs 8.10, but a fork of Obsidian Systems. cc @dfordivam @obsidian-systems-maintenance
Yes, the getMonotonicTime is a ghcjs problem. It doesn't exist on 8.10 on either our fork or upstream.
On ghc HEAD (or 9.10) this should work https://gitlab.haskell.org/ghc/ghc/-/blob/master/libraries/ghc-internal/src/GHC/Internal/Clock.hsc?ref_type=heads#L40
#if defined(javascript_HOST_ARCH)
getMonotonicTimeNSec :: IO Word64
getMonotonicTimeNSec = do
w <- getMonotonicTimeMSec
return (floor w * 1000000)
foreign import javascript unsafe "performance.now" getMonotonicTimeMSec:: IO Double
I vaguely remember seeing this issue in the past. The best solution here is to avoid running hspec
with ghcjs. Which means avoid running check phase /testsuite of hspec-discover-2.7.10 (checkPhase)
.
This could be done by dontCheck
override in flake.nix, or better do it here?
# Without this revert, test suites using tasty fail with:
# ReferenceError: h$getMonotonicNSec is not defined
# https://github.com/UnkindPartition/tasty/pull/345#issuecomment-1538216407
Steps To Reproduce
Steps to reproduce the behavior:
flake.nix
:Build log
It doesn't get to a log or a
.drv
file because the build seems to hang on a Node.js stack trace:Additional context
Add any other context about the problem here.
Notify maintainers
@sternenseemann you are the only maintainer I find in the file (https://github.com/NixOS/nixpkgs/blob/d1f2bc29317e05baea8db6379766a3b334f373ed/pkgs/development/haskell-modules/configuration-common.nix#L1865) which is the only notice of this package + version in nixpkgs so I hope I am tagging the right person here :-)
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a :+1: reaction to issues you find important.