There is a 2018 issue in Stack’s repository (#4046) that discusses the merits of stack build
making use of GHC’s -j[<n>]
flag, perhaps ‘by default’. That has prompted me to look at the flag, and I have some questions where I would appeciate any help:
-
If GHC’s
-j[<n>]
flag was an unambiguously good thing for faster compiling, would it not be set by GHC by default (it is not)? Does that mean the use of the flag can have a downside? -
In practice, related to point 1, do people who are conscious of the existence of GHC’s
-j
flag tend to set it as a matter of course or not? -
Am I correct to understand that modern versions of Cabal (the tool) do not set GHC’s
-j
flag by default? Related to point 1, if not, why not? -
-jN
first appears in the documentation for GHC 7.8.1 (although it is not identified as something new). GHC 8.2.1 is the first to document “If N is omitted, then it defaults to the number of processors.”, but that is not identified as something new. Does anybody recall if that was a change in behaviour or simply an improvement in the documentation? (Stack aims to support back to GHC 7.10.3, at present, so I am interested in backward compatibility.)