Skip to content

Commit

Permalink
Remove cabal flag cpphs
Browse files Browse the repository at this point in the history
Haskell's `cpphs` has not been actively maintained since 2020 and does
not work correctly under Windows in some setups.

  hackage-trustees/malcolm-wallace-universe#20

Starting 2018 we have not been building with `cpphs` by default, but with
the system CPP; no problems have been reported since then.
Then, we already discussed removing cpphs entirely.

  agda#3223

I think we can go through with it now.
  • Loading branch information
andreasabel authored and JobPetrovcic committed Apr 10, 2024
1 parent cc46d2b commit 685141b
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 33 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/cabal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,6 @@ jobs:
description: Linux w/o tests
ghc-ver: 9.6.1
os: ubuntu-22.04
- cabal-flags: --enable-tests -f cpphs
description: Linux cpphs
ghc-ver: 9.6.1
os: ubuntu-22.04
- cabal-flags: --enable-tests -f debug
description: Linux debug
ghc-ver: 9.6.1
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/stack-dry-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ jobs:
shell: bash
env:
EXTRA_ARGS: --dry-run
NON_DEFAULT_FLAGS: --flag Agda:enable-cluster-counting --flag Agda:cpphs --flag
Agda:debug
NON_DEFAULT_FLAGS: --flag Agda:enable-cluster-counting --flag Agda:debug
needs: auto-cancel
runs-on: ${{ matrix.os }}
steps:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ jobs:
env:
EXTRA_ARGS: --fast
ICU_URL: https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-icu-69.1-1-any.pkg.tar.zst
NON_DEFAULT_FLAGS: --flag Agda:enable-cluster-counting --flag Agda:cpphs --flag
Agda:debug
NON_DEFAULT_FLAGS: --flag Agda:enable-cluster-counting --flag Agda:debug
needs: auto-cancel
runs-on: ${{ matrix.os }}
steps:
Expand Down
12 changes: 0 additions & 12 deletions Agda.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,6 @@ source-repository this
-- Build flags
---------------------------------------------------------------------------

flag cpphs
default: False
manual: True
description: Use cpphs instead of cpp.

flag debug
default: False
manual: True
Expand Down Expand Up @@ -344,13 +339,6 @@ library
-- An exceptions are packages that are only needed for certain configurations,
-- like for flags, Windows, etc.

if flag(cpphs)
-- We don't write an upper bound for cpphs because the
-- `build-tool-depends` field can not be modified in Hackage.

build-tool-depends: cpphs:cpphs >= 1.20.9
ghc-options: -pgmP cpphs -optP --cpp

if flag(debug)
cpp-options: -DDEBUG

Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Release notes for Agda version 2.6.4
====================================

Installation
------------

* Removed the cabal flag `cpphs` that enabled building Agda with `cpphs` instead of the default C preprocessor.

Reflection
----------

Expand Down
5 changes: 0 additions & 5 deletions doc/user-manual/getting-started/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -472,11 +472,6 @@ Installation Flags

When installing Agda the following flags can be used:

.. option:: cpphs

Use `cpphs <https://hackage.haskell.org/package/cpphs>`_ instead
of cpp. Default: off.

.. option:: debug

Enable debugging features that may slow Agda down. Default: off.
Expand Down
6 changes: 0 additions & 6 deletions src/github/workflows/cabal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,6 @@ jobs:
# Can't leave cabal-flags empty here lest it becomes the default value.
cabal-flags: '--disable-tests'

# Linux, with -f cpphs
- os: ubuntu-22.04
description: Linux cpphs
ghc-ver: '9.6.1'
cabal-flags: '--enable-tests -f cpphs'

# Linux, without -f enable-cluster-counting but with -f debug
- os: ubuntu-22.04
description: Linux debug
Expand Down
2 changes: 1 addition & 1 deletion src/github/workflows/stack-dry-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
env:
EXTRA_ARGS: "--dry-run"
# stack build --only-configure also installs dependencies, so we need --dry-run
NON_DEFAULT_FLAGS: "--flag Agda:enable-cluster-counting --flag Agda:cpphs --flag Agda:debug"
NON_DEFAULT_FLAGS: "--flag Agda:enable-cluster-counting --flag Agda:debug"

defaults:
run:
Expand Down
2 changes: 1 addition & 1 deletion src/github/workflows/stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
## ARGS is set later, depending on the actually picked GHC version
# ARGS: "--stack-yaml=stack-${{ matrix.ghc-ver }}.yaml --no-terminal"
EXTRA_ARGS: "--fast"
NON_DEFAULT_FLAGS: "--flag Agda:enable-cluster-counting --flag Agda:cpphs --flag Agda:debug"
NON_DEFAULT_FLAGS: "--flag Agda:enable-cluster-counting --flag Agda:debug"

# Liang-Ting Chen (2021-08-18):
# Let pacman choose the file name for ICU4C.
Expand Down

0 comments on commit 685141b

Please sign in to comment.