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

Simplify setup #18

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

noughtmare
Copy link
Contributor

Fixes #17

@noughtmare
Copy link
Contributor Author

noughtmare commented Jul 16, 2024

I think this is sadly not compatible with some newer versions of cabal, and perhaps also not with some older versions. Do we have a policy on which cabal versions we want to support?

Edit: Since this option is only meant for developers of UUAGC, perhaps it is reasonable to only support a single cabal version.

@jbransen
Copy link
Member

I am a bit hesitant here. I agree that in principle using Cabal functionality instead of CPP is much nicer, but unfortunately the Cabal API is not exactly stable. There is no explicit policy, but I suspect that most use of UUAGC is to build old code (with potentially old versions of the tooling), so I think backwards compatibility is more important than future compatibility.

Also, it is not entirely true that the build-from-source option is only intended for developers; it is (was?) also used for others that want to build from source, for example in the Debian package.

However, I am not a cabal user myself, so I don't have an active setup to test either.

@jbransen
Copy link
Member

As a reference, this is an uncommitted file from my computer which I used to build the release tar using stack....

# Hack, not sure how the -D can be passed to setup
sed -i 's/#ifdef EXTERNAL_UUAGC/#ifndef FOOBAR/' Setup.hs 
stack build --ghc-options="-DEXTERNAL_UUAGC"
sed -i 's/#ifndef FOOBAR/#ifdef EXTERNAL_UUAGC/' Setup.hs 

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.

--ghc-options="-DEXTERNAL_UUAGC" broken with cabal 3.10
2 participants