-
-
Notifications
You must be signed in to change notification settings - Fork 195
bootstrap: Use dependencies.txt to list packages #179
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
Conversation
|
||
if echo "$deps" | grep -q 'old-locale'; then | ||
# Move old-locale to the bottom. | ||
# Unfortunate, but without this cabal-install tries to update old-locale. |
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.
If you ask me to explain why, I have no idea.
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.
Maybe I should grab a machine with GHC 7.6 or 7.8 and investigate, because an explanation would be great.
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.
To compare lists of itens, comm
from GNU coreutils is usually a good choice. Try this:
comm -23 <(dependencies `ls exercises`) <(ghc-pkg list --simple-output --names-only | xargs -n1 | sort)
In my local setup I cannot test it easily, but it will probably work.
Edit: Sorry! Now I see you already did that below.
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.
although the xargs -n1
is one thing I was missing. I settled on tr " " "\n"
instead, guess they do the same thing
OK, testing a few things on Travis leads me to think this will be OK now. The duplicate PRs with this one are unfortunate, should test things out on Travis on my fork of the repo rather than here, didn't get that idea until while working on this PR. |
On reviewing Travis logs:
|
Don't worry about the extra PRs...I did the same a few days ago. |
I guess my main complaint is that we see the contents of We probably don't even need to see Based on this, perhaps remove |
already_installed=$(ghc-pkg list --names-only --simple-output | tr " " "\n" | sort) | ||
not_installed=$(comm -23 <(echo "$deps") <(echo "$already_installed")) | ||
|
||
echo "Not installed packages ($(echo "$not_installed" | wc -l)):" |
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.
sigh, off by one error. Not installed packages (1):
when not_installed == ""
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.
echo -n
it is.
too noisy to see `deps` and `already_installed` so many times. It's easy to locally reproduce the value of `deps` and `already_installed` isn't so interesting. We'll just print out `not_installed`.
Heh, I am satisfied with this now. |
Ok. I'll clear all the caches and rerun the Travis builds just to be sure everything is fine before merging this one. |
Would you mind if I squash those two commits in a single one? |
OK with me to squash |
Thanks to #159, we have a list of dependencies of each exercise. We
should replace the current hard-coded list in
bootstrap.sh
with oneinferred from
dependencies.txt
.Closes #175