Skip to content

haskellPackages: fix executables built for ghcjs#451527

Merged
maralorn merged 1 commit intoNixOS:haskell-updatesfrom
alexfmpe:ghcjs-export-heap-methods
Oct 13, 2025
Merged

haskellPackages: fix executables built for ghcjs#451527
maralorn merged 1 commit intoNixOS:haskell-updatesfrom
alexfmpe:ghcjs-export-heap-methods

Conversation

@alexfmpe
Copy link
Member

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Tested with $(nix-build -A pkgsCross.ghcjs.haskell.packages.ghc912.aeson-gadt-th)/bin/readme

Before

Aborted('HEAP8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ))
/nix/store/br2hbl66m2d47219wbzs5ifa9dl824j8-aeson-gadt-th-0.2.5.4/bin/readme:107023
  var e = new WebAssembly.RuntimeError(what);
          ^

RuntimeError: Aborted('HEAP8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ))
    at abort (/nix/store/br2hbl66m2d47219wbzs5ifa9dl824j8-aeson-gadt-th-0.2.5.4/bin/readme:107023:11)
    at Object.get (/nix/store/br2hbl66m2d47219wbzs5ifa9dl824j8-aeson-gadt-th-0.2.5.4/bin/readme:106824:9)
    at h$initEmscriptenHeap (/nix/store/br2hbl66m2d47219wbzs5ifa9dl824j8-aeson-gadt-th-0.2.5.4/bin/readme:13532:35)
    at Module.onRuntimeInitialized (/nix/store/br2hbl66m2d47219wbzs5ifa9dl824j8-aeson-gadt-th-0.2.5.4/bin/readme:108062:1)
    at doRun (/nix/store/br2hbl66m2d47219wbzs5ifa9dl824j8-aeson-gadt-th-0.2.5.4/bin/readme:107996:37)
    at run (/nix/store/br2hbl66m2d47219wbzs5ifa9dl824j8-aeson-gadt-th-0.2.5.4/bin/readme:108012:5)
    at removeRunDependency (/nix/store/br2hbl66m2d47219wbzs5ifa9dl824j8-aeson-gadt-th-0.2.5.4/bin/readme:106993:7)
    at receiveInstance (/nix/store/br2hbl66m2d47219wbzs5ifa9dl824j8-aeson-gadt-th-0.2.5.4/bin/readme:107135:5)
    at receiveInstantiationResult (/nix/store/br2hbl66m2d47219wbzs5ifa9dl824j8-aeson-gadt-th-0.2.5.4/bin/readme:107153:12)
    at createWasm (/nix/store/br2hbl66m2d47219wbzs5ifa9dl824j8-aeson-gadt-th-0.2.5.4/bin/readme:107179:17)

Node.js v22.19.0

After

Encoding of A_a:
"[\"A_a\",[]]"
Decoding of encoded A_a:
Just (Some A_a)

Encoding of (A_b 1):
"[\"A_b\",1]"
Decoding of encoded (A_b 1):
Just (Some (A_b 1))

Encoding of (B_a 'a' (A_b 1)):
"[\"B_a\",[\"a\",[\"A_b\",1]]]"
Decoding of encoded (B_a 'a' (A_b 1)):
Succeeded

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 6.topic: haskell General-purpose, statically typed, purely functional programming language labels Oct 13, 2025
Copy link
Member

@maralorn maralorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@maralorn maralorn added this pull request to the merge queue Oct 13, 2025
Merged via the queue into NixOS:haskell-updates with commit 087f8d5 Oct 13, 2025
31 of 34 checks passed
hash = "sha256-sb+AHdkGkCu8MW0xoQIpD5kEc0zYX8udAMDoC+TWc0Q=";
})
]
++ lib.optionals stdenv.targetPlatform.isGhcjs [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make this patch unconditional in a PR to staging so that it is correctly updated/removed when updating GHC?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall I do the same for the ucrt64 patch above it as upstream merged my PR?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexfmpe alexfmpe deleted the ghcjs-export-heap-methods branch January 14, 2026 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: haskell General-purpose, statically typed, purely functional programming language 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants