Skip to content

Force resolving test dependencies on cabal#342

Merged
utdemir merged 1 commit intomasterfrom
ud/fix-cabal-test
Aug 31, 2021
Merged

Force resolving test dependencies on cabal#342
utdemir merged 1 commit intomasterfrom
ud/fix-cabal-test

Conversation

@utdemir
Copy link
Copy Markdown
Contributor

@utdemir utdemir commented Aug 20, 2021

For some reason we started getting:

cabal: Cannot test the package linear-base-0.1.1 because none of the
components are available to build: the test suite 'test' and the test suite
'examples' are not available because the solver did not find a plan that
included the test suites. Force the solver to enable this for all packages by
adding the line 'tests: True' to the 'cabal.project.local' file.

On the CI, even on our branches without any build system related changes. It's not clear to my why is this happening, but the only mutable thing I can think of is the Hackage index, so probably a version of a package is released and that is confusing cabal.

Anyhow, adding tests: true to cabal.project as suggested seems to fix the issue. I added it to cabal.project instead of cabal.project.local because I don't see why anyone developing linear-base wouldn't want the tests.

Alternatives I can think of:

  • We can leave cabal.project as is, and pass --enable-test to cabal invocations which does the same thing.
  • We can figure out why the solver is not able to figure things out and try to fix that with adding version bounds; but it's not clear to me if this is better or how to do this.

@utdemir utdemir requested a review from aspiwack August 20, 2021 00:07
Copy link
Copy Markdown
Member

@aspiwack aspiwack left a comment

Choose a reason for hiding this comment

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

I think I would have gone the --enable-tests route. But this is fine.

@utdemir utdemir merged commit 7357806 into master Aug 31, 2021
@utdemir utdemir deleted the ud/fix-cabal-test branch August 31, 2021 00:17
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

Successfully merging this pull request may close these issues.

2 participants