-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
feat: add Haskell Stack support #546
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job of adding Haskell. I have some comments concerning code style
Somehow Ubuntu and Windows Tests are still failing? |
Same Python version issue addressed in this branch: update-python. |
Rebased on top of |
@bijancn I've rebased to latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CI workflow will need to be updated to include a haskell-setup action. I'd suggest rebasing over master to make sure the new CI system runs.
Looks good so far 👍
Just a few things need tackling before we can merge it.
@matchai I have added mstksg/setup-stack, because this requires |
Also, I needed to export It would be nice to point how to better make it. 😄 |
@heyrict Would you mind marking the changes you requested as resolved? (Or I can dismiss them for you if you'd like). It looks like this'll be ready to merge pretty soon and those requested changes will block the merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chipbuster Oh sorry, I should have approved this.
@m0nhawk You can use render_module("haskell")
.use_config("blah")
.env("HOME", var1) See the test We've also been a little skittish about using the user's actual home directory because of a slew of bugs that have come up in testing before (usually our assumptions about the state of user's |
@chipbuster Thank you. I've added Alternatively, I can make use of I've also changed the workflow to include the steps to setup Haskell Stack for all OSs, but it's not running (because it's a change from the fork?). |
@m0nhawk Since the test using
What's that?
I'll try to figure out what's going on with that. |
|
Were the tests running before your latest set of commits? I seem to recall that they were, but I'm not certain. (If they were, then that suggests that GH got confused by something that you added to the workflow YAML) |
Yes, it was running right before the workflow change. |
Hmmm. The file looks like valid YAML, but is there any possibility that it's somehow not valid for GH Actions? Could you try reverting the YAML change and see if the tests run? Sorry, I'm not particularly a specialist in GH Actions (I'm more familiar with Gitlab CI) and matchai doesn't see anything obviously wrong either, so we might be taking stabs in the dark here. |
I reverted the changes and now it's running. Not sure what's wrong with it. |
Well, debugging this will be interesting, as GitHub doesn't seem to have a YAML validator yet (and the only 3rd party one I can find hasn't been updated since Actions was in early beta). I'll try my best to take some time to play around with this later today, maybe copy the branch into my fork and try opening a (temporary) PR on that. If you figure out what happened before then, please do ping me so we can get this merged! |
I'll also check this. I've already enabled my fork Github Actions, so I'll check if it runs there. |
In my fork it fails with:
I'll continue testing with my fork now on. Thanks for help! 😄 |
@chipbuster I managed to make it run on everything, except Windows. Will try that later locally. |
@chipbuster Windows tests have some strange issues with environment variable, there is only |
@m0nhawk Does it work on Windows at the moment? |
Yes, |
@matchai Are we okay with merging this without functioning Windows CI on the module? It seems that the module and command do work on Windows, but we can't get GH Actions working. |
Yep, that's fine by me. |
Alright, let's get this PR merged then! (I should really get back into Haskell someday) |
@all-contributors Please add @m0nhawk for code, doc, and tests. @m0nhawk Thanks so much for all your work on this PR, and for being patient with us through a whole bunch of changes in the project structure! We really appreciate it 😄 |
I've put up a pull request to add @m0nhawk! 🎉 |
@chipbuster Thank you (and other) for help and discussion. I found starship to be really awesome for cross-platform prompt (as a long time user of spaceship, zsh and fish). And learning some Rust was nice. :) And, of course, started with the missing feature I need. I will try to fix it for Windows in Github Actions, it looks like some missing environmental variables, except the one I mentioned is needed. |
Add a Haskell Stack module when a stack.yaml file is detected
Description
stack.yaml
file.Motivation and Context
Closes #I have a bunch of Haskell projects and I'm really missing support for Haskell in
starship
.Types of changes
Screenshots (if appropriate):
How Has This Been Tested?
Checklist:
.hs
files etc.