Skip to content

Commit bc0ab60

Browse files
authored
Merge pull request #6399 from IntersectMBO/mgalazyn/chore/remove-o-a-f-dep
Remove optparse-applicative-fork dependency where not depending on cardano-cli
2 parents 71fa262 + 9556f2d commit bc0ab60

File tree

11 files changed

+25
-22
lines changed

11 files changed

+25
-22
lines changed

bench/cardano-profile/app/cardano-profile.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import Data.Aeson.Encode.Pretty as Aeson
1515
import qualified Data.ByteString.Lazy.Char8 as BSL8
1616
-- Package: containers.
1717
import qualified Data.Map.Strict as Map
18-
-- Package: optparse-applicative-fork.
18+
-- Package: optparse-applicative.
1919
import qualified Options.Applicative as OA
2020
-- Package: self.
2121
import qualified Cardano.Benchmarking.Profile as Profile

bench/cardano-profile/cardano-profile.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ executable cardano-profile
9292
, vector
9393
, bytestring
9494
, containers
95-
, optparse-applicative-fork
95+
, optparse-applicative
9696
, text
9797
, cardano-profile
9898

bench/cardano-topology/cardano-topology.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ executable cardano-topology
6565
, bytestring
6666
, containers
6767
, graphviz
68-
, optparse-applicative-fork
68+
, optparse-applicative
6969
, split
7070
, text
7171
, cardano-topology

bench/locli/locli.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ library
124124
, filepath
125125
, fingertree == 0.1.5.0
126126
, hashable
127-
, optparse-applicative-fork >= 0.18.1
127+
, optparse-applicative
128128
, ouroboros-consensus
129129
, ouroboros-network-api ^>= 0.16
130130
, sop-core
@@ -156,7 +156,7 @@ executable locli
156156
build-depends: aeson
157157
, cardano-prelude
158158
, locli
159-
, optparse-applicative-fork
159+
, optparse-applicative
160160
, text
161161
, text-short
162162
, transformers

bench/tx-generator/tx-generator.cabal

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ library
139139
, mtl
140140
, network
141141
, network-mux
142-
, optparse-applicative-fork
142+
, optparse-applicative
143143
, ouroboros-consensus >= 0.6
144144
, ouroboros-consensus-cardano >= 0.5
145145
, ouroboros-consensus-diffusion >= 0.7.0
@@ -202,7 +202,7 @@ executable calibrate-script
202202
, directory
203203
, extra
204204
, filepath
205-
, optparse-applicative-fork
205+
, optparse-applicative
206206
, cardano-api
207207
, text
208208
, transformers
@@ -235,7 +235,7 @@ test-suite tx-generator-apitest
235235
, directory
236236
, extra
237237
, filepath
238-
, optparse-applicative-fork
238+
, optparse-applicative
239239
, cardano-api
240240
, cardano-cli
241241
, cardano-node

cardano-node-capi/cardano-node-capi.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ library
2424
, aeson
2525
, bytestring
2626
, cardano-node
27-
, optparse-applicative-fork
27+
, optparse-applicative
2828
hs-source-dirs: src

cardano-node-chairman/cardano-node-chairman.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ executable cardano-node-chairman
5050
, containers
5151
, contra-tracer
5252
, io-classes:{io-classes, strict-stm, si-timers}
53-
, optparse-applicative-fork
53+
, optparse-applicative
5454
, ouroboros-consensus
5555
, ouroboros-consensus-cardano
5656
, ouroboros-network-api

cardano-node/app/cardano-node.hs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import qualified Data.Text as Text
1818
import qualified Data.Text.IO as Text
1919
import Data.Version (showVersion)
2020
import Options.Applicative
21+
import Options.Applicative.Help.Pretty
2122
import qualified Options.Applicative as Opt
22-
import Options.Applicative.Help ((<$$>))
2323
import System.Info (arch, compilerName, compilerVersion, os)
2424
import System.IO (hPutStrLn, stderr)
2525

@@ -70,10 +70,12 @@ main = do
7070

7171
nodeCliHelpMain :: String
7272
nodeCliHelpMain = renderHelpDoc 80 $
73-
parserHelpHeader "cardano-node" nodeCLIParser
74-
<$$> ""
75-
<$$> parserHelpOptions nodeCLIParser
76-
73+
mconcat [ parserHelpHeader "cardano-node" nodeCLIParser
74+
, line'
75+
, ""
76+
, line'
77+
, parserHelpOptions nodeCLIParser
78+
]
7779

7880
data Command = RunCmd PartialNodeConfiguration
7981
| TraceDocumentation TraceDocumentationCmd

cardano-node/cardano-node.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ library
184184
, network
185185
, network-mux >= 0.8
186186
, nothunks
187-
, optparse-applicative-fork >= 0.18.1
187+
, optparse-applicative
188188
, ouroboros-consensus ^>= 0.28
189189
, ouroboros-consensus-cardano ^>= 0.26
190190
, ouroboros-consensus-diffusion ^>= 0.24
@@ -236,7 +236,7 @@ executable cardano-node
236236
, cardano-crypto-class
237237
, cardano-git-rev
238238
, cardano-node
239-
, optparse-applicative-fork
239+
, optparse-applicative
240240
, text
241241

242242
test-suite cardano-node-test

cardano-node/src/Cardano/Node/Parsers.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import Options.Applicative hiding (str, switch)
3838
-- file. See `parseStartAsNonProducingNode` and `parseValidateDB`.
3939
import qualified Options.Applicative as Opt
4040
import qualified Options.Applicative.Help as OptI
41+
import qualified Prettyprinter.Internal as PP
4142
import System.Posix.Types (Fd (..))
4243
import Text.Read (readMaybe)
4344

@@ -433,4 +434,4 @@ parserHelpOptions = fromMaybe mempty . OptI.unChunk . OptI.fullDesc (Opt.prefs m
433434
-- | Render the help pretty document.
434435
renderHelpDoc :: Int -> OptI.Doc -> String
435436
renderHelpDoc cols =
436-
(`OptI.renderShowS` "") . OptI.layoutPretty (OptI.LayoutOptions (OptI.AvailablePerLine cols 1.0))
437+
(`PP.renderShowS` "") . OptI.layoutPretty (OptI.LayoutOptions (OptI.AvailablePerLine cols 1.0))

0 commit comments

Comments
 (0)