Skip to content

Commit 2010184

Browse files
authored
Merge branch 'master' into pkgconf-1.9
2 parents bf8e6ff + 15b5b05 commit 2010184

23 files changed

+374
-447
lines changed

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v4
12-
- uses: haskell/actions/hlint-setup@v2
12+
- uses: haskell-actions/hlint-setup@v2
1313
with:
1414
version: "3.5"
15-
- uses: haskell/actions/hlint-run@v2
15+
- uses: haskell-actions/hlint-run@v2
1616
with:
1717
path: "."
1818
fail-on: suggestion

.github/workflows/validate.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ on:
2323
env:
2424
# We choose a stable ghc version across all os's
2525
# which will be used to do the next release
26-
GHC_FOR_RELEASE: '9.2.7'
26+
GHC_FOR_RELEASE: '9.2.8'
2727
# Ideally we should use the version about to be released for hackage tests and benchmarks
28-
GHC_FOR_SOLVER_BENCHMARKS: '9.2.7'
29-
GHC_FOR_COMPLETE_HACKAGE_TESTS: '9.2.7'
28+
GHC_FOR_SOLVER_BENCHMARKS: '9.2.8'
29+
GHC_FOR_COMPLETE_HACKAGE_TESTS: '9.2.8'
3030
COMMON_FLAGS: '-j 2 -v'
3131

3232
jobs:
@@ -38,7 +38,7 @@ jobs:
3838
strategy:
3939
matrix:
4040
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
41-
ghc: ["9.6.1", "9.4.4", "9.2.7", "9.0.2", "8.10.7", "8.8.4", "8.6.5", "8.4.4"]
41+
ghc: ["9.6.3", "9.4.7", "9.2.8", "9.0.2", "8.10.7", "8.8.4", "8.6.5", "8.4.4"]
4242
exclude:
4343
# corrupts GHA cache or the fabric of reality itself, see https://github.com/haskell/cabal/issues/8356
4444
- os: "windows-latest"
@@ -107,7 +107,7 @@ jobs:
107107
echo "FLAGS=$FLAGS" >> $GITHUB_ENV
108108
109109
- name: Allow newer dependencies when built with latest GHC
110-
if: ${{ matrix.ghc }} == '9.6.1'
110+
if: ${{ matrix.ghc }} == '9.6.3'
111111
run: |
112112
echo "allow-newer: rere:base, rere:transformers" >> cabal.project.validate
113113
@@ -161,15 +161,15 @@ jobs:
161161
# Have to disable *-suite validation:
162162
# - the [email protected] problem is tracked at https://github.com/haskell/cabal/issues/8858
163163
# - but curently can't run it with GHC 9.6, tracking: https://github.com/haskell/cabal/issues/8883
164-
if: (runner.os != 'Windows') || (matrix.ghc != '9.6.1')
164+
if: (runner.os != 'Windows') || (matrix.ghc != '9.6.3')
165165
run: sh validate.sh $FLAGS -s lib-suite
166166

167167
- name: Validate cli-tests
168168
run: sh validate.sh $FLAGS -s cli-tests
169169

170170
- name: Validate cli-suite
171171
# Have to disable *-suite validation, see above the comment for lib-suite
172-
if: (runner.os != 'Windows') || (matrix.ghc != '9.6.1')
172+
if: (runner.os != 'Windows') || (matrix.ghc != '9.6.3')
173173
run: sh validate.sh $FLAGS -s cli-suite
174174

175175
validate-old-ghcs:

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ cabal-testsuite/**/haddocks
7373
# python artifacts from documentation builds
7474
*.pyc
7575
.python-sphinx-virtualenv/
76+
venv
77+
.venv
7678
/doc/.skjold_cache/
7779

7880
# macOS folder metadata

Cabal-syntax/src/Distribution/Fields/Field.hs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
{-# LANGUAGE DeriveFoldable #-}
33
{-# LANGUAGE DeriveFunctor #-}
44
{-# LANGUAGE DeriveTraversable #-}
5+
{-# LANGUAGE StandaloneDeriving #-}
56

67
-- | Cabal-like file AST types: 'Field', 'Section' etc
78
--
@@ -51,6 +52,9 @@ data Field ann
5152
| Section !(Name ann) [SectionArg ann] [Field ann]
5253
deriving (Eq, Show, Functor, Foldable, Traversable)
5354

55+
-- | @since 3.12.0.0
56+
deriving instance Ord ann => Ord (Field ann)
57+
5458
-- | Section of field name
5559
fieldName :: Field ann -> Name ann
5660
fieldName (Field n _) = n
@@ -73,6 +77,9 @@ fieldUniverse f@(Field _ _) = [f]
7377
data FieldLine ann = FieldLine !ann !ByteString
7478
deriving (Eq, Show, Functor, Foldable, Traversable)
7579

80+
-- | @since 3.12.0.0
81+
deriving instance Ord ann => Ord (FieldLine ann)
82+
7683
-- | @since 3.0.0.0
7784
fieldLineAnn :: FieldLine ann -> ann
7885
fieldLineAnn (FieldLine ann _) = ann
@@ -91,6 +98,9 @@ data SectionArg ann
9198
SecArgOther !ann !ByteString
9299
deriving (Eq, Show, Functor, Foldable, Traversable)
93100

101+
-- | @since 3.12.0.0
102+
deriving instance Ord ann => Ord (SectionArg ann)
103+
94104
-- | Extract annotation from 'SectionArg'.
95105
sectionArgAnn :: SectionArg ann -> ann
96106
sectionArgAnn (SecArgName ann _) = ann
@@ -109,6 +119,9 @@ type FieldName = ByteString
109119
data Name ann = Name !ann !FieldName
110120
deriving (Eq, Show, Functor, Foldable, Traversable)
111121

122+
-- | @since 3.12.0.0
123+
deriving instance Ord ann => Ord (Name ann)
124+
112125
mkName :: ann -> FieldName -> Name ann
113126
mkName ann bs = Name ann (B.map Char.toLower bs)
114127

Cabal/src/Distribution/Simple/GHC.hs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2052,20 +2052,12 @@ libAbiHash verbosity _pkg_descr lbi lib clbi = do
20522052
libBi = libBuildInfo lib
20532053
comp = compiler lbi
20542054
platform = hostPlatform lbi
2055-
vanillaArgs0 =
2055+
vanillaArgs =
20562056
(componentGhcOptions verbosity lbi libBi clbi (componentBuildDir lbi clbi))
20572057
`mappend` mempty
20582058
{ ghcOptMode = toFlag GhcModeAbiHash
20592059
, ghcOptInputModules = toNubListR $ exposedModules lib
20602060
}
2061-
vanillaArgs =
2062-
-- Package DBs unnecessary, and break ghc-cabal. See #3633
2063-
-- BUT, put at least the global database so that 7.4 doesn't
2064-
-- break.
2065-
vanillaArgs0
2066-
{ ghcOptPackageDBs = [GlobalPackageDB]
2067-
, ghcOptPackages = mempty
2068-
}
20692061
sharedArgs =
20702062
vanillaArgs
20712063
`mappend` mempty

Cabal/src/Distribution/Simple/GHCJS.hs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1739,20 +1739,12 @@ libAbiHash verbosity _pkg_descr lbi lib clbi = do
17391739
libBi = libBuildInfo lib
17401740
comp = compiler lbi
17411741
platform = hostPlatform lbi
1742-
vanillaArgs0 =
1742+
vanillaArgs =
17431743
(componentGhcOptions verbosity lbi libBi clbi (componentBuildDir lbi clbi))
17441744
`mappend` mempty
17451745
{ ghcOptMode = toFlag GhcModeAbiHash
17461746
, ghcOptInputModules = toNubListR $ exposedModules lib
17471747
}
1748-
vanillaArgs =
1749-
-- Package DBs unnecessary, and break ghc-cabal. See #3633
1750-
-- BUT, put at least the global database so that 7.4 doesn't
1751-
-- break.
1752-
vanillaArgs0
1753-
{ ghcOptPackageDBs = [GlobalPackageDB]
1754-
, ghcOptPackages = mempty
1755-
}
17561748
sharedArgs =
17571749
vanillaArgs
17581750
`mappend` mempty

doc/_templates/layout.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{% extends "!layout.html" %}
22

33
{% block menu %}
4-
{{ super() }}
5-
<a href="cabal-projectindex.html">Reference</a>
4+
{{ super() }}
5+
<a href="cabal-syntax-quicklinks.html">Cabal Syntax Quicklinks</a>
66
<a href="genindex.html">Index</a>
77
{% endblock %}
8-

doc/bugs-and-stability.rst

Lines changed: 0 additions & 6 deletions
This file was deleted.

doc/intro.rst renamed to doc/cabal-context.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ use Hackage_ which is Haskell's central
1414
package archive that contains thousands of libraries and applications in
1515
the Cabal package format.
1616

17-
Introduction
18-
============
17+
What Cabal does
18+
===============
1919

2020
Cabal is a package system for Haskell software. The point of a package
2121
system is to enable software developers and users to easily distribute,
@@ -122,7 +122,7 @@ the package depends on.
122122

123123
For full details on what goes in the ``.cabal`` and ``Setup.hs`` files,
124124
and for all the other features provided by the build system, see the
125-
section on :doc:`developing packages <developing-packages>`.
125+
section on :doc:`How to package Haskell code <how-to-package-haskell-code>`.
126126

127127
Cabal featureset
128128
----------------

doc/misc.rst renamed to doc/cabal-interface-stability.rst

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
Reporting bugs and deficiencies
2-
===============================
3-
4-
Please report any flaws or feature requests in the `bug
5-
tracker <https://github.com/haskell/cabal/issues>`__.
6-
7-
For general discussion or queries email the libraries mailing list
8-
[email protected]. There is also a development mailing list
9-
10-
111
Stability of Cabal interfaces
122
=============================
133

doc/cabal-package.rst renamed to doc/cabal-package-description-file.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
Package Description
2-
===================
1+
Package Description — <package>.cabal File
2+
==========================================
33

4+
The package description file, commonly known as "the Cabal file",
5+
describes the contents of a package.
46
The Cabal package is the unit of distribution. When installed, its
57
purpose is to make available:
68

doc/cabal-project.rst renamed to doc/cabal-project-description-file.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
cabal.project Reference
2-
=======================
1+
Project Description — cabal.project File
2+
========================================
33

44
``cabal.project`` files support a variety of options which configure the
55
details of your build. The general syntax of a ``cabal.project`` file is

doc/cabaldomain.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -598,9 +598,9 @@ class CabalConfigFieldXRef(CabalFieldXRef):
598598
#
599599

600600
class ConfigFieldIndex(Index):
601-
name = 'projectindex'
602-
localname = "Cabal reference"
603-
shortname = "Reference"
601+
name = 'syntax-quicklinks'
602+
localname = "Cabal Syntax Quicklinks"
603+
shortname = "Quicklinks"
604604

605605
class Entry(object):
606606
def __init__(self, typ, name, doc, anchor, meta):

doc/concepts-and-development.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
templates_path = ['_templates']
2626
source_suffix = '.rst'
2727
source_encoding = 'utf-8-sig'
28-
master_doc = 'index'
28+
root_doc = 'index'
2929

3030
# extlinks -- see http://www.sphinx-doc.org/en/stable/ext/extlinks.html
3131
extlinks = {

doc/getting-started.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,4 +228,4 @@ What Next?
228228
Now that you know how to set up a simple Haskell package using Cabal, check out
229229
some of the resources on the Haskell website's `documentation page
230230
<https://www.haskell.org/documentation/>`__ or read more about packages and
231-
Cabal on the :doc:`introduction <intro>` page.
231+
Cabal on the :doc:`What Cabal does <cabal-context>` page.

doc/nix-local-build-overview.rst renamed to doc/how-to-build-like-nix.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _nix-style-builds:
22

3-
Nix-style Local Builds
4-
======================
3+
How to build locally like in Nix
4+
================================
55

66
Nix-style local builds are a new build system implementation inspired by Nix.
77
The Nix-style local build system is commonly called "v2-build" for short

0 commit comments

Comments
 (0)