wz1000 / HieDb

Generates a references DB from .hie files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Same named modules in different project components are indexed just once

jhrcek opened this issue · comments

I have a project with multiple executable components, which happen to contain some modules with the same name.
The issue is that when I index this project with hiedb, only the last same-named module overwrites all the previous ones, due to UnitId not bein unique.
I'm getting the same behavior with stack / cabal.
This might be a build tool issue (in that unit id for executables is always set to main (?))

Here's a small project reproducing the issue
https://github.com/jhrcek/hiedb-sscces/tree/main/same-named-modules

Thanks for the report.

I think this can only be fixed in cabal/stack. However, it might be possible to work around it in ghcide in the meantime.