-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
contributing: add implicit-hie gen-hie > hie.yaml note #2341
contributing: add implicit-hie gen-hie > hie.yaml note #2341
Conversation
5e3daca
to
6078f6e
Compare
Hi, thanks for improving docs. Suggesting the use gen-hie to generate the cradle is nice, in fact we are recommending it in main docs: https://haskell-language-server.readthedocs.io/en/latest/configuration.html#configuring-your-project-build:
And in the section we are also noting:
hls underneath calls So i simply would remove the |
6078f6e
to
ab0c645
Compare
New update, taking your note into account. Since contribution guideline info was outdated - provided restructuring best I could. I thought that if implicit configuration did not worked - recommend generating & start looking at explicit configuration, that helped me numerous times, people able to read & understand configuration & see what is there & check configuration themselves & it is also way easier to understand & read docs in that way. I do not know information about Please feel free to actively delete & change any part of the documentation, even directly inside PR - is Ok for documentation workflow. |
7aa4392
to
c8fcdd3
Compare
f925058
to
8c32ef8
Compare
8c32ef8
to
5548217
Compare
Representation result can be seen at the branch. |
The final result in readthedocs can be checked in the docs build for the pr (you can navigate through the readthedocs build check): https://haskell-language-server--2341.org.readthedocs.build/en/2341/contributing/contributing.html#using-hls-on-hls-code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if an error loading the project without explicit hie.yaml will be probable but those steps will be a good guidance in that case, thanks!
Yes. From upstream discussion I see that it should work. But I also previously in recent years personally got assured 3 times by upstream that "implicit configuration should work as is". To make HLS work - in the past I needed to abandon NixOS & so I currently have pretty clean Arch Linux setup worrying to make HLS work & GHCup installed currently recommended by it GHC, Cabal & HLS - & I still had to infer the configuration... Now I recheck -- it probably was remnants from that old recommendation: cradle:
cabal: That is why first thing I put in docs 2 times, implicitly & explicitly - to check & delete the remnants. Old contributor (or previously failed to boot the project person) returning - may be a valid case to keep around until the situation surely stabilizes & people clean up their setups. But also we never should assume that everything "just works" on all setups. Because I've seen some crazy skilled people with some out their setups, especially inside the Haskell Nix land. Help in debugging & submitting info is helpful. I also feel kinda as a bikeshedding discussing 1 paragraph of docs that much. I did a lot of bikeshedding in recent 4 years to learn the foundations of Haskell in detail & now have problems switching from refactoring into "good enough" mode & zooming out & be internally accepting of other people styles, but I work on myself. |
If you ever run into issues with hls not working in a nix-shell or NixOS give me a shout. The trick is to build hls from source in your nix-shell. It has to be built by the same nix-shell as your project otherwise you'll get linking errors. |
Well - the situation was unstable for a very long time. & Haskell bootstrapping - there are Cabal, HPack, Backpack mixins inside Cabal, number of Cabal features, Git Worktree, Stack, Nix (NixPkgs, Nix-Shell, Flakes, Haskell.Nix), DHall & people can use mixtures of them ... so people would need debugging help. & would report something from time to time (& I hope as you that implicit config would work for them), but realistically - there are some esoteric setups & often people have reason for them. |
That is what I'm talking about. I basically abandoned NixOS, to be able to develop |
Thank you for your work. I hope I would be able to contribute something more valuable in the future. |
On my setups, the
gen-hie
tool was found to be irreplaceable.Mainline documentation currently directs people to read lengthy HLS docs on cradle & then directs reading HIE-Bios docs on it & says to make all
hie.yaml
by hand. For every project person wants to contribute to.& currently that means:
While contributor just wants to make project to load into running HLS - to study through the code & be able to navigate the whole project to study how things are done.
Patch advises trying a cradle generator, or using it as possible starting point. It helped me for years in complex project setups. It helped me even in my own projects with complex setups.