Skip to content
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

Consider mentioning reflex-platform in the README #367

Closed
tysonzero opened this issue Feb 22, 2018 · 3 comments
Closed

Consider mentioning reflex-platform in the README #367

tysonzero opened this issue Feb 22, 2018 · 3 comments

Comments

@tysonzero
Copy link
Contributor

tysonzero commented Feb 22, 2018

As of now reflex-platform has a relatively up to date version of miso built in. Also Ryan is working with me to make sure that reflex-platform works well for miso (or more generally for any non-reflex frontend framework). I think it is worth mentioning it in the README, as it enables things like incremental compilation and will make it easier to use miso on mobile.

For isomorphic apps a simple default.nix like the following should work:

(import ./reflex-platform { useTextJSString = false; }).project ({ pkgs, ... }: {
  packages = {
    common = ./common;
    server = ./server;
    client = ./client;
  };

  shells = {
    ghc = ["common" "server"];
    ghcjs = ["common" "client"];
  };
})

Assuming that common, server and client are Haskell projects with cabal files (although it seems like they do not need their own default.nix files).

@FPtje
Copy link
Contributor

FPtje commented Mar 24, 2018

I'm not exactly sure what building miso into reflex-platform means. I see that the commit you refer to puts miso in the overridden haskellPackages, but I'm not sure as to why. Reflex and Miso are competing platforms. Now I'm not much of an expert on reflex, but the README of the reflex-platform repo shows that it is to help to develop and deploy reflex based applications before showing examples of reflex-frp. How and where does Miso fit in that story and why should that be mentioned in Miso's README?

@tysonzero
Copy link
Contributor Author

tysonzero commented Mar 24, 2018

So reflex-platform is becoming a generic way to deploy Haskell apps to multiple platforms (ghc, ghcjs, and mobile). Off the top of my head It improves over stack by handling mobile deployment and doing a good job of handling ghcjs, it improves on raw nix by supporting incremental building, and by supporting mobile deployment. I'm sure there are plenty of other benefits but those are the ones I know of.

You are correct that it was originally designed for reflex, but it really isn't fundamentally attached to reflex, just the name and some optimizations (that should help miso to a similar degree that they helped reflex) and probably a few QoL things that are currently specific to reflex (but can I'm sure be extended). The name is actually going to change sometime (once a good name has been decided on) to emphasize that it is not tied to reflex.

miso was put into the overridden haskellPackages so that you could get a relatively up to date version of miso when building with reflex-platform. @ryantrinkle is working with me to make reflex-platform work as well as possible for miso and by extension hopefully every other Haskell web framework that does or will exist.

You can think of reflex-platform as a competitor to stack or to "vanilla nix". I am actually using it right now for both of my miso projects (and I do not know reflex), and the incremental building has been a substantial workflow improvement.

@dmjio
Copy link
Owner

dmjio commented Jul 22, 2019

Reflex team / platform has done a lot of incredible work in upstreaming features (GHC cross compilation for ARM) into nixpkgs, which miso now utilizes as of 1.1, along with jsaddle, per @cocreature's work. It seems incremental building is achievable via a blend of cabal-new build w/ nix-shell. Core functionality for building / deployment should be present in miso now, but building miso via reflex-platform is always a viable option as well.

@dmjio dmjio closed this as completed Jul 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants