Skip to content

Commit f5ff776

Browse files
committed
Merge branch 'master' of github.com:haskell/cabal into mattp/reuse-glob-information
2 parents c0a8d2d + 4b2e5f0 commit f5ff776

File tree

580 files changed

+6749
-3253
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

580 files changed

+6749
-3253
lines changed

.github/mergify.yml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,31 @@ pull_request_rules:
6262
- check-success=Bootstrap post job
6363
- 'check-success=docs/readthedocs.org:cabal'
6464

65+
# label when Mergify didn't trigger a merge automatically
66+
- actions:
67+
label:
68+
add:
69+
- waiting too long
70+
name: Mergify hasn't merged a PR yet
71+
conditions:
72+
- base=master
73+
- -draft
74+
- -closed
75+
- -merged
76+
- '#approved-reviews-by>=2'
77+
- '#changes-requested-reviews-by=0'
78+
- updated-at<4 days ago
79+
- label=merge delay passed
80+
# oy
81+
# lifted these from branch protection imports
82+
- check-success=fourmolu
83+
- check-success=hlint
84+
- check-success=Meta checks
85+
- check-success=Doctest Cabal
86+
- check-success=Validate post job
87+
- check-success=Bootstrap post job
88+
- 'check-success=docs/readthedocs.org:cabal'
89+
6590
# rebase+merge strategy
6691
- actions:
6792
queue:
@@ -85,10 +110,6 @@ pull_request_rules:
85110
- label=merge delay passed
86111
- '#approved-reviews-by>=2'
87112
- '-label~=^blocked:'
88-
# unlike the others, we need to force this one to be up to date
89-
# because it's intended for when Mergify doesn't have permission
90-
# to rebase
91-
- '#commits-behind=0'
92113

93114
# merge+no rebase strategy
94115
- actions:

.github/pull_request_template.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Include the following checklist in your PR:
88

99
* [ ] Patches conform to the [coding conventions](https://github.com/haskell/cabal/blob/master/CONTRIBUTING.md#other-conventions).
1010
* [ ] Any changes that could be relevant to users [have been recorded in the changelog](https://github.com/haskell/cabal/blob/master/CONTRIBUTING.md#changelog).
11+
* [ ] [Is the change significant?](https://github.com/haskell/cabal/blob/master/CONTRIBUTING.md#is-my-change-significant) If so, remember to add `significance: significant` in the changelog file.
1112
* [ ] The documentation has been updated, if necessary.
1213
* [ ] [Manual QA notes](https://github.com/haskell/cabal/blob/master/CONTRIBUTING.md#qa-notes) have been included.
1314
* [ ] Tests have been added. (*Ask for help if you don’t know how to write them! Ask for an exemption if tests are too complex for too little coverage!*)

.github/workflows/check-sdist.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
# release of a corresponding Cabal and friends. it can also be short since it's
4848
# highly unlikely that we are releasing really old branches.
4949
ghc:
50-
["9.10.1", "9.8.1", "9.6.1"]
50+
["9.12.1", "9.10.1", "9.8.1", "9.6.1"]
5151

5252
steps:
5353

@@ -71,9 +71,9 @@ jobs:
7171
# (don't look at this too closely)
7272
sdist="$(ls dist-newstyle/sdist/cabal-install-*.tar.gz | sed -n '\,^dist-newstyle/sdist/cabal-install-[0-9.]*\.tar\.gz$,{;p;q;}')"
7373
# extract the cabal-install major version
74-
ver="$(echo "$sdist" | sed -n 's,^dist-newstyle/sdist/cabal-install-\([0-9][0-9]*\.[0-9][0-9]*\)\.[0-9.]*$,\1,p')"
74+
ver="$(echo "$sdist" | sed -n 's,^dist-newstyle/sdist/cabal-install-\([0-9][0-9]*\.[0-9][0-9]*\)\.[0-9.]*\.tar\.gz$,\1,p')"
7575
# dunno if this will ever be extended to freebsd, but grep -q is a gnu-ism
76-
if ghc-pkg --global --simple-output list Cabal | grep "^Cabal-$cbl\\." >/dev/null; then
76+
if ghc-pkg --global --simple-output list Cabal | grep "^Cabal-$ver\\." >/dev/null; then
7777
# sigh, someone broke installing from tarballs
7878
rm -rf cabal*.project Cabal Cabal-syntax cabal-install-solver cabal-install
7979
tar xfz "$sdist"

.github/workflows/format.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4
13-
- uses: haskell-actions/run-fourmolu@v10
13+
- uses: haskell-actions/run-fourmolu@v11
1414
with:
1515
version: "0.12.0.0"
1616
pattern: |

.github/workflows/typos.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Typos
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: ["master"]
7+
8+
env:
9+
TYPOS_VER: v1.28.1
10+
TYPOS_PLATFORM: x86_64-unknown-linux-musl
11+
12+
jobs:
13+
typos:
14+
defaults:
15+
run:
16+
shell: bash
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
21+
- uses: actions/checkout@v4
22+
23+
- run: |
24+
wget -q https://github.com/crate-ci/typos/releases/download/${{ env.TYPOS_VER }}/typos-${{ env.TYPOS_VER }}-${{ env.TYPOS_PLATFORM }}.tar.gz
25+
tar -xf typos-${{ env.TYPOS_VER }}-${{ env.TYPOS_PLATFORM }}.tar.gz --one-top-level=typos-${{ env.TYPOS_VER }}
26+
mkdir -p "$HOME/.local/bin"
27+
mv typos-${{ env.TYPOS_VER }} "$HOME/.local/bin/typos-${{ env.TYPOS_VER }}"
28+
chmod +x "$HOME/.local/bin/typos-${{ env.TYPOS_VER }}/typos"
29+
echo "$HOME/.local/bin/typos-${{ env.TYPOS_VER }}" >> $GITHUB_PATH
30+
31+
- run: make users-guide-typos
32+
- run: make markdown-typos

.github/workflows/validate.yml

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,9 @@ jobs:
8080
# support, so the PR *must* have a changelog entry.
8181
ghc:
8282
[
83+
"9.12.1",
8384
"9.10.1",
84-
"9.8.2",
85+
"9.8.4",
8586
"9.6.6",
8687
"9.4.8",
8788
"9.2.8",
@@ -192,12 +193,6 @@ jobs:
192193
fi
193194
echo "FLAGS=$FLAGS" >> "$GITHUB_ENV"
194195
195-
- name: Validate print-config
196-
run: sh validate.sh $FLAGS -s print-config
197-
198-
- name: Validate print-tool-versions
199-
run: sh validate.sh $FLAGS -s print-tool-versions
200-
201196
- name: Validate build
202197
run: sh validate.sh $FLAGS -s build
203198

@@ -454,9 +449,6 @@ jobs:
454449
- name: Untar the cabal executable
455450
run: tar -xzf "./cabal-head/cabal-head-${{ runner.os }}-$CABAL_ARCH.tar.gz" -C cabal-head
456451

457-
- name: print-config using cabal HEAD
458-
run: sh validate.sh ${{ env.COMMON_FLAGS }} --with-cabal ./cabal-head/cabal -s print-config
459-
460452
# We dont use cache to force a build with a fresh store dir and build dir
461453
# This way we check cabal can build all its dependencies
462454
- name: Build using cabal HEAD
@@ -473,11 +465,17 @@ jobs:
473465
needs: [validate, validate-old-ghcs, build-alpine, dogfooding]
474466

475467
steps:
476-
# for now this is hardcoded. is there a better way?
468+
- uses: liudonghua123/delete-release-action@v1
469+
env:
470+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
471+
with:
472+
release_name: 'cabal-head'
473+
477474
- uses: actions/download-artifact@v4
478475
with:
479476
pattern: cabal-*
480477
path: binaries
478+
merge-multiple: true
481479

482480
- name: Create GitHub prerelease
483481
uses: softprops/action-gh-release@v2
@@ -490,18 +488,25 @@ jobs:
490488
name: Create a GitHub LTS prerelease with the binary artifacts
491489
runs-on: ubuntu-latest
492490
# The LTS branch is hardcoded for now, update it on a new LTS!
493-
# if: github.ref == 'refs/heads/3.12'
491+
if: github.ref == 'refs/heads/3.12'
494492
permissions:
495493
contents: write
496494

497495
# IMPORTANT! Any job added to the workflow should be added here too
498496
needs: [validate, validate-old-ghcs, build-alpine, dogfooding]
499497

500498
steps:
499+
- uses: liudonghua123/delete-release-action@v1
500+
env:
501+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
502+
with:
503+
release_name: 'cabal-lts-head'
504+
501505
- uses: actions/download-artifact@v4
502506
with:
503507
pattern: cabal-*
504508
path: binaries
509+
merge-multiple: true
505510

506511
- run: |
507512
# bash-ism, but we forced bash above
@@ -510,10 +515,7 @@ jobs:
510515
mv "$f" "cabal-lts-${f##cabal-}"
511516
done
512517
513-
- run: echo ${{ github.ref }}
514-
515518
- name: Create GitHub prerelease
516-
if: github.ref == 'refs/heads/3.12'
517519
uses: softprops/action-gh-release@v2
518520
with:
519521
tag_name: cabal-lts-head

.hlint.yaml

Lines changed: 36 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Warnings currently triggered by your code
22
- ignore: {name: "Avoid NonEmpty.unzip"} # 1 hint
3-
- ignore: {name: "Avoid lambda"} # 46 hints
3+
- ignore: {name: "Avoid lambda"} # 47 hints
44
- ignore: {name: "Avoid lambda using `infix`"} # 22 hints
5-
- ignore: {name: "Eta reduce"} # 116 hints
5+
- ignore: {name: "Eta reduce"} # 124 hints
66
- ignore: {name: "Evaluate"} # 10 hints
77
- ignore: {name: "Functor law"} # 10 hints
88
- ignore: {name: "Fuse concatMap/map"} # 3 hints
@@ -16,68 +16,67 @@
1616
- ignore: {name: "Monoid law, right identity"} # 3 hints
1717
- ignore: {name: "Move filter"} # 4 hints
1818
- ignore: {name: "Move guards forward"} # 4 hints
19-
- ignore: {name: "Redundant $"} # 175 hints
19+
- ignore: {name: "Redundant $"} # 179 hints
2020
- ignore: {name: "Redundant $!"} # 1 hint
2121
- ignore: {name: "Redundant <$>"} # 16 hints
2222
- ignore: {name: "Redundant =="} # 1 hint
23-
- ignore: {name: "Redundant bracket"} # 232 hints
23+
- ignore: {name: "Redundant bracket"} # 239 hints
2424
- ignore: {name: "Redundant fmap"} # 1 hint
2525
- ignore: {name: "Redundant guard"} # 2 hints
26-
- ignore: {name: "Redundant if"} # 3 hints
26+
- ignore: {name: "Redundant if"} # 6 hints
2727
- ignore: {name: "Redundant lambda"} # 19 hints
2828
- ignore: {name: "Redundant multi-way if"} # 1 hint
29-
- ignore: {name: "Redundant return"} # 7 hints
30-
- ignore: {name: "Replace case with fromMaybe"} # 5 hints
29+
- ignore: {name: "Redundant return"} # 9 hints
30+
- ignore: {name: "Replace case with fromMaybe"} # 6 hints
3131
- ignore: {name: "Replace case with maybe"} # 10 hints
32-
- ignore: {name: "Unused LANGUAGE pragma"} # 167 hints
3332
- ignore: {name: "Use $>"} # 5 hints
3433
- ignore: {name: "Use ++"} # 4 hints
35-
- ignore: {name: "Use :"} # 25 hints
34+
- ignore: {name: "Use :"} # 30 hints
3635
- ignore: {name: "Use <$"} # 2 hints
37-
- ignore: {name: "Use <$>"} # 86 hints
36+
- ignore: {name: "Use <$>"} # 87 hints
3837
- ignore: {name: "Use <&>"} # 14 hints
39-
- ignore: {name: "Use <=<"} # 5 hints
38+
- ignore: {name: "Use <=<"} # 4 hints
4039
- ignore: {name: "Use =<<"} # 7 hints
4140
- ignore: {name: "Use =="} # 3 hints
4241
- ignore: {name: "Use >=>"} # 3 hints
4342
- ignore: {name: "Use ?~"} # 1 hint
4443
- ignore: {name: "Use Down"} # 3 hints
4544
- ignore: {name: "Use Just"} # 2 hints
4645
- ignore: {name: "Use bimap"} # 7 hints
47-
- ignore: {name: "Use camelCase"} # 96 hints
46+
- ignore: {name: "Use camelCase"} # 98 hints
4847
- ignore: {name: "Use catMaybes"} # 3 hints
49-
- ignore: {name: "Use concatMap"} # 1 hint
48+
- ignore: {name: "Use concatMap"} # 2 hints
5049
- ignore: {name: "Use const"} # 36 hints
5150
- ignore: {name: "Use elem"} # 2 hints
52-
- ignore: {name: "Use fewer imports"} # 19 hints
51+
- ignore: {name: "Use fewer imports"} # 13 hints
5352
- ignore: {name: "Use first"} # 4 hints
54-
- ignore: {name: "Use fmap"} # 24 hints
53+
- ignore: {name: "Use fmap"} # 26 hints
5554
- ignore: {name: "Use fold"} # 1 hint
5655
- ignore: {name: "Use for"} # 1 hint
5756
- ignore: {name: "Use forM_"} # 1 hint
58-
- ignore: {name: "Use fromMaybe"} # 1 hint
57+
- ignore: {name: "Use fromMaybe"} # 4 hints
5958
- ignore: {name: "Use fromRight"} # 1 hint
6059
- ignore: {name: "Use fst"} # 1 hint
61-
- ignore: {name: "Use if"} # 4 hints
60+
- ignore: {name: "Use if"} # 2 hints
6261
- ignore: {name: "Use infix"} # 20 hints
6362
- ignore: {name: "Use isAsciiLower"} # 2 hints
6463
- ignore: {name: "Use isAsciiUpper"} # 2 hints
6564
- ignore: {name: "Use isDigit"} # 2 hints
6665
- ignore: {name: "Use isJust"} # 1 hint
6766
- ignore: {name: "Use isNothing"} # 1 hint
68-
- ignore: {name: "Use lambda-case"} # 47 hints
67+
- ignore: {name: "Use lambda-case"} # 55 hints
6968
- ignore: {name: "Use lefts"} # 1 hint
70-
- ignore: {name: "Use list comprehension"} # 16 hints
69+
- ignore: {name: "Use list comprehension"} # 18 hints
7170
- ignore: {name: "Use list literal"} # 3 hints
7271
- ignore: {name: "Use list literal pattern"} # 11 hints
7372
- ignore: {name: "Use map once"} # 7 hints
7473
- ignore: {name: "Use map with tuple-section"} # 3 hints
7574
- ignore: {name: "Use mapMaybe"} # 13 hints
76-
- ignore: {name: "Use max"} # 1 hint
75+
- ignore: {name: "Use max"} # 2 hints
7776
- ignore: {name: "Use maybe"} # 8 hints
7877
- ignore: {name: "Use minimumBy"} # 1 hint
7978
- ignore: {name: "Use newtype instead of data"} # 26 hints
80-
- ignore: {name: "Use notElem"} # 8 hints
79+
- ignore: {name: "Use notElem"} # 9 hints
8180
- ignore: {name: "Use null"} # 2 hints
8281
- ignore: {name: "Use record patterns"} # 16 hints
8382
- ignore: {name: "Use replicateM"} # 1 hint
@@ -88,17 +87,30 @@
8887
- ignore: {name: "Use traverse"} # 1 hint
8988
- ignore: {name: "Use tuple-section"} # 28 hints
9089
- ignore: {name: "Use typeRep"} # 2 hints
91-
- ignore: {name: "Use unless"} # 20 hints
90+
- ignore: {name: "Use uncurry"} # 1 hint
91+
- ignore: {name: "Use unless"} # 22 hints
9292
- ignore: {name: "Use unwords"} # 8 hints
93-
- ignore: {name: "Use void"} # 22 hints
93+
- ignore: {name: "Use void"} # 23 hints
9494
- ignore: {name: "Use when"} # 1 hint
95-
- ignore: {name: "Use uncurry"} # 1 hint
9695

9796
- arguments:
9897
- --ignore-glob=Cabal-syntax/src/Distribution/Fields/Lexer.hs
98+
- --ignore-glob=cabal-testsuite/PackageTests/BuildWays/q/app/Main.hs
9999
- --ignore-glob=cabal-testsuite/PackageTests/CmmSources/src/Demo.hs
100100
- --ignore-glob=cabal-testsuite/PackageTests/CmmSourcesDyn/src/Demo.hs
101101
- --ignore-glob=cabal-testsuite/PackageTests/CmmSourcesExe/src/Demo.hs
102+
- --ignore-glob=cabal-testsuite/PackageTests/NewBuild/CmdRun/Script/script.hs
103+
- --ignore-glob=cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptLiterate/script.lhs
104+
- --ignore-glob=cabal-testsuite/PackageTests/Regression/T5309/lib/Bio/Character/Exportable/Class.hs
105+
- --ignore-glob=cabal-testsuite/PackageTests/SetupHooks/SetupHooksC2HsRules/SetupHooks.hs
106+
- --ignore-glob=cabal-testsuite/PackageTests/SetupHooks/SetupHooksDuplicateRuleId/SetupHooks.hs
107+
- --ignore-glob=cabal-testsuite/PackageTests/SetupHooks/SetupHooksInvalidRuleOutputIndex/SetupHooks.hs
108+
- --ignore-glob=cabal-testsuite/PackageTests/SetupHooks/SetupHooksRuleOrdering/SetupHooks.hs
109+
- --ignore-glob=cabal-testsuite/PackageTests/SetupHooks/SetupHooksUnusedRules/SetupHooks.hs
110+
- --ignore-glob=cabal-testsuite/PackageTests/TemplateHaskell/dynamic/TH.hs
111+
- --ignore-glob=cabal-testsuite/PackageTests/TemplateHaskell/profiling/TH.hs
112+
- --ignore-glob=cabal-testsuite/PackageTests/TemplateHaskell/vanilla/TH.hs
102113
- --ignore-glob=templates/Paths_pkg.template.hs
103114
- --ignore-glob=templates/SPDX.LicenseExceptionId.template.hs
104115
- --ignore-glob=templates/SPDX.LicenseId.template.hs
116+
- --ignore-glob=dist-*

.typos.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[default]
2+
extend-ignore-re = ["(?s)(#|//)\\s*spellchecker:off.*?\\n\\s*(#|//)\\s*spellchecker:on"]

CONTRIBUTING.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,18 @@ At release time, the entries will be merged with
439439
In addition, if you're changing the `.cabal` file format specification you should
440440
add an entry in `doc/file-format-changelog.rst`.
441441

442+
### Is my change `significant`?
443+
444+
Use your best judgement and if unsure ask other maintainers. If your PR fixes
445+
a specific ticket, how busy was the discussion there? A new command or option
446+
most likely warrants a `significance: significant` tag, same with command
447+
line changes that disrupts the workflow of many users or an API change
448+
that requires substantial time to integrate in a program.
449+
450+
Put yourself in the shoes of the user: would you appreciate seeing this
451+
change highlighted in the announcement post or release notes overview? If
452+
so, add `significance: significant`.
453+
442454
## Communicating
443455

444456
There are a few main venues of communication:

Cabal-QuickCheck/src/Test/QuickCheck/Instances/Cabal.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{-# LANGUAGE CPP #-}
2-
{-# LANGUAGE TypeOperators #-}
32
{-# LANGUAGE FlexibleInstances #-}
43
{-# OPTIONS_GHC -fno-warn-orphans #-}
54
module Test.QuickCheck.Instances.Cabal () where

0 commit comments

Comments
 (0)