Conversation
|
Re https://github.com/tweag/ghc-wasm-miso-examples/actions/runs/8742531268/job/23991017268?pr=12: |
|
Maybe it's not that simple; I bumped |
|
@amesgen I ran |
|
Wow, that's surprising. I bisected this in Nix, and it is due to NixOS/nix#10038 ( Maybe the problem is that https://github.com/denoland/deno/releases/download/v1.42.1/deno-x86_64-unknown-linux-gnu.zip is not a tarball, but a zip file? According to the docs of
In any case, https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/merge_requests/60 looks good as a solution 👍 |
|
My understanding of |
|
@hasufell I've now added CI check as well as build instructions for non-nix users in the README. Would you mind giving it another try? |
|
And then got the error: |
That was a mistake on my part. With this patch I'm able to run it: diff --git a/frontend/build.sh b/frontend/build.sh
index f3fb6e3..0c1cca1 100755
--- a/frontend/build.sh
+++ b/frontend/build.sh
@@ -19,7 +19,7 @@ rm -rf dist
mkdir dist
cp ./*.html dist/
-wasm32-wasi-cabal build ghc-wasm-miso-examples
+cabal build --with-ghc=wasm32-wasi-ghc --with-ghc-pkg=wasm32-wasi-ghc-pkg --with-hsc2hs=wasm32-wasi-hsc2hs ghc-wasm-miso-examples
hs_wasm_path=$(find .. -name "*.wasm")
"$(wasm32-wasi-ghc --print-libdir)"/post-link.mjs \So we need some ghcup compatibility and make minimal assumptions. |
I can change How does |
That's a cabal bug. ghcup does nothing about that. |
|
|
| Follow instructions on | ||
| [`ghc-wasm-meta`](https://gitlab.haskell.org/ghc/ghc-wasm-meta#getting-started-without-nix) | ||
| to set up the toolchain, then: |
There was a problem hiding this comment.
Given that build.sh now also has support for the ghcup way of install the WASM backend (ie when wasm32-wasi-cabal is not present), we could also link to the corresponding ghcup instructions. I just tested that everything works when using ghcup with wasm32-wasi-ghc-9.10.0.20240412, see #10 (comment).
There was a problem hiding this comment.
Maybe. Though it looks like the wasm bindist metadata is maintained manually, I'd really like to have a proper CI story to update that before recommending ghcup to manage the wasm ghc bindists.
There was a problem hiding this comment.
I'd really like to have a proper CI story to update that before recommending ghcup to manage the wasm ghc bindists.
What does "proper CI story" mean?
Unless you're proposing some "nightly" style thing, the proper way of doing redistribution is doing manual updates, including working gpg signatures (not machine keys).
I don't see a problem with that.
There was a problem hiding this comment.
Unless you're proposing some "nightly" style thing
Yeah, though rather weekly than nightly, I was thinking that it would be nice to have weekly CI of https://github.com/amesgen/ghc-wasm-bindists to push updated bindist artifacts to ghcup cross yaml metadata, rather than having to update manually.
But that's indeed a separate concern worth discussion elsewhere. I'll update README to include ghcup instructions later.
There was a problem hiding this comment.
I have updated README to point to ghcup user manual about setting up wasm toolchain, and also added a CI job to test ghcup builds.
There was a problem hiding this comment.
to push updated bindist artifacts to ghcup cross yaml metadata
That won't be possible. Machine generated metadata has to be kept strictly separate. So that would mean the wasm project hosts their own yaml metadata of ghcup.
That is totally fine.
You might be interested in GHCs scripts: https://gitlab.haskell.org/ghc/ghc/-/tree/master/.gitlab/rel_eng/mk-ghcup-metadata?ref_type=heads
ac55b8d to
cb126ec
Compare
Older versions of ghc-wasm-meta are incompatible with newer Nix versions, see haskell-wasm/ghc-wasm-miso-examples#12 (comment) for details.
Older versions of ghc-wasm-meta are incompatible with newer Nix versions, see haskell-wasm/ghc-wasm-miso-examples#12 (comment) for details.
Older versions of ghc-wasm-meta are incompatible with newer Nix versions, see haskell-wasm/ghc-wasm-miso-examples#12 (comment) for details.
Closes #11.