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

Follow HLint suggestion: use fewer imports #10719

Merged
merged 3 commits into from
Jan 9, 2025

Conversation

philderbeast
Copy link
Collaborator

See #9110. The HLint "use fewer imports" suggestion was too much trouble to enable before most of the base CPP conditionals, "base 4.13 and older", were removed in #10092.

We're using fourmolu but this doesn't merge multiple imports from the same module.

The removal of MIN_VERSION_base(4,11,0) is permitted by #8998 (comment) and #8998 (comment).

Two files used for our tests taken from other projects are now ignored for linting, in .hlint.yaml:

 - arguments:
+    - --ignore-glob=Cabal-tests/tests/custom-setup/CabalDoctestSetup.hs
+    - --ignore-glob=Cabal-tests/tests/custom-setup/IdrisSetup.hs

The first of these, CabalDoctestSetup.hs, was mentioned by @Kleidukos in #8998 (comment).


Template B: This PR does not modify behaviour or interface

E.g. the PR only touches documentation or tests, does refactorings, etc.

Include the following checklist in your PR:

  • 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).

Copy link
Collaborator

@ulysses4ever ulysses4ever left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mergify mergify bot added the ready and waiting Mergify is waiting out the cooldown period label Jan 7, 2025
@philderbeast
Copy link
Collaborator Author

Label merge+no rebase is necessary when the pull request is from an organisation.

- Use fewer imports with CPP in Compat.Time
- Use fewer imports in IntegrationTests2
- Use fewer imports in Distribution.Client.ProjectPlanning
- Use fewer imports in Distribution.Client.Config
- Use fewer imports in Distribution.Client.NixStyleOptions
- Use fewer imports in Internal.TempFile
- Use fewer imports in Distribution.Client.Store
- Use fewer imports in Distribution.Client.SetupWrapper
- Use fewer imports in Disribution.Simple.GHC
- Use fewer imports in NeedleHaystack
- Remove unused -XCPP from Client.ProjectPlanning
- Enable hlint suggestion "Use fewer imports"
- Ignore custom setup test files from Idris and Doctest
@philderbeast philderbeast force-pushed the hlint/use-fewer-imports branch from 45b6275 to d165dfd Compare January 7, 2025 16:19
@mergify mergify bot added the merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days label Jan 9, 2025
@mergify mergify bot merged commit 45e3289 into haskell:master Jan 9, 2025
50 checks passed
@Kleidukos
Copy link
Member

@Mergifyio backport 3.14

Copy link
Contributor

mergify bot commented Jan 9, 2025

backport 3.14

✅ 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+no rebase ready and waiting Mergify is waiting out the cooldown period
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants