Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

Use installed ghc in stack linux builds #1737

Merged
merged 2 commits into from
Apr 15, 2020
Merged

Conversation

jneira
Copy link
Member

@jneira jneira commented Apr 13, 2020

To avoid download it again and not waste disk space
@jneira jneira requested a review from fendor April 13, 2020 15:13
Copy link
Collaborator

@fendor fendor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jneira
Copy link
Member Author

jneira commented Apr 14, 2020

I am afraid that the actual configuration is not valid for wrapper-test, cause it assumes that stack will have the correct ghc downloaded or in path. It needs up to two different ghcs (ghc-8.8.1 and ghc-8.6.5) so not sure if it will be enough space for both although we are not downloading the main one, the used to build everything else.

@fendor
Copy link
Collaborator

fendor commented Apr 14, 2020

How about we mock the wrapper tests? You think that is possible?

@fendor
Copy link
Collaborator

fendor commented Apr 14, 2020

Idea for test-mocking:

  • Add a number of scripts named ghc-* where * is the GHC version
    • These scripts can be python scripts, or if it works, there can be both ghc-* and ghc-*.cmd
  • Each of these scripts only know the parameter --numeric-version
  • When running wrapper tests, we do something like export PATH=/path/to/scripts:$PATH
  • For stack, set system-ghc: True.

@jneira
Copy link
Member Author

jneira commented Apr 14, 2020

Mmm, interesting, but stack with system-ghc needs an executable ghc (without the version suffix) in path, no? (i have to test it) could we cheat stack and make it think that the script is ghc?

In fact, we have the real ghcs! so we could point to the appropiate one for each test. This can be done manually running each test separately and set the path with the appropiate ghc in the bash script.
EDIT: No it cant be done in that way cause the execution itself needs the main ghc

Not pretty, though 🤔

@jneira
Copy link
Member Author

jneira commented Apr 14, 2020

but stack with system-ghc needs an executable ghc (without the version suffix) in path, no? (i have to test it)

I was wrong, stack picks a ghc-${version} in path if it needs it so the solution is simpler than i thought: we can set in path the needed ghcs, putting the main one in first place

@jneira
Copy link
Member Author

jneira commented Apr 15, 2020

Ok, the stack linux jobs that has not failed due to the response timeout are successful now, so i think the pr could be merged

@jneira jneira merged commit f2c727b into haskell:master Apr 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Azure stack linux jobs fail due to disk space
2 participants