-
Notifications
You must be signed in to change notification settings - Fork 841
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
How to deal with multiple versions of the same package? #1684
Comments
One more detail: it happens with Flycheck that uses |
It seems to be two instances of the same version of the package, probably installed with different dependencies. Still, this shouldn't happen! |
I will try to upgrade to the latest Git version and re-check. |
No, the problem is still there. What can I do to reset this thing or something? |
Does |
I previously used one package that depends on |
Deletion of Here I can reproduce it on command line manually:
|
It might be helpful to delete the system install and do a new I think the main issue is that flycheck is passing So, I think what's happening is that it's using something out of the global DB which hasn't been compiled with this different |
All the code has been built by stack. It seems like deletion of whole In case someone will want to reproduce it, here is the repo (this is the only project where this “bug” is visible, for some reason): https://github.com/mrkkrp/plan-b Clone, build, then if you use Flycheck just open one of source files or run that command I posted earlier (changing paths). |
The situation is getting worse (another package):
Yet it builds OK with |
@mgsloan, I have new thoughts/information about this issue. I thought about your reply about “something out of global DB” and after some painful hours with my workflow broken I noticed that the error message has changed:
The second package ID has changed. I started to think what change have I done on my system and it occurred to me that I've upgraded packages on system level. Now, things are getting interesting: I'm using Arch Linux and it has got packages for some Haskell libraries and I think I've got them as dependencies of Stack. One of the packages is
This means that this system-level installation is what confuses Flycheck! Knowing that, is there any easy way to tell |
I think this cabal issue may be relevant - haskell/cabal#2830 - this affected me quite recently... (in stack build, not when invoking ghc). I'm not sure if there's anything stack can do about it. One possible workaround is to keep your global DB as minimal as possible. This is, infact, stack's default. Stuff is never installed to the global DB, just the snapshot DB. So maybe having stack setup ghc, and using that, will fix the problem? (you can still have your system level install, it just won't get used) |
I uninstalled |
Ah, interesting! Since the problem is resolved, I'm going to go ahead and close this. |
This problem has returned:
This time I do not (to my knowledge) have Also, some time ago I worked on a package where I needed resolver: lts-5.14
packages:
- '.'
extra-deps:
- QuickCheck-2.8.2 This produced rather curious error message from Flycheck:
Extra-deps do not has any effect on Flycheck. Not sure that these problems are related, though. |
Somehow I'm getting this:
As I understand, I've got two versions of the same package.
stack clean
and even deletion of.stack-work
do not help. How to deal with this situation?The text was updated successfully, but these errors were encountered: