-
Notifications
You must be signed in to change notification settings - Fork 26
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
Getting VSCode/HLS to work with Drasil #2292
Comments
master...balacij:2292_stack_packages Writing up the proof of concept, not yet complete but it seems to solve my problem. Let me know what you think! EDIT:
EDIT 2: I ran through all of the CI steps in the travis configuration and it appears to work. |
JacquesCarette
added a commit
that referenced
this issue
Feb 9, 2021
Cabal build files -> hpack/stack built build files & update GHC version to Stack GHC 8.8.4: Resolve #2292 stack packages
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Right now, VSCode's best Haskell support is from the official Haskell plugin. Unfortunately, the backend of the plugin, Haskell Language Server, only supports a handful of GHC versions (8.6.4, 8.6.5, 8.8.2, 8.8.3, 8.8.4, 8.10.1, and 8.10.2).
As such, I was wondering if it would be alright to update our GHC target/dependency so that we may use one of the versions supported by the Haskell Language Server (and hence the VSCode plugin).
If we are to update our GHC target, then I assume we would want to target something stable and well-supported, such as to GHC 8.8.4 (8.10.* does not yet seem to be supported by Stack in LTS, but 8.8.4 is also the most recent LTS of Stack LTS-16.31)
Additionally, I assume we would need to also update some of our libraries to be compilable against one of these higher GHC versions. If I'm not mistaken, we are currently using stack with cabal build files, which I believe is no longer recommended by Stack. Their documentation seems a bit out of date/confusing but they seem to say that the cabal file should be built automatically through hpack/
package.yaml
(meaning that the recommended way is to only interact withstack.yaml
andpackage.yaml
, and to use hpack to generate the cabal file [which is done automatically when we runstack build
/stack install
/stack exec hpack
]). Related: https://docs.haskellstack.org/en/stable/GUIDE/#adding-dependenciesI've gone ahead and taken a peek at our total dependency list (using
cd code && stack ls dependencies
to gather them, which I hope is sufficient) and have found that most packages either have minor (as per semantic versioning) or no updates in comparison with ours, so the change of breakage might be minimal. However, 5 of the dependencies are not listed on Stackage (the rest appear to be), so they might require some unknown amount of manual work to get them to work again with the entire system. I'm not entirely sure the extent of work of which is required yet.The following 5 packages are not found on Stackage/LTS-16.31 (but we can likely still get them from Hackage/somewhere else using
extra-deps
inpackage.yaml
):Related: https://www.stackage.org/lts-16.31
I believe (but not entirely certain) that this would help with getting VSCode/HLS to support Drasil fully. This might also be helpful for the students coming in the Summer term to work on Drasil as well.
As such, I am wondering if it would be okay to attempt to update our GHC target and the packages with it, while also converting the inner packages to stack.yaml/package.yaml Stack projects. This second part of converting our cabal files to package.yaml/stack.yaml files may be unnecessary but it may also simplify future updates to our GHC version should we choose to do so again.
(Maybe this is too much work for the goal of getting HLS support and I should just use another IDE? I might also be understanding the various errors created from the VSCode Haskell plugin but this work doesn't seem like it would hurt anything to try [or maybe it would?])
Thank you!
The text was updated successfully, but these errors were encountered: