Skip to content

Commit

Permalink
Merge branch 'master' into breaking-changes-3.14
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Nov 30, 2024
2 parents ac8680a + 8144494 commit 7d0f7b0
Show file tree
Hide file tree
Showing 40 changed files with 951 additions and 450 deletions.
4 changes: 0 additions & 4 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,6 @@ pull_request_rules:
- label=merge delay passed
- '#approved-reviews-by>=2'
- '-label~=^blocked:'
# unlike the others, we need to force this one to be up to date
# because it's intended for when Mergify doesn't have permission
# to rebase
- '#commits-behind=0'

# merge strategy for release branches
- actions:
Expand Down
2 changes: 1 addition & 1 deletion Cabal-syntax/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Please see https://github.com/haskell/cabal/blob/master/release-notes/Cabal-3.14.0.0.md
Please see https://github.com/haskell/cabal/blob/master/release-notes/Cabal-3.14.1.0.md
2 changes: 1 addition & 1 deletion Cabal-syntax/src/Distribution/Fields/Lexer.x
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module Distribution.Fields.Lexer
,mkLexState) where

import Prelude ()
import qualified Prelude as Prelude
import qualified Prelude
import Distribution.Compat.Prelude

import Distribution.Fields.LexerMonad
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Distribution.Types.LibraryName (LibraryName)
import Distribution.Types.PackageName (PackageName)
import Distribution.Types.Version (Version)

-- | A reason for a depency failing to solve.
-- | A reason for a dependency failing to solve.
--
-- This helps pinpoint dependencies that are installed with an incorrect
-- version vs. dependencies that are not installed at all.
Expand Down
4 changes: 3 additions & 1 deletion Cabal/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# 3.14.1.0 [Hécate](mailto:[email protected]) November 2024
* See https://github.com/haskell/cabal/blob/master/release-notes/Cabal-3.14.1.0.md

# 3.14.0.0 [Hécate](mailto:[email protected]) September 2024
* See https://github.com/haskell/cabal/blob/master/release-notes/Cabal-3.14.0.0.md

# 3.12.1.0 [Artem Pelenitsyn](mailto:[email protected]) June 2024
* See https://github.com/haskell/cabal/blob/master/release-notes/Cabal-3.12.1.0.md

# 3.12.0.0 [Francesco Ariis](mailto:[email protected]) May 2024
# 3.12.0.0 [Francesco Ariis](mailto:[email protected]) March 2024
* See https://github.com/haskell/cabal/blob/master/release-notes/Cabal-3.12.0.0.md

# 3.10.3.0 [Hécate](mailto:[email protected]) January 2024
Expand Down
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,18 @@ whitespace: ## Run fix-whitespace in check mode
fix-whitespace: ## Run fix-whitespace in fix mode
fix-whitespace --verbose

.PHONY: lint
lint: ## Run HLint
hlint -j .

.PHONY: lint-json
lint-json: ## Run HLint in JSON mode
hlint -j --json -- .

# local checks

.PHONY: checks
checks: whitespace style
# this should probably be a rule
hlint -j --json -- .
checks: whitespace style lint-json

# source generation: SPDX

Expand Down
2 changes: 1 addition & 1 deletion cabal-install-solver/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Please see https://github.com/haskell/cabal/blob/master/release-notes/cabal-install-3.14.0.0.md
Please see https://github.com/haskell/cabal/blob/master/release-notes/cabal-install-3.14.1.0.md
3 changes: 3 additions & 0 deletions cabal-install/changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
-*-change-log-*-

3.14.1.0 Hécate <[email protected]> November 2024
* See https://github.com/haskell/cabal/blob/master/release-notes/cabal-install-3.14.1.0.md

3.14.0.0 Hécate <[email protected]> September 2024
* See https://github.com/haskell/cabal/blob/master/release-notes/cabal-install-3.14.0.0.md

Expand Down
20 changes: 13 additions & 7 deletions cabal-install/src/Distribution/Client/ParseUtils.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}

-----------------------------------------------------------------------------

Expand Down Expand Up @@ -53,6 +55,7 @@ import Distribution.Deprecated.ParseUtils
( Field (..)
, FieldDescr (..)
, LineNo
, PError (..)
, ParseResult (..)
, liftField
, lineNo
Expand Down Expand Up @@ -292,13 +295,16 @@ parseFieldsAndSections fieldDescrs sectionDescrs fgSectionDescrs =
setField a (F line name value) =
case Map.lookup name fieldMap of
Just (FieldDescr _ _ set) -> set line value a
Nothing -> do
warning $
"Unrecognized field '"
++ name
++ "' on line "
++ show line
return a
Nothing ->
case Left <$> Map.lookup name sectionMap <|> Right <$> Map.lookup name fgSectionMap of
Just _ -> ParseFailed $ FieldShouldBeStanza name line
Nothing -> do
warning $
"Unrecognized field '"
++ name
++ "' on line "
++ show line
return a
setField a (Section line name param fields) =
case Left <$> Map.lookup name sectionMap <|> Right <$> Map.lookup name fgSectionMap of
Just (Left (SectionDescr _ fieldDescrs' sectionDescrs' _ set sectionEmpty)) -> do
Expand Down
5 changes: 5 additions & 0 deletions cabal-install/src/Distribution/Deprecated/ParseUtils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ data PError
= AmbiguousParse String LineNo
| NoParse String LineNo
| TabsError LineNo
| FieldShouldBeStanza String LineNo
| FromString String (Maybe LineNo)
deriving (Eq, Show)

Expand Down Expand Up @@ -186,6 +187,10 @@ locatedErrorMsg (NoParse f n) =
, "Parse of field '" ++ f ++ "' failed."
)
locatedErrorMsg (TabsError n) = (Just n, "Tab used as indentation.")
locatedErrorMsg (FieldShouldBeStanza name lineNumber) =
( Just lineNumber
, "'" ++ name ++ "' is a stanza, not a field. Remove the trailing ':' to parse a stanza."
)
locatedErrorMsg (FromString s n) = (n, s)

syntaxError :: LineNo -> String -> ParseResult a
Expand Down
Loading

0 comments on commit 7d0f7b0

Please sign in to comment.