Skip to content

Simplify setup - #18

Merged
jbransen merged 2 commits into
UU-ComputerScience:masterfrom
noughtmare:simplify-setup
Sep 27, 2025
Merged

jbransen merged 2 commits into
UU-ComputerScience:masterfrom
noughtmare:simplify-setup

Conversation

@noughtmare

Copy link
Copy Markdown

Fixes #17

@noughtmare

noughtmare commented Jul 16, 2024 •

Copy link
Copy Markdown
Author

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
Copy Markdown
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
Copy Markdown
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 

@noughtmare

noughtmare commented Sep 27, 2025 •

Copy link
Copy Markdown
Author

Actually, I've been able to compile this with Cabal 3.4 up to 3.14, which is in my opinion a royal version range to support (>4 years of releases!).

I only stopped at 3.4 because GHC 9.0.2 is the oldest GHC I could easily install on NixOS and earlier versions of Cabal don't support GHC 9.0.2.

@jbransen

Copy link
Copy Markdown
Member

Nice, thank you for the work! Going back further does not seem relevant, if people want to use such an old version (potentially for legacy projects) they can always use the older uuagc version.

@jbransen
jbransen merged commit ce80adf into UU-ComputerScience:master Sep 27, 2025
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