Comments (10)
Nevermind, the solver was picking outdated version of hspec-core :/
from hspec.
Nevermind, the solver was picking outdated version of hspec-core :/
I'm puzzled how this could happen. Which exact version was picked? Are we missing a Hackage revisions that prevents this version from being picked?
from hspec.
Cabal is picking hspec 2.9.2 because it's the latest version that doesn't depend on ghc
.
I have a cabal.project.freeze file that specifies versions of ghc boot dependencies (e.g. directory) different than the ones provided by ghc 9.2.4 (the one I'm using) and that doesn't work because hspec
depends on ghc
and ghc
depends on different versions of these libraries, so any version of hspec
that depends on ghc
will be incompatible with the freeze file.
The best option would be for hspec-core
to get rid of the ghc
dependency as it's generally problematic (there's also #750, though I'm not sure how relevant that is).
from hspec.
Cabal is picking hspec 2.9.2 because it's the latest version that doesn't depend on
ghc
.
So we need a Hackage revisions for 2.9.2
and older, right? From what I see @andreasabel already added revisions, but apparently they are in inaccurate?
The best option would be for
hspec-core
to get rid of theghc
dependency as it's generally problematic (there's also #750, though I'm not sure how relevant that is).
ghc
is used to parse expected/actual values so that they can be pretty-printed for nicer output and diffs when a test fails.
We could try to make this dependency optional by using an automatic flag. PRs welcome.
from hspec.
So we need a Hackage revisions for 2.9.2 and older, right?
Revisions for what exactly? 🤔
We could try to make this dependency optional by using an automatic flag. PRs welcome.
Sounds good, see #753.
from hspec.
So we need a Hackage revisions for 2.9.2 and older, right?
Revisions for what exactly? 🤔
From what I understood: hspec-core-2.9.2
does not build with GHC 9.2.*, is that correct? Just to be sure, I'm assuming here that you did not pass --allow-newer
or something to Cabal. Is that correct?
So we need a Hackage revision to reflect this somehow, probably by constraining the version of base
.
from hspec.
Revisions for what exactly? thinking
From what I understood:
hspec-core-2.9.2
does not build with GHC 9.2.*, is that correct?
@arybczak I can't reproduce this. Can you provide:
- The exact versions of pinned boot dependencies you are using
- The compiler error you are getting
from hspec.
From what I understood: hspec-core-2.9.2 does not build with GHC 9.2.*, is that correct?
No, hspec-core-2.9.2 doesn't build with GHC 9.4 because of outdated vendored-in async package and any newer version doesn't build with my setup because it depends on the ghc
package.
So fair enough, adding base
constraint to 2.9.2 will make Cabal fail earlier with GHC 9.4, but that's a separate issue.
I can't reproduce this.
For a demonstration of a problem it's enough to create a dummy cabal project with cabal init
and then add to build-depends hspec-core == 2.10.6
and directory == 1.3.8.0
.
Now, see:
GHC 9.2.4:
unknown@electronics hspec-test $ cabal build -w ghc-9.2.4 --minimize-conflict-set
Resolving dependencies...
Error: cabal: Could not resolve dependencies:
[__0] trying: hspec-test-0.1.0.0 (user goal)
[__1] trying: hspec-core-2.10.6 (dependency of hspec-test)
[__2] next goal: ghc (dependency of hspec-core)
[__2] rejecting: ghc-9.2.4/installed-9.2.4 (conflict: hspec-test =>
directory==1.3.8.0, ghc => directory==1.3.6.2/installed-1.3.6.2)
[__2] trying: ghc-9.4.2
[__3] next goal: ghci (dependency of ghc)
[__3] rejecting: ghci-9.2.4/installed-9.2.4 (conflict: ghc => ghci==9.4.2)
[__3] skipping: ghci-8.10.2, ghci-8.10.1, ghci-8.8.3, ghci-8.8.1, ghci-8.6.5,
ghci-8.6.4, ghci-8.6.1, ghci-8.4.4, ghci-8.4.3, ghci-8.4.2, ghci-8.4.1,
ghci-8.2.2, ghci-8.2.1, ghci-8.0.2, ghci-8.0.1 (has the same characteristics
that caused the previous version to fail: excluded by constraint '==9.4.2'
from 'ghc')
[__3] fail (backjumping, conflict set: ghc, ghci)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: ghc, hspec-test, ghci, hspec-core,
base, ghc-boot
GHC 9.4.3:
unknown@electronics hspec-test $ cabal build -w ghc-9.4.3 --minimize-conflict-set
Resolving dependencies...
Error: cabal: Could not resolve dependencies:
[__0] trying: hspec-test-0.1.0.0 (user goal)
[__1] trying: hspec-core-2.10.6 (dependency of hspec-test)
[__2] next goal: ghc (dependency of hspec-core)
[__2] rejecting: ghc-9.4.3/installed-9.4.3 (conflict: hspec-test =>
directory==1.3.8.0, ghc => directory==1.3.7.1/installed-1.3.7.1)
[__2] trying: ghc-9.4.2
[__3] next goal: ghci (dependency of ghc)
[__3] rejecting: ghci-9.4.3/installed-9.4.3 (conflict: ghc => ghci==9.4.2)
[__3] skipping: ghci-8.10.2, ghci-8.10.1, ghci-8.8.3, ghci-8.8.1, ghci-8.6.5,
ghci-8.6.4, ghci-8.6.1, ghci-8.4.4, ghci-8.4.3, ghci-8.4.2, ghci-8.4.1,
ghci-8.2.2, ghci-8.2.1, ghci-8.0.2, ghci-8.0.1 (has the same characteristics
that caused the previous version to fail: excluded by constraint '==9.4.2'
from 'ghc')
[__3] fail (backjumping, conflict set: ghc, ghci)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: ghc, hspec-test, hspec-core, base,
ghci
This is because ghc
package is not reinstallable and it was compiled with a particular directory
version, hence if you depend on the ghc
package, you can only use versions of its dependencies it was compiled with.
Until the ghc
package is made reinstallable, the only workaround for this problem is to not depend on the ghc
package.
from hspec.
Until the
ghc
package is made reinstallable, the only workaround for this problem is to not depend on theghc
package.
I think cabal
is rather moving into the opposite direction, making ghc
non-upgradeable by definition:
from hspec.
#755 / hspec-2.10.7
addresses this.
from hspec.
Related Issues (20)
- Feature request: Support for `--job` batching HOT 1
- Document how to run specs without going through `cabal`
- --no-main is deprecated HOT 1
- Disabling QuickCheck `chatty` globally HOT 6
- I’ve run into what I think is a similar case – `describe "meh" $ around_ inTempDirectory $ do …` was breaking our hspec-golden tests, because `evaluateExample` for `Example (IO (Golden str))` expects to read/write the golden file. HOT 1
- `around_` inadvertently affects the test context HOT 2
- Can't set up auto discovery HOT 1
- Test output formatting HOT 2
- How can I get the "it" description? HOT 1
- Use displayException instead of show HOT 2
- with fail-fast the cleanup action of aroundAllWith is not executed HOT 2
- `x-partial` warning with GHC 9.8 HOT 1
- suggestion for more convenient test feedback using Cabal HOT 4
- Please revise Hackage base bounds on hspec-core 2.10 series HOT 2
- How to verify a predicate against each element of a list? HOT 5
- Benchmarks
- hspec-discover: builderMainLoop: exec: invalid argument (Bad file descriptor) HOT 4
- Spec hook for each discovered file in `hspec-discover`
- hspec-core-2.11.7 build failure with QuickCheck-2.15 HOT 2
- `hspec` version bounds permit QuickCheck 2.15 - breaking the build HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hspec.