Skip to content

Commit f9acabc

Browse files
committed
Re #11498 Better document Cabal's --semaphore=SEMAPHORE option
This is follows GHC's dependency on `semaphore-compat-2.0.0` (first reflected in GHC 9.12.5-rc2). The terminology of the dependency package now: * introduces the concept of protocol versions for semaphores (there remains only one protocol version on Windows); * distinguishes server semaphores and corresponding client semaphores; and * distinguishes unversioned client semaphore names and client semaphore identifiers. This conforms the language in Cabal's User Guide to that of the package.
1 parent eab682c commit f9acabc

3 files changed

Lines changed: 17 additions & 4 deletions

File tree

Cabal/src/Distribution/Simple/Setup/Build.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ buildOptions progDb showOrParseArgs =
152152
, option
153153
[]
154154
["semaphore"]
155-
"Use the specified semaphore so GHC can compile components in parallel"
155+
"Use the specified client semaphore identifier so GHC can compile components in parallel"
156156
buildUseSemaphore
157157
(\v flags -> flags{buildUseSemaphore = v})
158158
(reqArg' "SEMAPHORE" Flag flagToList)

changelog.d/pr-12021.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
synopsis: Better document, in-app and online, Cabal's `--semaphore=SEMAPHORE` option, post `semaphore-compat-2.0.0` support
2+
packages: Cabal
3+
prs: #12021
4+
significance:
5+
6+
description: {
7+
8+
- Cabal's `--semaphore=SEMAPHORE` option is better documented online and on `--help`.
9+
10+
}

doc/setup-commands.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,11 +1091,14 @@ This command takes the following options:
10911091

10921092
GHC 9.8.1 and later can act as a jobserver client, which enables two or more
10931093
GHC processes running at once to share system resources with each other,
1094-
communicating via a specified system semaphore. The system semaphore is
1095-
identified by a name (a string).
1094+
communicating via a specified system client semaphore. A GHC version
1095+
supports a specific protocol version for semaphores. On non-Windows
1096+
operating systems, more than one protocol version exists. The system client
1097+
semaphore is identified by a string, being a bare name (for protocol
1098+
version 1) or a versioned name (for subsequent protocol versions).
10961099

10971100
This option causes Cabal to control parallelism by using the specified
1098-
system semaphore.
1101+
system client semaphore.
10991102

11001103
.. _setup-haddock:
11011104

0 commit comments

Comments
 (0)