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

Use stack for optimal cross platform support #35

Closed
3noch opened this issue Oct 2, 2015 · 19 comments
Closed

Use stack for optimal cross platform support #35

3noch opened this issue Oct 2, 2015 · 19 comments

Comments

@3noch
Copy link
Member

3noch commented Oct 2, 2015

Stack will install GHCJS and dependencies automatically on any platform (including Windows). Might want to check that out.

@3noch
Copy link
Member Author

3noch commented Oct 2, 2015

Almost: commercialhaskell/stack#749

@Ericson2314
Copy link
Member

http://lists.science.uu.nl/pipermail/nix-dev/2015-September/018138.html nixpkgs now has LTS. Whenever there is an LTS supporting ghc and ghcjs (should have same library versions for both compilers), it would probably be best to use that.

Then the infrastructure here can probably be cut down a bit, and nix and stack can both be used.

@ryantrinkle
Copy link
Member

Absolutely. Both of these are great ideas. If anyone has time to test out upgrading nixpkgs to 15.09 or installing reflex-dom with stack, that would be really helpful.

@luigy
Copy link
Member

luigy commented Oct 3, 2015

I can confirm reflex-todomvc compiles using latest stack + ghcjs-0.2(improved-base) <3

I'm pretty sure nixpkgs should be currently broken in El Capitan, but with stack ghcjs dev environment should not be affected \o/ (but I'll wait until someone confirms :P)

for example in reflex-todomvc repo all you would need to do after having latest stack installed + a proper stack.yaml(waiting on thoughts for integration of nixpkgs(lts) + stack before submitting a PR) is

# get some fresh air until booting is done
stack setup
stack build
open $(stack path --local-install-root)/bin/reflex-todomvc.jsexe/index.html 

in ghcjs repo improved-base was recently merged into master
@ryantrinkle maybe reflex-* repos should follow for develop branches? :P
lmk if I can help or thoughts

@jasonzoladz
Copy link

@luigy -- I can't seem to repeat your experience.

ghcjs-0.2 (improved-base) and stack work fine for me, but I get conflicting dependencies when I attempt to build reflex/reflex-dom. (Tried a few different versions of a stack.yaml, to no avail.) Can you share your stack.yaml?

@luigy
Copy link
Member

luigy commented Oct 3, 2015

@jasonzoladz I've uploaded a repo with the steps I took

after you have a recent stack version installed clone my repo and run ./try-stack-reflex

@Ericson2314
Copy link
Member

So within a few days, I think we can ditch custom nixpkgs and overrides, and just use LTS. Here are some things that should happen first:

@Ericson2314
Copy link
Member

@k0001 I see you have done some work getting reflex and friends working on recent nixpkgs. Tagging you in case you have anything to add.

@ryantrinkle
Copy link
Member

@Ericson2314, thanks so much for looking into this. That sounds great.

@Ericson2314
Copy link
Member

Thanks!

@jasonzoladz
Copy link

@luigy Thanks! Works great. (The bash script identifies where I went wrong.) I'm a little lightheaded; this new ghcjs-actually-installs-easily-world discombobulates me. Where's U2 a track when you need it?

@k0001
Copy link

k0001 commented Oct 4, 2015

(sent from my phone, sorry for any typos)

Thanks for copying me here @Ericson2314.

I just wanted to mention that, as of today, reflex-dom (the hammishmack-something branch, I can't remember the name now) builds out of the box in nixpkgs master, using a post improved-base ghcjs. I'm happy to continue keeping this up to date.

I'm all for an lts constrained setup in nixpkgs too, but that won't happen before ghcjs is released to hackage.

I can't comment about try-reflex as I have never used that.

@Ericson2314
Copy link
Member

I already opened an issue about getting onto a modern nixpkgs, so I updated my todo list there: #24

@k0001
Copy link

k0001 commented Oct 5, 2015

FYI, I just sent a pull request with some updates to the GHCJS suite: NixOS/nixpkgs#10234

@3noch
Copy link
Member Author

3noch commented Oct 17, 2015

@luigy Thanks so much for sharing your work! What will it take to get this out of the "custom patching" phase and into the mainstream?

@luigy
Copy link
Member

luigy commented Nov 1, 2015

The "custom patching" was required for some version bumps that were not compatible with the Stackage snapshots I was using to test which have been updated by Ryan already (reflex-dom still needs to relax it's bounds for bifunctor package, though)

btw @3noch I've pushed support for stack 1.7 (which now includes Stackage snapshot support for ghcjs builds), and also support for ghcjs old-base... try it out and lmk how it goes :)
The only issue I ran with it is that it currently requires having ghc compiler in your path to build

@briansunter
Copy link

+1 was able to build reflex todo with your stack project

@ali-abrar
Copy link
Member

Closing this since there hasn't been any activity in a couple years. Feel free to reopen if there is an issue that needs resolution here that I've missed.

@ali-abrar
Copy link
Member

matthewbauer pushed a commit that referenced this issue Nov 20, 2019
Fix route config for files ending in newline
mzabani pushed a commit to mzabani/reflex-platform that referenced this issue Jun 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants