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

Check that new-build works with ghc-mod/haskell-mode #3731

Closed
ezyang opened this issue Aug 29, 2016 · 9 comments
Closed

Check that new-build works with ghc-mod/haskell-mode #3731

ezyang opened this issue Aug 29, 2016 · 9 comments

Comments

@ezyang
Copy link
Contributor

ezyang commented Aug 29, 2016

Assuming that you modify these to invoke cabal new-build rather than cabal build, do they work? Would be good to test.

CC @maxigit

@23Skidoo
Copy link
Member

Would be also nice to patch intero to make it support cabal new-build instead of just stack.

@dcoutts
Copy link
Contributor

dcoutts commented Sep 8, 2016

I discussed integration with ghc-mod and leksah with their authors at MuniHac. They're planning to file a ticket discussing what info and interface they'd like to get extra info out of cabal new-build, e.g. extensions to the plan.json or new hidden ide command to get things like the ghc environment / flags etc.

Note that leksah now uses cabal new-build as their default build system so we can @hamishmack & @jaccokrijnen for testing & feedback.

@23Skidoo
Copy link
Member

23Skidoo commented Sep 8, 2016

Related: #2771.

@maxigit
Copy link

maxigit commented Sep 8, 2016

Would it not be possible (and probably simpler) to have, either a hacked
version of cabal or a way to configure (per directory) cabal to translate
all basic command (build, install) to their corresponding new version ?

On 8 September 2016 at 12:42, Mikhail Glushenkov [email protected]
wrote:

Related: #2771 #2771.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#3731 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAHCiNp1GpORc97CkTU_3Y0ByT_ZMR-Mks5qn_SxgaJpZM4Jv99p
.

@ezyang ezyang added this to the Default nix-local-build milestone Sep 8, 2016
@ezyang
Copy link
Contributor Author

ezyang commented Sep 8, 2016

maxigit: Yes, it would be very simple. Or even an environment variable to change the sense of the flags. Actually a fix like that should probably go in 2.0. @maxigit do you think you could take a swing at this?

@maxigit
Copy link

maxigit commented Sep 8, 2016

I'm thinking of a file instead of environment variable because it's allows to be set by project within the same environment. For example, I use Spacemacs, which is run globally and I switch for one project or another (by switching buffer). I can try to have a go, but I am really busy. I am considering writing a generic wrapper to do a similiar thing but for any executable, as well as changing the executable itself. This will solve the ghc-mod problem, when you need to change the version according to the version of GHC.
It should also allow to swap between cabal and stack transparently. However, I don't really have time for any of this. I can have a try if you let me know which file to look and where would be the best place to add this flag : cabal.config. cabal.project, anything else ?

@ezyang
Copy link
Contributor Author

ezyang commented Sep 8, 2016

A generic wrapper sounds like it would be easier for you to do, and would help you do other stuff. We could then mention it in the documentation as a way to interact with new-build. (Doing this as a setting in cabal.project doesn't sound easy, it doesn't get parsed and read early enough to affect command dispatch.)

@maxigit
Copy link

maxigit commented Sep 11, 2016

I've done a generic wrapper, called Crew. It's not battle tested but seems to work for my use case (which is use "cabal build" key binding in spacemacs. Comments are welcome.

@ezyang
Copy link
Contributor Author

ezyang commented Sep 11, 2016

Thanks @maxigit!

@phadej phadej modified the milestones: 3.0.1.0, Nov 27, 2019
@gbaz gbaz closed this as completed Aug 28, 2021
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

6 participants