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

3.0 Solver issue #6099

Closed
davean opened this issue Jun 22, 2019 · 7 comments
Closed

3.0 Solver issue #6099

davean opened this issue Jun 22, 2019 · 7 comments

Comments

@davean
Copy link

davean commented Jun 22, 2019

I've observed a weird behavior that I haven't dug down into but follows the pattern below:

cabal new-configure
-> failure
cabal new-configure --allow-newer=base
-> success
cabal new-configure
-> success
cabal new-configure
-> failure

It seems that the 3rd new-configure is picking up settings and using them but also clearing them.
Since this is new-configure it seems it should clear them and not use them.

Additionally, there is an error "(conflict: requires NoStarIsType)", which comes from:

if impl(ghc >= 8.6) default-extensions: NoStarIsType

as that's an extension it doesn't seem it should cause a dependency resolution failure. In fact, it doesn't in 2.4 so it seems to be a regression.

[ 15:50 ] davean@indite AlON % cabal -V
cabal-install version 3.0.0.0
compiled using version 3.0.0.0 of the Cabal library
[ 15:50 ] davean@indite AlON % cabal new-configure                                                                     [0, 0s]
'cabal.project.local' file already exists. Now overwriting it.
Warning: Parsing the index cache failed (Unknown encoding for constructor).
Trying to regenerate the index cache...
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: AlON-0 (user goal)
[__1] trying: base-4.12.0.0/installed-4.1... (dependency of AlON)
[__2] trying: reflex-time-0 (user goal)
[__3] trying: delay-0 (dependency of reflex-time)
[__4] next goal: dimensional (dependency of delay)
[__4] rejecting: dimensional-1.3, dimensional-1.2 (conflict: requires
NoStarIsType)
[__4] rejecting: dimensional-1.1 (conflict: base==4.12.0.0/installed-4.1...,
dimensional => base>=4.7 && <4.12)
[__4] rejecting: dimensional-1.0.1.3, dimensional-1.0.1.2 (conflict:
base==4.12.0.0/installed-4.1..., dimensional => base>=4.7 && <4.11)
[__4] rejecting: dimensional-1.0.1.1 (conflict:
base==4.12.0.0/installed-4.1..., dimensional => base>=4.7 && <4.9)
[__4] rejecting: dimensional-1.0.1.0, dimensional-1.0.0.0,
dimensional-0.13.0.2, dimensional-0.13.0.1, dimensional-0.13,
dimensional-0.12.3, dimensional-0.12.2, dimensional-0.12.1.1,
dimensional-0.12.1, dimensional-0.12, dimensional-0.10.2,
dimensional-0.10.1.2, dimensional-0.10.1.1, dimensional-0.10.1,
dimensional-0.10, dimensional-0.9, dimensional-0.8.2.1, dimensional-0.8.0.1,
dimensional-0.8, dimensional-0.7.3, dimensional-0.7.2, dimensional-0.7.1,
dimensional-0.7 (conflict: delay => dimensional>=1.0.1.1)
[__4] fail (backjumping, conflict set: base, delay, dimensional)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: base, dimensional, delay, AlON,
reflex-time
Try running with --minimize-conflict-set to improve the error message.

[ 15:50 ] davean@indite AlON % cabal new-configure --allow-newer=base                                                  [1, 7s]
'cabal.project.local' file already exists. Now overwriting it.
Resolving dependencies...
Build profile: -w ghc-8.6.5 -O1
In order, the following would be built (use -v for more details):
 - ChasingBottoms-1.3.1.5 (lib) (requires download & build)
 - HUnit-1.6.0.0 (lib) (requires download & build)
 - cmdargs-0.10.20 (lib) (requires download & build)
 - exact-pi-0.4.1.4 (lib) (requires download & build)
 - mmap-0.5.9 (requires download & build)
 - reflex-files-0 (lib) (cannot read state cache)
 - split-0.2.3.3 (lib) (requires download & build)
 - tasty-1.2.3 (lib) (requires build)
 - trie-0.7 (lib) (first run)
 - vector-algorithms-0.8.0.1 (lib) (requires download & build)
 - dimensional-1.1 (lib) (requires download & build)
 - tasty-quickcheck-0.10.1 (lib) (requires download & build)
 - tasty-hunit-0.10.0.2 (lib) (requires build)
 - mono-traversable-1.0.11.0 (lib) (requires download & build)
 - delay-0 (lib) (requires build)
 - trie-0.7 (test:trie-tests) (first run)
 - reflex-test-0 (lib) (cannot read state cache)
 - conduit-1.3.1.1 (lib) (requires download & build)
 - reflex-time-0 (lib) (cannot read state cache)
 - reflex-files-0 (test:test-reflex-files) (first run)
 - libyaml-0.1.1.0 (lib) (requires download & build)
 - reflex-time-0 (test:test) (first run)
 - AlON-0 (lib) (cannot read state cache)
 - yaml-0.11.0.0 (lib) (requires download & build)
 - AlON-0 (test:test) (cannot read state cache)
 - AlON-0 (exe:mini-site) (cannot read state cache)
 - mustache-2.3.0 (exe:haskell-mustache) (requires build)
[ 15:50 ] davean@indite AlON % cabal new-configure                                                                     [0, 4s]
'cabal.project.local' file already exists. Now overwriting it.
Build profile: -w ghc-8.6.5 -O1
In order, the following would be built (use -v for more details):
 - ChasingBottoms-1.3.1.5 (lib) (requires download & build)
 - HUnit-1.6.0.0 (lib) (requires download & build)
 - cmdargs-0.10.20 (lib) (requires download & build)
 - exact-pi-0.4.1.4 (lib) (requires download & build)
 - mmap-0.5.9 (requires download & build)
 - reflex-files-0 (lib) (cannot read state cache)
 - split-0.2.3.3 (lib) (requires download & build)
 - tasty-1.2.3 (lib) (requires build)
 - trie-0.7 (lib) (first run)
 - vector-algorithms-0.8.0.1 (lib) (requires download & build)
 - dimensional-1.1 (lib) (requires download & build)
 - tasty-quickcheck-0.10.1 (lib) (requires download & build)
 - tasty-hunit-0.10.0.2 (lib) (requires build)
 - mono-traversable-1.0.11.0 (lib) (requires download & build)
 - delay-0 (lib) (requires build)
 - trie-0.7 (test:trie-tests) (first run)
 - reflex-test-0 (lib) (cannot read state cache)
 - conduit-1.3.1.1 (lib) (requires download & build)
 - reflex-time-0 (lib) (cannot read state cache)
 - reflex-files-0 (test:test-reflex-files) (first run)
 - libyaml-0.1.1.0 (lib) (requires download & build)
 - reflex-time-0 (test:test) (first run)
 - AlON-0 (lib) (cannot read state cache)
 - yaml-0.11.0.0 (lib) (requires download & build)
 - AlON-0 (test:test) (cannot read state cache)
 - AlON-0 (exe:mini-site) (cannot read state cache)
 - mustache-2.3.0 (exe:haskell-mustache) (requires build)
[ 15:50 ] davean@indite AlON % cabal new-configure                                                                     [0, 0s]
'cabal.project.local' file already exists. Now overwriting it.
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: AlON-0 (user goal)
[__1] trying: base-4.12.0.0/installed-4.1... (dependency of AlON)
[__2] trying: reflex-time-0 (user goal)
[__3] trying: delay-0 (dependency of reflex-time)
[__4] next goal: dimensional (dependency of delay)
[__4] rejecting: dimensional-1.3, dimensional-1.2 (conflict: requires
NoStarIsType)
[__4] rejecting: dimensional-1.1 (conflict: base==4.12.0.0/installed-4.1...,
dimensional => base>=4.7 && <4.12)
[__4] rejecting: dimensional-1.0.1.3, dimensional-1.0.1.2 (conflict:
base==4.12.0.0/installed-4.1..., dimensional => base>=4.7 && <4.11)
[__4] rejecting: dimensional-1.0.1.1 (conflict:
base==4.12.0.0/installed-4.1..., dimensional => base>=4.7 && <4.9)
[__4] rejecting: dimensional-1.0.1.0, dimensional-1.0.0.0,
dimensional-0.13.0.2, dimensional-0.13.0.1, dimensional-0.13,
dimensional-0.12.3, dimensional-0.12.2, dimensional-0.12.1.1,
dimensional-0.12.1, dimensional-0.12, dimensional-0.10.2,
dimensional-0.10.1.2, dimensional-0.10.1.1, dimensional-0.10.1,
dimensional-0.10, dimensional-0.9, dimensional-0.8.2.1, dimensional-0.8.0.1,
dimensional-0.8, dimensional-0.7.3, dimensional-0.7.2, dimensional-0.7.1,
dimensional-0.7 (conflict: delay => dimensional>=1.0.1.1)
[__4] fail (backjumping, conflict set: base, delay, dimensional)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: base, dimensional, delay, AlON,
reflex-time
Try running with --minimize-conflict-set to improve the error message.
@hvr
Copy link
Member

hvr commented Jun 22, 2019

For the record, the only way I can manage to reproduce this (i.e. the conflict: requires NoStarIsType failure), is by having a dist-newstyle created by a different (usually older) version of cabal before invoking cabal v2-configure with a newer version of cabal.

We should encode some kind of version into the binary dist-newstyle/ cache data to detect and invalidate incompatible cache data generated by a different version of cabal.

@phadej
Copy link
Collaborator

phadej commented Aug 28, 2019

See also #6164 for a "point fix" in one place

@DanielG
Copy link
Collaborator

DanielG commented Aug 29, 2019

#6164 is a different but related issue. I do have a fix for this issue in this commit though: dfabd1f

@hvr
Copy link
Member

hvr commented Aug 29, 2019

@DanielG so you're suggesting to start renaming the files on every schema change instead of including versioning inside the binary encoding?

@DanielG
Copy link
Collaborator

DanielG commented Aug 29, 2019

It's really just a stopgap measure which we can apply right now instead of waiting until we get around to versioning the cache. I'd also prefer to fix this properly but for now this works and doesn't really have any significant downsides.

@DanielG
Copy link
Collaborator

DanielG commented Sep 20, 2019

@23Skidoo not sure you were made aware of this issue before releasing 3.0.0.0 but as far as I can tell it's still affected.

I think we should fix this and the related #6164 in a point release. What do you think?

@phadej
Copy link
Collaborator

phadej commented Dec 11, 2019

Fixed with #6255

@phadej phadej closed this as completed Dec 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants