Skip to content
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

Update for new Cabal #625

Closed
treeowl opened this issue Apr 12, 2019 · 10 comments
Closed

Update for new Cabal #625

treeowl opened this issue Apr 12, 2019 · 10 comments

Comments

@treeowl
Copy link
Contributor

treeowl commented Apr 12, 2019

We currently use deprecated cabal-install commands that are going away. Let's not.

@treeowl
Copy link
Contributor Author

treeowl commented Apr 12, 2019

@phadej @hvr, I'm hoping maybe one of you could help out with this.

@phadej
Copy link
Contributor

phadej commented Apr 12, 2019

Simple solution doesn't work

% cabal new-build --enable-tests --enable-benchmarks
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: containers-0.6.0.1 (user goal)
[__1] rejecting: containers:!test (constraint from config file, command line
flag, or user target requires opposite flag selection)
[__1] trying: containers:*test
[__2] next goal: ChasingBottoms (dependency of containers *test)
[__2] rejecting: ChasingBottoms-1.3.1.5 (cyclic dependencies; conflict set:
ChasingBottoms, containers)

with issue being haskell/cabal#4087


The workaround is to split tests and benchmarks into own package(s), used only in CI.

packages:
  containers/
  containers-tests/
  contaienrs-benchmarks/

That's straightforward thing to do, and both cabal v2-build and stack would work with this. One could say that downside is that say, Stackage, won't build tests and benchmarks, but it doesn't anyway so it doesn't matter. (Some Nix users might actually build container tests, but I doubt, as they'll need to solve circularity as well).

@treeowl
Copy link
Contributor Author

treeowl commented Apr 12, 2019

Splitting tests and benchmarks into their own packages sounds very nice, but it has its own complication. Those packages will need to be built on top of a containers compiled for testing, which sounds like a bit of a mess. Will we need a custom CI script to handle it?

@phadej
Copy link
Contributor

phadej commented Apr 12, 2019

@treeowl
Copy link
Contributor Author

treeowl commented Apr 12, 2019

I'm sorry, could you point me to the relevant parts? What I'm talking about is that running the containers tests and benchmarks requires containers to be compiled with -DTESTING, which is not how it should usually be compiled. We could probably change that, and maybe we should, but it will be extremely annoying. In particular, QuickCheck uses show to explain what failed; if we can't customize Show for testing, we'll need to work out another way to get QuickCheck to show us what we want.

@treeowl
Copy link
Contributor Author

treeowl commented Apr 16, 2019

It seems this is mostly done, but the testing on GHC/Cabal head has been removed, presumably by mistake.

@treeowl
Copy link
Contributor Author

treeowl commented Apr 17, 2019

@phadej, I'd appreciate your help restoring can-fail testing for ghc/cabal head. The new .travis.yml is too different from the old for me to know what to do with that; in particular all the env stuff is gone.

@phadej
Copy link
Contributor

phadej commented Apr 17, 2019

Do you really want to let CI fail for GHC HEAD? I suspect it will happen when you less want to track moving target?

@phadej
Copy link
Contributor

phadej commented Apr 17, 2019

Or did I misunderstood? Adding ghc-head job which can fail is relatively simple: I explained in #628

Making that job to be required, i.e. so whole build can fail is not supported.

@sjakobi
Copy link
Member

sjakobi commented Jul 15, 2020

I'll tentatively close this, since the setup has evolved a lot since the last activity here.

Please reopen if there's more to be addressed here.

@sjakobi sjakobi closed this as completed Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants