Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add a feature for Haskell (GHC) #470
base: main
Are you sure you want to change the base?
Add a feature for Haskell (GHC) #470
Changes from 1 commit
c6c62b2
580b154
b6f48a9
e1f52b2
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I'm not too familiar with how features work. My feeling is that this list can become outdated quickly. For HLS, it already is. Would it not be enough to choose between recommended and latest? Can the user enter manual strings regardless?
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.
It would be better to use a generic snippet to check other Features to do this.
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.
I don't quite follow this comment, can you clarify?
Thanks!
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.
I believe @eitsupi is referring to using
check_packages
helper function instead of this logic.https://github.com/devcontainers/features/blob/main/src/docker-in-docker/install.sh#LL86-L91C2
I think it would be nice to use
check_packages
in this Feature as well for consistency.(Would also need to copy
apt_get_update
along withcheck_packages
)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.
Hrm, I'm not sure that those scripts do exactly what I want to do here. For example, they won't work correctly on a non-debian image where
gcc
is already installed.Additionally, copying functions from one install.sh to another doesn't seem to be a great practice, is there a way to share common script snippets between features?
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.
Note that this repository is focused on debian-based containers at this time. Most Features will only work with debian-based images.
features/README.md
Line 32 in 1449f41
See devcontainers/spec#209
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.
I suggest to not do all this manually, but use the bootstrap script, which allows fine grained control via env vars.
E.g.
This will also try do adjust shell config to add
~/.ghcup/bin
to PATH and most importantly install stack installation hooks that make sure HLS actually works with stack (there are ABI issues). See https://www.haskell.org/ghcup/guide/#strategy-2-stack-hooks-new-recommendedRight now the bootstrap script assumes you want latest of stack and HLS, but I can add environment variables to control that as well.
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.
Oh and the bootstrap script also creates a
~/.ghcup/env
file that can be sourced to get the correct PATH.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.
So is
~/.ghcup/bin
in PATH?