-
Notifications
You must be signed in to change notification settings - Fork 74
Make paths of cabal, ghc available to tests? #393
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
Comments
I have a similar issue with A possible workaround would be to list Cabal and GHC in I see that the integration script generated by I looked through the many command line flags |
This problem can be solved by adding these lines: - name: Set PATH and environment variables
run: |
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
+ echo "$HOME/.ghcup/bin" >> $GITHUB_PATH
+ "$HOME/.ghcup/bin/ghcup" set ghc "$HCVER"
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV" — Into the generated integration script. Maybe we can have a command line option for this? |
You probably want to depend on https://hackage.haskell.org/package/ghc-paths with all the drawbacks it brings. It's a bad practice to depend on compiler being called (EDIT: or make a |
Why? Where is this written? I do depend on this in my everyday work. |
You have not answered my question: maybe we can have a command line option for this? It does not seem like a particularly hard thing to implement. I guess I can draft a patch. It seems you are vaguely displeased but being vaguely displeased is not a constructive way to solve problems and I do not think we have exhausted the conversation yet. |
That is irrelevant. Somethings are worth doing even they are hard, some easy things are not worth it. I don't know what you are doing, but needing to call |
Alright, so not having But what about Cabal? The specific case I have is that I want to run the built executable so that I can test it. The way I find the executable is by calling Cabal sometimes wants to have So maybe I only need Cabal. |
That's |
Alright, let me offer you a use case. Imagine you want to add automated checks to You can add Cabal to |
At the moment, we work around it by applying the following patch to the generated GHA workflow: I had hoped that we could somehow get rid of this patch. From what I gather, that would only work if either
It appears (1) is unlikely to be fixed: haskell/cabal#10072 (2) is not easily possible for lack of a reliable way to call (3) could be implemented by a flag offered by |
My stance is unchanged, make The |
It appears I commented a few hour too early. I managed to derive the |
I have a test suite that runs compiles up some tests the results of which are processed by
tasty-golden
.To invoke the compiler, I trying to use
cabal exec
.The only way I have found of getting hold of
cabal
is to amend the.travis.yml
to export theCABAL
and do a bit of processing.Is there a reason that it is not exported in the
haskell-ci
-generated original? Is there a better way to pick up thecabal
that is being used, or indeed to compile the test cases otherwise?I have tried to use
GHC.paths
to try to get hold ofghc
(for line 81), but that doesn't seem to work. I just getcabal: The program 'ghc' version >=7.0.1 is required but it could not be found.
, but perhaps that is justcabal
complaining that it can't find aghc
to use for its own purposes (which could be fixed by a-w
flag, if I could get hold of the location ofghc
from within this test harness). Suggestions for how best to get hold of the rightghc
within the test harness welcome!PS:
Near the start of the job, I get a, probably harmless, diagnostic:
The text was updated successfully, but these errors were encountered: