-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
0.1.3.0 seems to generate empty hie.yaml
files for cabal projects
#50
Comments
Or is this a feature; because |
While I am not sure this is part of the latest release, yes, these simple cabal cradles work very reliably since |
@arianvp can you post the repo this occurred on? The logic in the latest release generates a component per module. Rather than just using the cabal file so a whole repo will be needed to reproduce the issue. It's likely this issue is triggered by the structure of your repo, and the new logic does not correctly find modules. |
Unfortunately the repo is proprietary but i'll try to make a reproducer tomorrow and post it here |
Since upgrading to 0.1.3 we are also experiencing this at CircuitHub. Unfortunately it's also a proprietary repository, but am I right in thinking I only need the |
My recommendation is to have a hie.yaml with cradle:
cabal: I think it is the most reliable. |
@ocharles With #48, we "generate one hie-bios component per module, instead of one per hs-source-dir". So without files a empty cradle will be returned. Is the empty cradle causing issues in HLS at CircuitHub? If this is the case I would suggest using a old version of There's clearly an issue with generating cradles for cabal projects, since the repo mentioned in #48 also produces a empty cradle. How would people feel about restoring the old one cradle per
|
The problem we're seeing is that without a |
Sounds good to me. For accurate cradle generation for cabal projects, let's also not forget: https://github.com/phadej/cabal-extras/tree/master/cabal-hie |
I regularly do major crimes to cabal projects such that I have overlapping cradle paths ( So I really need the one-per-source-dir thing: I use This situation is due to using various combinations of https://jade.fyi/blog/nix-hls-for-deps/ ("YOLO method") and https://jade.fyi/blog/cabal-test-dev-trick/. |
The reason the one-per-module isn't really feasible is that there's 50000 lines of that so it's not editable (some of which is probably duplicated due to the above mentioned overlapping targets):
|
@ocharles did a minimal |
@Avi-D-coder I removed my |
It looks like this is not just for cabal projects. Since cradle:
stack: For Stack, the above trick of
Reverting to an older version of cradle:
stack:
- path: "my_project/library"
component: "my_project:lib"
- path: "my_project/tests"
component: "my_project:test:my_project-tests"
- path: "subproject/library"
component: "subproject:lib"
- path: "subproject/./executables/subproject.hs"
component: "subproject:exe:subproject"
- path: "subproject/./Paths_subproject.hs"
component: "subproject:exe:subproject"
- path: "subproject/tests"
component: "subproject:test:subproject-tests"
- path: "othersubproject/library"
component: "othersubproject:lib"
- path: "othersubproject/./executables/Main.hs"
component: "othersubproject:exe:othersubproject"
- path: "othersubproject/./Paths_othersubproject.hs"
component: "othersubproject:exe:othersubproject"
- path: "othersubproject/tests"
component: "othersubproject:test:othersubproject-tests" |
@FPtje |
There seems to be a serious regression for me in this release.
it just generates a yaml file as follows:
The text was updated successfully, but these errors were encountered: