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

Add configuration files so the project can be built with cabal #1667

Merged
merged 3 commits into from Dec 14, 2022

Conversation

paulcadman
Copy link
Collaborator

@paulcadman paulcadman commented Dec 14, 2022

This PR makes it possible to build the project using cabal as an alternative to using stack.

  • The CI will continue to use stack to build and test the project.
  • Users of stack should see no change in their developer experience

The reason why you might want to use cabal instead of stack is that the LSP integration seems to work better (I get fewer LSP crashes, and I can switch between the test, lib and app targets without problems).

The import: https://www.stackage.org/lts-20.2/cabal.config line in the cabal.project means that stack and cabal will resolve the same dependencies. We need to keep this link in sync with the stack resolver version.

To use cabal with LSP you need to manually copy cabal.hie.yaml to hie.yaml. Unfortunately there's no way to configure the hie.yaml path in his or hie-bios configuration options.

@janmasrovira janmasrovira merged commit e8a3cd0 into main Dec 14, 2022
@janmasrovira janmasrovira deleted the cabal-alt branch December 14, 2022 21:35
janmasrovira pushed a commit that referenced this pull request Dec 15, 2022
* Add files to embed in the exe to extra-source-files

Cabal requires the files to be specified here because it uses an isolated
build work directory.

* Add cabal configuration files

* Document how to use `cabal` with the project
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants