ocharles / weeder

A re-implementation of weeder using HIE files
BSD 3-Clause "New" or "Revised" License
166 stars 27 forks source link

Wrong weed attribution #153

Open ShrykeWindgrace opened 4 months ago

ShrykeWindgrace commented 4 months ago

Hi!

I faced a wrong attribution of weeds in the 2.8.0 version.

Essentially, it seems that if hie folder has subfolder with identical file names (e.g. Main.hie), then the weeds in subsequent Main.hie files are reported as if they were in the first one.

You can find an example here: https://github.com/ShrykeWindgrace/weederwrong-attribution

I do not know whether that's an issue with my configuration or a weeder issue.

Cheers!

ocharles commented 4 months ago

Can you try upgrading your version of Cabal to the very latest? I think that might solve this problem.

ShrykeWindgrace commented 4 months ago

Can you try upgrading your version of Cabal to the very latest? I think that might solve this problem.

Thanks for your prompt answer!

I have the following:

$ cabal --version
cabal-install version 3.10.3.0
compiled using version 3.10.3.0 of the Cabal library

cabal is installed via ghcup. I updated cabal-version to 3.8 in my *.cabal file, but I still observe the same behavior.

Is there anything else cabal-related to upgrade?

edit

I tried building with

$ .\cabal.exe --version
cabal-install version 3.13.0.0
compiled using version 3.13.0.0 of the Cabal library

and the problem indeed goes away. This version of cabal is fresh from the oven released an hour ago.

ocharles commented 4 months ago

Ok, interesting. I believe new Cabal versions should use distinct unit-ids for each component so this might be solvable now. I'm on holiday for a week, but will try and have a look when I can