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

Panic! ... hie file versions don't match #59

Open
vrom911 opened this issue May 6, 2020 · 3 comments
Open

Panic! ... hie file versions don't match #59

vrom911 opened this issue May 6, 2020 · 3 comments
Labels
bug Something isn't working hie

Comments

@vrom911
Copy link
Member

vrom911 commented May 6, 2020

😰 ❗ I tried it on the shortcut-links package with the latest changes there but and I got:

policeman: policeman: panic! (the 'impossible' happened)
  (GHC version 8.8.1 for x86_64-unknown-linux):
	readHieFile: hie file versions don't match for file: /home/vrom911/Kowainik/shortcut-links/.policeman-evidence/shortcut-links-0.5.0.0/.hie/ShortcutLinks.hie Expected 8081 but got 8083

Please report this as a GHC bug:  https://www.haskell.org/ghc/reportabug

Possible reason could be that I currently use GHC-8.8.3 but the policeman was build and installed with GHC-8.8.1. We need to do something with this though πŸ€”

@vrom911 vrom911 added bug Something isn't working hie labels May 6, 2020
@chshersh
Copy link
Contributor

chshersh commented May 6, 2020

@vrom911 Good catch! That's an unpleasant situation πŸ˜₯ Because there always will be a chance that the policeman will be built with a different version of GHC from what people have on their machines. My common senses tells me that this should be a warning, not a panic, at least for different minor versions... Or at least, the newer GHC should support all older versions in HIE files. I'm not even sure that ghc-lib-parser will help with this, but we can check this.

@sternenseemann
Copy link

This panic also is raised if an old .hie directory is left over from a previous policeman/ghc version combination which is even more confusing:

I had GHC 8.10.2 installed and policeman installed, upgraded GHC and rebuilt policeman and was faced with this panic in a project I had. The "fix" for the situation was deleting the .hie directory, but this took me a lot of guessing to figure out.

@xsebek
Copy link

xsebek commented Oct 14, 2022

Maybe policemen could set a new temporary HIE directory (-hiedir) in .policeman-evidence and also make sure that the GHC version it needs is used for compilation (--with-compiler).

In my case, I was able to solve the issue by running git clean -fxd and uninstalling other GHCs, so that policeman can't choose the wrong one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hie
Projects
None yet
Development

No branches or pull requests

4 participants