Skip to content

Commit

Permalink
Merge branch 'master' into fix9151
Browse files Browse the repository at this point in the history
  • Loading branch information
aleeusgr committed Oct 17, 2023
2 parents 47570b1 + 9f37325 commit 36641d6
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Cabal/Cabal.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ library
array >= 0.4.0.1 && < 0.6,
base >= 4.9 && < 5,
bytestring >= 0.10.0.0 && < 0.13,
containers >= 0.5.0.0 && < 0.7,
containers >= 0.5.0.0 && < 0.8,
deepseq >= 1.3.0.1 && < 1.6,
directory >= 1.2 && < 1.4,
filepath >= 1.3.0.1 && < 1.5,
Expand Down
41 changes: 26 additions & 15 deletions Cabal/src/Distribution/Simple/Haddock.hs
Original file line number Diff line number Diff line change
Expand Up @@ -866,25 +866,32 @@ renderPureArgs version comp platform args =
, ["--since-qual=external" | isVersion 2 20]
, [ "--quickjump" | isVersion 2 19, True <- flagToList . argQuickJump $ args
]
, [ "--hyperlinked-source" | isVersion 2 17, True <- flagToList . argLinkedSource $ args
]
, ["--hyperlinked-source" | isHyperlinkedSource]
, (\(All b, xs) -> bool (map (("--hide=" ++) . prettyShow) xs) [] b)
. argHideModules
$ args
, bool ["--ignore-all-exports"] [] . getAny . argIgnoreExports $ args
, maybe
[]
( \(m, e, l) ->
[ "--source-module=" ++ m
, "--source-entity=" ++ e
]
++ if isVersion 2 14
then ["--source-entity-line=" ++ l]
else []
)
. flagToMaybe
. argLinkSource
$ args
, -- Haddock's --source-* options are ignored once --hyperlinked-source is
-- set.
-- See https://haskell-haddock.readthedocs.io/en/latest/invoking.html#cmdoption-hyperlinked-source
-- To avoid Haddock's warning, we only set --source-* options if
-- --hyperlinked-source is not set.
if isHyperlinkedSource
then []
else
maybe
[]
( \(m, e, l) ->
[ "--source-module=" ++ m
, "--source-entity=" ++ e
]
++ if isVersion 2 14
then ["--source-entity-line=" ++ l]
else []
)
. flagToMaybe
. argLinkSource
$ args
, maybe [] ((: []) . ("--css=" ++)) . flagToMaybe . argCssFile $ args
, maybe [] ((: []) . ("--use-contents=" ++)) . flagToMaybe . argContents $ args
, bool ["--gen-contents"] [] . fromFlagOrDefault False . argGenContents $ args
Expand Down Expand Up @@ -965,6 +972,10 @@ renderPureArgs version comp platform args =
| otherwise = "--verbose"
haddockSupportsVisibility = version >= mkVersion [2, 26, 1]
haddockSupportsPackageName = version > mkVersion [2, 16]
haddockSupportsHyperlinkedSource = isVersion 2 17
isHyperlinkedSource =
haddockSupportsHyperlinkedSource
&& fromFlagOrDefault False (argLinkedSource args)

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

Expand Down
4 changes: 2 additions & 2 deletions Cabal/src/Distribution/Simple/Setup/Install.hs
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ installCommand =
"Copy the files into the install locations. Run register."
, commandDescription = Just $ \_ ->
wrapText $
"Unlike the copy command, install calls the register command."
++ "If you want to install into a location that is not what was"
"Unlike the copy command, install calls the register command. "
++ "If you want to install into a location that is not what was "
++ "specified in the configure step, use the copy command.\n"
, commandNotes = Nothing
, commandUsage = \pname ->
Expand Down
2 changes: 1 addition & 1 deletion cabal-install-solver/cabal-install-solver.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ library
, bytestring >=0.10.6.0 && <0.13
, Cabal ^>=3.11
, Cabal-syntax ^>=3.11
, containers >=0.5.6.2 && <0.7
, containers >=0.5.6.2 && <0.8
, edit-distance ^>= 0.2.2
, filepath ^>=1.4.0.0
, mtl >=2.0 && <2.4
Expand Down
2 changes: 1 addition & 1 deletion cabal-install/cabal-install.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ library
base64-bytestring >= 1.0 && < 1.3,
binary >= 0.7.3 && < 0.9,
bytestring >= 0.10.6.0 && < 0.13,
containers >= 0.5.6.2 && < 0.7,
containers >= 0.5.6.2 && < 0.8,
cryptohash-sha256 >= 0.11 && < 0.12,
directory >= 1.3.7.0 && < 1.4,
echo >= 0.1.3 && < 0.2,
Expand Down
2 changes: 2 additions & 0 deletions doc/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ sphinxnotes-strike
Pygments >= 2.7.4
# CVE-2023-37920
certifi >= 2023.07.22
# CVE-2023-43804
urllib3 >= 2.0.6
6 changes: 4 additions & 2 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,7 @@ sphinxcontrib-serializinghtml==1.1.5
# via sphinx
sphinxnotes-strike==1.2
# via -r requirements.in
urllib3==2.0.2
# via requests
urllib3==2.0.6
# via
# -r requirements.in
# requests

0 comments on commit 36641d6

Please sign in to comment.