-
Notifications
You must be signed in to change notification settings - Fork 842
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
stack ghcid
command
#1948
Comments
sounds great to me! also chuck in a |
Cool idea! Perhaps it makes sense to do the integration fully within ghcid, though? The reason is that if we want ghcid to handle adding / removing packages from the list, then it should also update its file watch. Perhaps stack should have a command to yield a list of files to watch? |
I'm keen on whatever integration people want, and agree that shoving in ghcid could work too. I'm not against a special restart flag that uses a command or similar to figure out the restart files. |
Yeah, I can imagine adding that as
|
Yes, and myself I'm more of a custom script tailored to my project (hello shake another tool that deserves more love) but... here I go!™ My "secret" reason I didn't explicitly mention was exposure/discovery strategy.
Other langs are great at selling their stuff and imo I have a
|
Oh the current behaviour is a bit of a temp hack, since it lets GHCJSi use the existing pipes to the node.js interpreter. I'll change this at some point (or accept pull reqs!) |
@luigy Good ideas! I've enjoyed using ghcid a bit lately. I agree that it makes sense to have stack be a general swiss army knife of Haskell. However, at once, we've got to be careful about not jamming in too many features and making things complicated. This is why I didn't want to implement something like ghcid inside stack itself. If someone wants to champion an idea like this (such as yourself!), and implement and maintain it, then I'm all for it! I would like to keep the complexity in ghcid as much as possible, ideally the stack bit would just be knowing how to install it and how to invoke it. We definitely need more thought on how to run ghci-like tools - I'd have liked to have merged something like #1737 but it didn't seem like the right change. |
I agree with @mgsloan - as much inside ghcid makes sense, and then use One note @luigy - I suggest by default you don't pass anything as |
I've wanted Would it be sensible to have |
I'd rather that Stack wasn't monitoring anything. So the reason that we need Stack involved is because a different |
Note that if |
@ndmitchell Cool, sounds good! In that case, the code in stack to invoke ghcid should have very little complexity. So it could either be builtin or added as some |
Ok, I'll fix the existing Stack/Ghcid bugs (there are 2) and we can see what more is required. |
So there are two features that would be very useful to get better Stack/Ghcid integration before going as far as
|
Opened #2069
Not sure how straightforward this would be. Currently we pass full control over to the ghci process. Maybe it would be possible to do this in a separate process? Could get tricky to integrate with the stuff that parses out ddump-hi info to catch the cases where there are deps not mentioned in the cabal file. Feel free to open a discussion issue about it. |
No news on this? 😢 |
@ChrisPenner - I just type |
Should that issue be reopened? Having to make a manual selection each time your start GHCi in project with multiple executables is very jarring. |
I'm quite pleased with ghcid+stack setup, but there's one thing bugging me. If I'm developing also a dependency on my main project, ghcid doesn't reload it. My command line is I can add |
Seeing #1939 now I kind of want to do the same for
ghcid
(it's so good)There has to be more convenience things we can wrap around, but first what comes to mind is something like:
I find the name "ghcid" not so intuitive so most likely have an alias with a clear/friendly name, but it's benefits are worth it:
pretty much dev workflow on steroids 💪 and close to "light speed" ⚡
I also really want to simplify stack's
--help
output and this is not contributing, but that is talk for another issue 😂 and..I should really get around to getting the multi-package story sorted for #1364 to make this even faster for packages that require presence of autogen files
people not familiar with
ghcid
here are few short clips I show off what it can doghcid --command="stack ghci" --test=":!stack build"
(ghcid give me fast error feedback and only tell stack to build once it's "all good"[in ex. typechecks] 🙌 ) [great alternative tostack build --file-watch
👌 ]great work by @ndmitchell aka haskell tooling ninja and @reiddraper for showing this is possible in ordeal
Also, cljs/js we are coming! 🐢 🚀
First, I would 💚 it if @luite makes
ghcjsi
behave similarly toghci
🙏 (don't steal stderr 😛 )The text was updated successfully, but these errors were encountered: