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

Relax tar upper bound #9557

Merged
merged 1 commit into from
Jan 7, 2024
Merged

Relax tar upper bound #9557

merged 1 commit into from
Jan 7, 2024

Conversation

ffaf1
Copy link
Collaborator

@ffaf1 ffaf1 commented Dec 23, 2023

Template Β: This PR does not modify cabal behaviour (documentation, tests, refactoring, etc.)

Close #9556

Include the following checklist in your PR:

@Bodigrim
Copy link
Collaborator

@ffaf1 you also need to update bounds in Cabal-tests.cabal, otherwise CI would not pick up tar-0.6.

@ffaf1 ffaf1 force-pushed the tar-relax branch 2 times, most recently from 9a0ab3a to 24b20f5 Compare December 23, 2023 16:21
@ffaf1 ffaf1 force-pushed the tar-relax branch 8 times, most recently from 60ae9cf to 94a4995 Compare December 30, 2023 19:55
@ffaf1
Copy link
Collaborator Author

ffaf1 commented Dec 31, 2023

I need help with CI.

<no location info>: error: [-Wunused-packages, -Werror=unused-packages]
    The following packages were specified via -package or -package-id flags,
    but were not needed for compilation:
      - tar-0.6.0.0

I don't really get why it complains about redundant tar, I did not abstract everything behind a .Compat module.

@geekosaur
Copy link
Collaborator

Looks to me like it's only used in a test, but you added it to cabal-install?

@geekosaur
Copy link
Collaborator

Come to think of it, that can't be right because it is used to read the package index. Which means there's at least one missing change somewhere.

@Bodigrim
Copy link
Collaborator

This is likely a bug on GHC side caused by an internal sublibrary, please disable the warning.

@philderbeast
Copy link
Collaborator

-Wunused-packages is picky, down to the component level. @ffaf1 I had a look at your branch and think the warning works well except for false positives with ghc <9:

$ git diff
diff --git a/cabal-install/cabal-install.cabal b/cabal-install/cabal-install.cabal
index aca2d67dd..e7f73aaff 100644
--- a/cabal-install/cabal-install.cabal
+++ b/cabal-install/cabal-install.cabal
@@ -42,7 +42,8 @@ common warnings
     ghc-options: -Wall -Wcompat -Wnoncanonical-monad-instances -Wincomplete-uni-patterns -Wincomplete-record-updates
     if impl(ghc < 8.8)
       ghc-options: -Wnoncanonical-monadfail-instances
-    if impl(ghc >=8.10)
+    if impl(ghc >= 9)
+      -- WARNING: Even though introduced with GHC 8.10, this warning gives false positives with GHC 8.10.
       ghc-options: -Wunused-packages
 
 common base-dep

@ffaf1 ffaf1 requested a review from gbaz January 1, 2024 13:34
@Bodigrim
Copy link
Collaborator

Bodigrim commented Jan 3, 2024

@gbaz is it good to go?

@Bodigrim Bodigrim mentioned this pull request Jan 4, 2024
@ffaf1 ffaf1 added the merge me Tell Mergify Bot to merge label Jan 5, 2024
@mergify mergify bot added the merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days label Jan 7, 2024
* Add a `Compat` module to accomodate two different `tar` interfaces.
* Tweak `-Wunused-packages` conditional (thanks Phil de Joux)
@mergify mergify bot merged commit 49e3d18 into haskell:master Jan 7, 2024
48 checks passed
@ffaf1
Copy link
Collaborator Author

ffaf1 commented Jan 7, 2024

@mergify backport

Copy link
Contributor

mergify bot commented Jan 7, 2024

backport

❌ No backport have been created

No destination branches found

@ffaf1
Copy link
Collaborator Author

ffaf1 commented Jan 7, 2024

@mergify backport 3.10

Copy link
Contributor

mergify bot commented Jan 7, 2024

backport 3.10

✅ Backports have been created

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days merge me Tell Mergify Bot to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support tar-0.6
6 participants