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

Backport #10723: Remove unused -XCPP #10752

Merged
merged 3 commits into from
Jan 14, 2025
Merged

Backport #10723: Remove unused -XCPP #10752

merged 3 commits into from
Jan 14, 2025

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jan 14, 2025

Fixes #10720, a follow on from #10092. Removes unused {-# LANGUAGE CPP #-} pragmas.


Template B: This PR does not modify behaviour or interface

  • Patches conform to the coding conventions.
  • Is this a PR that fixes CI? If so, it will need to be backported to older cabal release branches (ask maintainers for directions).

Manual QA Notes

Please delete dist-newstyle and run the following to check for occurrences of unused -XCPP:

$ grep '^#if' --files-without-match $(grep -R --files-with-matches 'LANGUAGE.*CPP' */**/*.hs)
cabal-testsuite/PackageTests/Backpack/bkpcabal01/p/P.hs
cabal-testsuite/PackageTests/CabalMacros/Mdl.hs
cabal-testsuite/PackageTests/CmmSources/src/Demo.hs
cabal-testsuite/PackageTests/CmmSourcesDyn/demo/Main.hs
cabal-testsuite/PackageTests/CmmSourcesDyn/src/Demo.hs
cabal-testsuite/PackageTests/CmmSourcesExe/src/Demo.hs
cabal-testsuite/PackageTests/Haddock/CPP.hs
cabal-testsuite/PackageTests/PreProcess/Hsc2HsOptionsCC/Main.hs
cabal-testsuite/PackageTests/Regression/T5386/Foo.hs
Cabal/src/Distribution/Simple/Build/PathsModule/Z.hs

$ grep 'LANGUAGE CPP' Cabal/src/Distribution/Simple/Build/PathsModule/Z.hs
    tell "{-# LANGUAGE CPP #-}\n"

Those in cabal-testsuite/PackageTests are part of tests so should likely stay put and Distribution.Simple.Build.PathsModule.Z is generating a paths module using a zinza template. It's a false positive find with the unrefined grep pattern, LANGUAGE.*CPP.


This is an automatic backport of pull request #10723 done by [Mergify](https://mergify.com).

- Remove redundant -XCPP from Cabal-tree-diff
- Remove redundant -XCPP from cabal-install
- Remove redundant -XCPP from Cabal
- Remove redundant -XCPP from Cabal-QuickCheck
- Remove redundant -XCPP from Cabal-syntax
- Remove redundant -XCPP from Cabal-tests
- Remove redundant -XCPP from cabal-testsuite

(cherry picked from commit 7965c7f)

# Conflicts:
#	Cabal-syntax/src/Distribution/Compat/Binary.hs
#	Cabal-syntax/src/Distribution/Utils/Generic.hs
#	cabal-install/src/Distribution/Client/CmdUpdate.hs
#	cabal-install/src/Distribution/Client/InstallSymlink.hs
#	cabal-install/src/Distribution/Client/Targets.hs
@mergify mergify bot added the conflicts label Jan 14, 2025
Copy link
Contributor Author

mergify bot commented Jan 14, 2025

Cherry-pick of 7965c7f has failed:

On branch mergify/bp/3.14/pr-10723
Your branch is up to date with 'origin/3.14'.

You are currently cherry-picking commit 7965c7fce.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   Cabal-QuickCheck/src/Test/QuickCheck/GenericArbitrary.hs
	modified:   Cabal-syntax/src/Distribution/Compat/Exception.hs
	modified:   Cabal-syntax/src/Distribution/Compat/Graph.hs
	modified:   Cabal-syntax/src/Distribution/Compat/MonadFail.hs
	modified:   Cabal-syntax/src/Distribution/Compat/Newtype.hs
	modified:   Cabal-syntax/src/Distribution/Compat/Prelude.hs
	modified:   Cabal-syntax/src/Distribution/Compat/Semigroup.hs
	modified:   Cabal-syntax/src/Distribution/FieldGrammar/Class.hs
	modified:   Cabal-syntax/src/Distribution/Fields/ParseResult.hs
	modified:   Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs
	modified:   Cabal-syntax/src/Distribution/Parsec.hs
	modified:   Cabal-syntax/src/Distribution/System.hs
	modified:   Cabal-tests/tests/UnitTests/Distribution/CabalSpecVersion.hs
	modified:   Cabal-tests/tests/UnitTests/Distribution/Utils/CharSet.hs
	modified:   Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs
	modified:   Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs
	modified:   Cabal-tree-diff/src/Data/TreeDiff/Instances/CabalLanguage.hs
	modified:   Cabal-tree-diff/src/Data/TreeDiff/Instances/CabalSPDX.hs
	modified:   Cabal-tree-diff/src/Data/TreeDiff/Instances/CabalVersion.hs
	modified:   Cabal/src/Distribution/Compat/Async.hs
	modified:   Cabal/src/Distribution/Compat/ResponseFile.hs
	modified:   Cabal/src/Distribution/Compat/Stack.hs
	modified:   Cabal/src/Distribution/Simple/GHCJS.hs
	modified:   Cabal/src/Distribution/Simple/Setup.hs
	modified:   Cabal/src/Distribution/Simple/Setup/Benchmark.hs
	modified:   Cabal/src/Distribution/Simple/Setup/Build.hs
	modified:   Cabal/src/Distribution/Simple/Setup/Clean.hs
	modified:   Cabal/src/Distribution/Simple/Setup/Common.hs
	modified:   Cabal/src/Distribution/Simple/Setup/Copy.hs
	modified:   Cabal/src/Distribution/Simple/Setup/Global.hs
	modified:   Cabal/src/Distribution/Simple/Setup/Haddock.hs
	modified:   Cabal/src/Distribution/Simple/Setup/Hscolour.hs
	modified:   Cabal/src/Distribution/Simple/Setup/Install.hs
	modified:   Cabal/src/Distribution/Simple/Setup/Register.hs
	modified:   Cabal/src/Distribution/Simple/Setup/Repl.hs
	modified:   Cabal/src/Distribution/Simple/Setup/SDist.hs
	modified:   Cabal/src/Distribution/Simple/Setup/Test.hs
	modified:   Cabal/src/Distribution/Utils/MapAccum.hs
	modified:   Cabal/src/Distribution/Utils/Progress.hs
	modified:   cabal-install/src/Distribution/Client/Check.hs
	modified:   cabal-install/src/Distribution/Client/CmdOutdated.hs
	modified:   cabal-install/src/Distribution/Client/CmdPath.hs
	modified:   cabal-install/src/Distribution/Client/Configure.hs
	modified:   cabal-install/src/Distribution/Client/FileMonitor.hs
	modified:   cabal-install/src/Distribution/Client/GenBounds.hs
	modified:   cabal-install/src/Distribution/Client/IndexUtils.hs
	modified:   cabal-install/src/Distribution/Client/Main.hs
	modified:   cabal-install/src/Distribution/Client/Manpage.hs
	modified:   cabal-install/src/Distribution/Client/ProjectBuilding.hs
	modified:   cabal-install/src/Distribution/Client/ProjectConfig.hs
	modified:   cabal-install/src/Distribution/Client/Sandbox.hs
	modified:   cabal-install/src/Distribution/Client/Security/HTTP.hs
	modified:   cabal-install/src/Distribution/Deprecated/ParseUtils.hs
	modified:   cabal-install/src/Distribution/Deprecated/ReadP.hs
	modified:   cabal-install/tests/UnitTests/Distribution/Client/FileMonitor.hs
	modified:   cabal-install/tests/UnitTests/Distribution/Client/Glob.hs
	modified:   cabal-install/tests/UnitTests/Distribution/Client/UserConfig.hs
	modified:   cabal-install/tests/UnitTests/Distribution/Solver/Modular/QuickCheck.hs
	modified:   cabal-install/tests/UnitTests/Distribution/Solver/Types/OptionalStanza.hs
	modified:   cabal-testsuite/main/cabal-tests.hs
	modified:   cabal-testsuite/src/Test/Cabal/TestCode.hs

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   Cabal-syntax/src/Distribution/Compat/Binary.hs
	both modified:   Cabal-syntax/src/Distribution/Utils/Generic.hs
	both modified:   cabal-install/src/Distribution/Client/CmdUpdate.hs
	both modified:   cabal-install/src/Distribution/Client/InstallSymlink.hs
	both modified:   cabal-install/src/Distribution/Client/Targets.hs

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@mergify mergify bot mentioned this pull request Jan 14, 2025
2 tasks
@mergify mergify bot added the backport label Jan 14, 2025
@Kleidukos Kleidukos self-assigned this Jan 14, 2025
@Kleidukos Kleidukos added the squash+merge me Tell Mergify Bot to squash-merge label Jan 14, 2025
@Kleidukos Kleidukos removed their assignment Jan 14, 2025
@mergify mergify bot merged commit 18ee994 into 3.14 Jan 14, 2025
57 checks passed
@mergify mergify bot deleted the mergify/bp/3.14/pr-10723 branch January 14, 2025 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport squash+merge me Tell Mergify Bot to squash-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants