-
Notifications
You must be signed in to change notification settings - Fork 2
How to generate one stack project for both mac and linux? #1
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
Comments
It doesn't take much to get the generated stack project building without platform-specific stuff in it; 1) remove the fsnotify-related stuff and 2) change the resolver: - "enclosed-exceptions-1.0.3"
- "fsnotify-0.3.0.1"
- "hinotify-0.4.1"
- "shelly-1.9.0"
- shelly:
- "build-examples": false
- lifted: false
- resolver: "ghc-8.10.7"
+ resolver: lts-18.27 With these changes of the stack project generated with cabal2stack on linux I can still build on linux and can build on mac when I couldn't before. |
Hmm, the general problem here seems tricky. I don't know if Explicitly specifying the resolver being used certainly shouldn't hurt. I guess in this case that is enough because the resolver includes the right OS-specific packages/flags, so they can then safely be omitted from the Ideally I think it would be nice to drop "redundant" entries in the |
That would be nice to have. For the resolver's versions in
After generating a
A
|
I tried cabal2stack and found it generates different stack files on linux and mac for one project. There is only a very few differences but one is the same as I found in this closely-related thread about cabal freeze files:
This is cabal's doing isn't it when it chooses a plan? Is there no way around this that would enable creating a stack project that would work on both linux and mac?
The text was updated successfully, but these errors were encountered: