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

Auto generate hie.yaml from flake? #2026

Open
Montmorency opened this issue Jan 22, 2025 · 1 comment
Open

Auto generate hie.yaml from flake? #2026

Montmorency opened this issue Jan 22, 2025 · 1 comment

Comments

@Montmorency
Copy link
Contributor

Montmorency commented Jan 22, 2025

Following up on the HLS issues in order to get VSCode to work with HLS properly there is some manual configuration required.

The ihp-boilerplate at the moment contains a hie.yaml file:

# Used by haskell-language-server to find GHC settings
cradle:
    bios:
        shell: "$IHP/.hie-bios"

The line shell:"$IHP/.hie-bios" and the IHP variable does not seem to be getting expanded as expected when the language server is run. (You can test by running haskell-language-server-wrapper and noting the path). This seems to cause the language server to fail to load

Would it be better to autogenerate the hie.yaml file with a correct ${ihp}/.hie-bios path expanded everytime the user runs devenv up from within the boiler plates flake.nix? Something e.g.

                devenv.shells.default = {
...
                   process.hie-yaml.exec = ''
echo "cradle:
    bios:
        shell: "${ihp}.hie-bios"" > hie.yaml
                   ''
              };
            };
...
@mpscholten
Copy link
Member

IMO it would be better to just fidx the hie.yaml. Generating the file always comes with it's own issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants