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

Cabal build support #375

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Cabal build support #375

wants to merge 3 commits into from

Conversation

geekosaur
Copy link
Contributor

Description

Add support for cabal builds based on presence of a cabal.project file, analogous to our support for stack builds based on stack.yaml.

Checklist

  • I've read CONTRIBUTING.md

  • I've confirmed these changes don't belong in xmonad-contrib instead

  • I've considered how to best test these changes (property, unit,
    manually, ...) and concluded: needs manual testing

  • I updated the CHANGES.md file

This parallels stack build support, meaning the cabal.project file
is only used for dependencies and xmonad.hs is built via `cabal
exec ghc`.
@geekosaur
Copy link
Contributor Author

I need to do a bit more testing, since this overrides the INSTALL.md workflow while adding a new one.

@geekosaur geekosaur marked this pull request as draft February 17, 2022 08:41
@geekosaur
Copy link
Contributor Author

I talked about this a bit on IRC, but I'm expanding on it and recording it here.

I'm going to abandon the cabal.project-driven implementation, since the existing cabal install --lib stuff already uses it (and must) in the case where xmonad and xmonad-contrib are to be installed from git. Instead, I want to use an xmonad.cabal file, which enables the use of additional dependencies. It does mean the file must be more complete than a stack.yaml, but that is unavoidable: stack and cabal have different divisions of labor between their config files vs. their cabal files. But it solves the problem that it is impossible to have additional dependencies (dbus, utf8-string, etc.) without vendoring them in cabal.project with the original implementation.

One open question is whether to stick to a specific cabal file as described above, or do what cabal does and search for any *.cabal file in the build directory. My original proposal goes for the simple solution, but @liskin said he found this odd.

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

Successfully merging this pull request may close these issues.

None yet

1 participant