-
Notifications
You must be signed in to change notification settings - Fork 206
Question: relation between HIE and build tools like Cabal and Stack #1667
Comments
The IDE does nothing to actually build the project. An IDE is the lsp-client, such as vscode that makes use of an lsp-server, in this case HIE. If there s a mismatch between what you use for building and what HIE uses for building, then it might be possible that HIE shows errors in the sources, while on the command line everything seems to work fine. |
Ah, I understand. Is this the biggest/the only concern? That a project may show errors while the "other" build tool (i.e., invoked via command line) would succeed, or not show errors while the command-line build could fail (because the other build tool may have issues that HIE doesn't receive)? Thank you!! |
There are more differences, how we access dependencies that we need, how to obtain documentation for these modules, etc... In general, project management is very different with these tools. Imagine using However, if both build tools are supported equally by a project, it becomes a matter of preference. Some people do not want to build with |
Perfect, thank you! I think I understand now, even to the point of how to bring HIE and the other project build config in sync. Might need to ask more later, though - Haskel ecosystem is not a simple matter! ;-) |
It is not, but not so different to other ones: think java has ant, maven and gradle, the c tool chain or javascript. Haskell has one compiler (for better or worse) and stack and cabal share the same formats underneath (hackage, .cabal config files,...). |
To me the biggest huge difference/shock of how Haskell eco differs from most every other one is how fragile/unstable the interfaces are, and how easily a build gets broken unless everything is exactly at the original versions (which isn't very friendly on bug fixes). So, my builds are repeatable only as long as I'm willing to maintain exactly the same toolchain and all the dependent packages at their original (unfixed!) version.
|
I mean, have you seen python? There was quite the hassle because of version 2 and 3. Moreover, you are rather describing the workflow with
I had terrible experience with java and maven. Finding a build-plan (if you are not using straight spring-boot-start) manually is close to impossible and very annoying, since it mostly on-startup exception traces. That is something that will never happen with |
Ah, yes. I'm not doing a lot there, but yes - you're quite right, it was a mess. However, that was a one-time breaking change - moving from one huge pile to another. And so far Python-2 is still maintained. With Haskell it's every time something changes. I can't complain enough about how much frustration
I hear you. I don't use Spring myself, so can't comment - but so far everything I pulled from Maven Central just happened to work with whatever code I was writing... So far, at least... ;-)
Well, But I see that nowhere the grass is truly green. ;-) :-) |
I guess I should close this issue - you answered nicely all of my questions (and even tolerated a rant! ;). |
I'm trying to understand the role HIE plays in the build process (initiated by an IDE), and the importance of matching the build tool (Stack or Cabal) that the IDE would use to actually build the project, to the tool specified in the
hie.yaml
file. And the consequences of the mismatch: e.g., the IDE would invoke Cabal, but HIE thinks the project uses Stack.I thought that HIE is basically an assistant to an IDE, pointing the IDE at potential problems with the project sources. So, why does it matter whether HIE makes the same assumption about what build tool to use, as the IDE does? And what would happen if there is a mismatch?
The text was updated successfully, but these errors were encountered: