Skip to content

Commit a3807fe

Browse files
authored
Merge pull request commercialhaskell#6503 from commercialhaskell/re6492
Re commercialhaskell#6492 Prefer 'project packages' to 'local packages'
2 parents 236e253 + 3a7b680 commit a3807fe

File tree

12 files changed

+19
-19
lines changed

12 files changed

+19
-19
lines changed

src/Stack/Build/Haddock.hs

+2-2
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ generateLocalHaddockIndex bco localDumpPkgs locals = do
135135
)
136136
locals
137137
generateHaddockIndex
138-
"local packages"
138+
"project packages"
139139
bco
140140
dumpPackages
141141
"."
@@ -160,7 +160,7 @@ generateDepsHaddockIndex bco globalDumpPkgs snapshotDumpPkgs localDumpPkgs local
160160
) locals
161161
depDocDir = localDepsDocDir bco
162162
generateHaddockIndex
163-
"local packages and dependencies"
163+
"project packages and dependencies"
164164
bco
165165
deps
166166
".."

src/Stack/Build/Target.hs

+5-5
Original file line numberDiff line numberDiff line change
@@ -394,10 +394,10 @@ resolveRawTarget sma allLocs (rawInput, rt) =
394394
| Map.member name locals = pure $ Left $
395395
fillSep
396396
[ style Target (fromPackageName name)
397-
, flow "target has a specific version number, but it is a local \
397+
, flow "target has a specific version number, but it is a project \
398398
\package. To avoid confusion, we will not install the \
399-
\specified version or build the local one. To build the \
400-
\local package, specify the target without an explicit \
399+
\specified version or build the project package. To build the \
400+
\project package, specify the target without an explicit \
401401
\version."
402402
]
403403
| otherwise =
@@ -572,8 +572,8 @@ parseTargets needTargets haddockDeps boptscli smActual = do
572572
]
573573
| null textTargets' && Map.null locals ->
574574
prettyThrowIO $ TargetParseException
575-
[ flow "The project contains no local packages (packages not \
576-
\marked with 'extra-dep')."
575+
[ flow "The project contains no project packages (packages other \
576+
\than extra-deps)."
577577
]
578578
| otherwise -> prettyThrowIO $ TargetParseException
579579
[ flow "The specified targets matched no packages." ]

src/Stack/BuildPlan.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ instance Exception BuildPlanException where
123123
shadowed'
124124
| Map.null shadowed = []
125125
| otherwise = concat
126-
[ ["The following packages are shadowed by local packages:"]
126+
[ ["The following packages are shadowed by project packages:"]
127127
, map go (Map.toList shadowed)
128128
, ["Recommended action: modify the extra-deps field of " ++
129129
toFilePath stackYaml ++

src/Stack/ConfigCmd.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ urlArgument = OA.strArgument
378378

379379
configCmdEnvParser :: OA.Parser EnvSettings
380380
configCmdEnvParser = EnvSettings
381-
<$> boolFlags True "locals" "include local package information" mempty
381+
<$> boolFlags True "locals" "include information about local packages" mempty
382382
<*> boolFlags True
383383
"ghc-package-path" "set GHC_PACKAGE_PATH environment variable" mempty
384384
<*> boolFlags True "stack-exe" "set STACK_EXE environment variable" mempty

src/Stack/Coverage.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ instance Pretty CoveragePrettyException where
9494
"[S-9975]"
9595
<> line
9696
<> fillSep
97-
[ flow "Expected a local package, but"
97+
[ flow "Expected a project package, but"
9898
, style Target . fromPackageName $ name
9999
, flow "is either an extra-dep or in the snapshot."
100100
]

src/Stack/Init.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ renderStackYaml p ignoredPackages dupPackages =
410410
, ("snapshot" , snapshotHelp)
411411
, ("packages" , packageHelp)
412412
, ("extra-deps" , extraDepsHelp)
413-
, ("flags" , "# Override default flag values for local packages and extra-deps")
413+
, ("flags" , "# Override default flag values for project packages and extra-deps")
414414
, ("extra-package-dbs", "# Extra package databases containing global packages")
415415
]
416416
-- Help strings

src/Stack/Options/BuildParser.hs

+2-2
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ targetsParser =
121121
many (textArgument
122122
( metavar "TARGET"
123123
<> completer targetCompleter
124-
<> help "If none specified, use all local packages. See \
124+
<> help "If none specified, use all project packages. See \
125125
\https://docs.haskellstack.org/en/stable/build_command/#target-syntax \
126126
\for details."
127127
))
@@ -132,7 +132,7 @@ flagsParser = Map.unionsWith Map.union
132132
( long "flag"
133133
<> completer flagCompleter
134134
<> metavar "PACKAGE:[-]FLAG"
135-
<> help "Override flags set in stack.yaml (applies to local packages \
135+
<> help "Override flags set in stack.yaml (applies to project packages \
136136
\and extra-deps)."
137137
))
138138

src/Stack/Options/ConfigParser.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ configOptsParser currentDir hide0 =
181181
hide
182182
<*> fmap toDumpLogs (firstBoolFlagsNoDefault
183183
"dump-logs"
184-
"dump the build output logs for local packages to the console. \
184+
"dump the build output logs for project packages to the console. \
185185
\(default: dump warning logs)"
186186
hide)
187187
<*> optionalFirst (option readColorWhen

src/Stack/Options/GhciParser.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ ghciOptsParser = GhciOpts
2727
<$> many (textArgument
2828
( metavar "TARGET/FILE"
2929
<> completer (targetCompleter <> fileExtCompleter [".hs", ".lhs"])
30-
<> help "If none specified, use all local packages. See \
30+
<> help "If none specified, use all project packages. See \
3131
\https://docs.haskellstack.org/en/stable/build_command/#target-syntax \
3232
\for details. If a path to a .hs or .lhs file is specified, it \
3333
\will be loaded."

src/Stack/Options/LsParser.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ textFilterParser = many (OA.option parseListDepsTextFilter
144144
( OA.long "filter"
145145
<> OA.metavar "ITEM"
146146
<> OA.help "Item to be filtered out of the results, if present, being either \
147-
\$locals (for all local packages) or a package name (can be \
147+
\$locals (for all project packages) or a package name (can be \
148148
\specified multiple times)."
149149
))
150150

src/Stack/Types/Build/Exception.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ instance Exception BuildException where
149149
-- Suppressing duplicate output
150150
displayException (LocalPackageDoesn'tMatchTarget name localV requestedV) = concat
151151
[ "Error: [S-5797]\n"
152-
, "Version for local package "
152+
, "Version for project package "
153153
, packageNameString name
154154
, " is "
155155
, versionString localV

src/Stack/Types/Config/Exception.hs

+2-2
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ instance Pretty ConfigPrettyException where
218218
"[S-5470]"
219219
<> line
220220
<> fillSep
221-
[ flow "The same package name is used in more than one local package \
222-
\or"
221+
[ flow "The same package name is used in more than one project \
222+
\package or"
223223
, style Shell "extra-deps" <> "."
224224
]
225225
<> mconcat (map go pairs)

0 commit comments

Comments
 (0)