-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update for new GHC JS backend #7
Conversation
Were you able to get this working? I'm getting:
and nothing is showing up in the network tab or on the server side. |
I definitely encountered issues like that. That's probably due to using too low a version of ghcjs-base and/or ghcjs-dom. That
Now it should look like:
There have been updates to ghcjs-base and ghcjs-dom to fix this, but they didn't quite hit all areas. I've made updates to ghcjs-base and ghcjs-dom to fix the issues with this I've found. You can't rely on cabal to pick these changes up, because I doubt they've reached hackage yet (though there are PRs: ghcjs/ghcjs-base#136 and ghcjs/ghcjs-dom#105). I found this cabal.project worked for me:
You might get away with just the ghcjs-dom source-repository-package. For a working example see: https://github.com/sambnt/haskell-js-templates Let me know if that works for you! If not, link me to a repo and I'll try to reproduce. |
Thanks so much for the info and the cabal.project, building it all now to see if that fixes it. After reading the various linked threads it seems like you have been working on getting miso's examples to build with the new backend. So I was wondering if you wanted to be a part of the work mentioned at the bottom of dmjio/miso#738. I haven't properly tried to get miso's examples fully working with the new backend, I just copy pasted the TodoMVC code into my own new project to get the code sizes I posted there. If you by chance have or almost have a working build of miso's examples it would be great to have those in a public repo, or even in miso's repo (whether as a fork/unmerged-PR or merged into miso proper) so that binary sizes can be easily compared between the two. |
Still getting a Perhaps I'm still somehow using some older/incorrect code, or it's a caching issue? I do still see I'm also on |
Ah ok the issue was that even though it was using a newer
Although weirdly enough Given the above I think we should definitely try to get this PR merged and uploaded to hackage. To get it more merge-ready I think it might be worth making the cabal file more consistent with |
Hey @tysonzero, I'm glad you were able to get the example working, turns out I needed I absolutely want to help getting everything together. My only issue is that I'm so used to using haskell.nix I don't have much experience with using any other dependency manager, but I'll do my best. What is your preferred path? Nixpkgs + cabal, just cabal, stack?
The miso tag has been bumped without including my PR to fix the miso examples. It is a bit of a chicken-egg problem, where my PR won't be accepted until they update their nix scripts, which required a version bump (inferred from dmjio/miso#738 (comment)). |
@phadej What can I do to get this PR merged? In particular w.r.t. the cabal file. |
I'm not maintaining servant packages. Ping appropriate maintainers |
haskell.nix is totally fine and what I'm using locally (although I'm not using flakes), the only issue I personally have with that hix-working-examples branch is that it doesn't work on I'm serving my example via a servant web server that provides a simple html template and a script tag that calls into it via I could be wrong but i'm under the impression that @dmjio would be open to merging dmjio/miso#740 if we can just demonstrate that it works, even if the PR for upgrading to miso's core nix infra to the new stuff is probably a little way outs (binary size and potentially other regressions), assuming of course it doesn't break with the existing infrastructure (which it seems like it doesn't). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tested this, and I'm really not maintaining this package any more either :), but it looks fine to me. I'm happy to merge this if you add new upper version bounds.
Thanks for contributing!
- Moved upper version bounds to latest version tested. - Left lower bounds as-is, as changes should be compatible with existing tested versions.
Thanks so much @fisx. I've re-instated the version upper bounds and moved them to the latest versions I tested. I also bumped the version of the package, although in hindsight that might not be necessary, as the API hasn't changed. I'd be happy to put my hand up to maintain the package, my only hesitation is that the package was never released on hackage and hasn't been maintained for a while. Was there a reason for that? If it's just because it wasn't being used, no problem. But if it's something more sinister, then let me know. Would you mind floating the idea to the haskell-servant maintainers? ❤️ |
i'm still officially a servant* maintainer, and i'm using servant professionally, i'm just not very active in my duties as maintainer. i'm not using ghcjs in particular, though. as for the question of maintainership: great that you want to step up. it would be nice to meet in person. you don't happen to be at zurihac this year by any chance? |
I won't be at Zurihac this year :'( I live in Australia so it's a little bit too expensive for me at the moment. At this stage it looks like I will continue using servant-jsaddle, as it seems to be the best choice for interacting with Servant APIs with the Javascript backend. I will contribute any changes I make as I go. |
Related to #6 (sorry I didn't see this earlier).