Skip to content
Snippets Groups Projects
  1. Apr 20, 2023
    • sheaf's avatar
      Implement -jsem: parallelism controlled by semaphores · 5c873124
      sheaf authored and Marge Bot's avatar Marge Bot committed
      See https://github.com/ghc-proposals/ghc-proposals/pull/540/ for a
      complete description for the motivation for this feature.
      
      The `-jsem` option allows a build tool to pass a semaphore to GHC which
      GHC can use in order to control how much parallelism it requests.
      
      GHC itself acts as a client in the GHC jobserver protocol.
      
      ```
      GHC Jobserver Protocol
      ~~~~~~~~~~~~~~~~~~~~~~
      
      This proposal introduces the GHC Jobserver Protocol. This protocol allows
      a server to dynamically invoke many instances of a client process,
      while restricting all of those instances to use no more than <n> capabilities.
      This is achieved by coordination over a system semaphore (either a POSIX
      semaphore [6]_  in the case of Linux and Darwin, or a Win32 semaphore [7]_
      in the case of Windows platforms).
      
      There are two kinds of participants in the GHC Jobserver protocol:
      
      - The *jobserver* creates a system semaphore with a certain number of
        available tokens.
      
        Each time the jobserver wants to spawn a new jobclient subprocess, it **must**
        first acquire a single token from the semaphore, before spawning
        the subprocess. This token **must** be released once the subprocess terminates.
      
        Once work is finished, the jobserver **must** destroy the semaphore it created.
      
      - A *jobclient* is a subprocess spawned by the jobserver or another jobclient.
      
        Each jobclient starts with one available token (its *implicit token*,
        which was acquired by the parent which spawned it), and can request more
        tokens through the Jobserver Protocol by waiting on the semaphore.
      
        Each time a jobclient wants to spawn a new jobclient subprocess, it **must**
        pass on a single token to the child jobclient. This token can either be the
        jobclient's implicit token, or another token which the jobclient acquired
        from the semaphore.
      
        Each jobclient **must** release exactly as many tokens as it has acquired from
        the semaphore (this does not include the implicit tokens).
      ```
      
      Build tools such as cabal act as jobservers in the protocol and are
      responsibile for correctly creating, cleaning up and managing the
      semaphore.
      
      Adds a new submodule (semaphore-compat) for managing and interacting
      with semaphores in a cross-platform way.
      
      Fixes #19349
      5c873124
  2. Feb 17, 2023
    • Sylvain Henry's avatar
      Merge libiserv with ghci · a203ad85
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      `libiserv` serves no purpose. As it depends on `ghci` and doesn't have
      more dependencies than the `ghci` package, its code could live in the
      `ghci` package too.
      
      This commit also moves most of the code from the `iserv` program into
      the `ghci` package as well so that it can be reused. This is especially
      useful for the implementation of TH for the JS backend (#22261, !9779).
      a203ad85
  3. Sep 21, 2022
  4. Nov 13, 2019
  5. Mar 15, 2019
  6. Feb 16, 2019
    • Alec Theriault's avatar
      Remove `parallel` as a submodule · 3cb063c8
      Alec Theriault authored and Marge Bot's avatar Marge Bot committed
      `parallel` is used in exactly one place in the GHC tree: the T2317 test.
      It seems almost by accident that it is a submodule; libraries needed
      only for tests should net be included as submodules (see `QuickCheck`,
      `async`, `haskell98`, `regex-compat`, `utf8-string`, `vector` and more
      for examples).
      
      T2317 will now get run only when `parallel` is installed instead of
      `parallel` being required for the testsuite to run.
      3cb063c8
  7. Jul 14, 2018
  8. Jun 22, 2018
  9. Jun 02, 2018
    • Ben Gamari's avatar
      vectorise: Put it out of its misery · faee23bb
      Ben Gamari authored and Ben Gamari's avatar Ben Gamari committed
      Poor DPH and its vectoriser have long been languishing; sadly it seems there is
      little chance that the effort will be rekindled. Every few years we discuss
      what to do with this mass of code and at least once we have agreed that it
      should be archived on a branch and removed from `master`. Here we do just that,
      eliminating heaps of dead code in the process.
      
      Here we drop the ParallelArrays extension, the vectoriser, and the `vector` and
      `primitive` submodules.
      
      Test Plan: Validate
      
      Reviewers: simonpj, simonmar, hvr, goldfire, alanz
      
      Reviewed By: simonmar
      
      Subscribers: goldfire, rwbarton, thomie, mpickering, carter
      
      Differential Revision: https://phabricator.haskell.org/D4761
      faee23bb
  10. Oct 26, 2017
  11. Sep 20, 2017
    • Herbert Valerio Riedel's avatar
      Add 'stm' package to the global package database · 02ff7056
      Herbert Valerio Riedel authored
      This is a preparation for `haskeline` picking up a dependency on `stm`
      real soon now. See https://github.com/judah/haskeline/pull/61 for details.
      
      If we figure out a way to not bundle the libraries depended upon by the
      GHCi executable in the global package database (see #8919 for the original
      reason why we had to start bundling terminfo/haskeline in the first place)
      we can get rid of `stm` again...
      
      On the bright side, we were able to avoid uploading new `stm` releases for
      over two years already, so it shouldn't cause too much trouble if GHC imposes
      a strong preference on the `stm` package's version (this most likely will
      mostly affect Linux distributions & similiar).
      
      While at it, this also update the stm submodule to include relaxed
      bounds to allow the upcoming base-4.11 version.
      02ff7056
  12. Aug 15, 2017
    • Ryan Scott's avatar
      Bump mtl, parsec, text submodules · a520adcc
      Ryan Scott authored
      These three submodules have commits which add certain files to their
      respective .gitignores which GHC's build system produces. Also update
      the packages file accordingly.
      
      Test Plan: If it builds, ship it
      
      Reviewers: hvr, austin, bgamari
      
      Subscribers: rwbarton, thomie
      
      Differential Revision: https://phabricator.haskell.org/D3842
      a520adcc
  13. Aug 01, 2017
    • Herbert Valerio Riedel's avatar
      Enable building Cabal with parsec · 36fe21aa
      Herbert Valerio Riedel authored and Ben Gamari's avatar Ben Gamari committed
      Cabal's parser has been rewritten in terms of Parsec (which is not
      enabled yet in Cabal-2.0 by default, but can be enabled by a cabal
      flag). The plan for Cabal is to drop support for the non-parsec parser,
      so we need to prepare GHC to cope with new situation.
      
      However, this means that lib:Cabal requires three new library
      dependency submodules,
      
       - parsec
       - text
       - mtl
      
      What complicates matters is that we need to build `ghc-cabal` early on
      during the bootstrap phase which currently needs to invoke `ghc --make`
      directly. So these additional dependencies need to be integrated into
      the monolithic `ghc --make` invocation which produces the `ghc-cabal`
      executable.
      
      Test Plan: `./validate --fast` passed
      
      Reviewers: austin, bgamari
      
      Subscribers: erikd, phadej, rwbarton, thomie
      
      Differential Revision: https://phabricator.haskell.org/D3757
      36fe21aa
  14. Jun 23, 2017
    • Michal Terepeta's avatar
      Hoopl: remove dependency on Hoopl package · 42eee6ea
      Michal Terepeta authored and Ben Gamari's avatar Ben Gamari committed
      
      This copies the subset of Hoopl's functionality needed by GHC to
      `cmm/Hoopl` and removes the dependency on the Hoopl package.
      
      The main motivation for this change is the confusing/noisy interface
      between GHC and Hoopl:
      - Hoopl has `Label` which is GHC's `BlockId` but different than
        GHC's `CLabel`
      - Hoopl has `Unique` which is different than GHC's `Unique`
      - Hoopl has `Unique{Map,Set}` which are different than GHC's
        `Uniq{FM,Set}`
      - GHC has its own specialized copy of `Dataflow`, so `cmm/Hoopl` is
        needed just to filter the exposed functions (filter out some of the
        Hoopl's and add the GHC ones)
      With this change, we'll be able to simplify this significantly.
      It'll also be much easier to do invasive changes (Hoopl is a public
      package on Hackage with users that depend on the current behavior)
      
      This should introduce no changes in functionality - it merely
      copies the relevant code.
      
      Signed-off-by: default avatarMichal Terepeta <michal.terepeta@gmail.com>
      
      Test Plan: ./validate
      
      Reviewers: austin, bgamari, simonmar
      
      Reviewed By: bgamari, simonmar
      
      Subscribers: simonpj, kavon, rwbarton, thomie
      
      Differential Revision: https://phabricator.haskell.org/D3616
      42eee6ea
  15. May 11, 2017
  16. Feb 26, 2017
  17. Nov 22, 2016
  18. Oct 06, 2016
  19. May 11, 2016
  20. Jul 15, 2015
  21. Dec 02, 2014
  22. Nov 21, 2014
  23. Oct 16, 2014
  24. Sep 15, 2014
  25. Aug 25, 2014
  26. Jul 21, 2014
  27. Jul 11, 2014
  28. Jun 25, 2014
    • Herbert Valerio Riedel's avatar
      Convert loose sub-repos into proper submodules (re #8545) · db19c665
      Herbert Valerio Riedel authored
      
      Specifically, the following sub-repos/modules are converted:
      
       - libffi-tarballs
       - libraries/array
       - libraries/deepseq
       - libraries/directory
       - libraries/dph
       - libraries/filepath
       - libraries/haskell2010
       - libraries/haskell98
       - libraries/hoopl
       - libraries/hpc
       - libraries/old-locale
       - libraries/old-time
       - libraries/parallel
       - libraries/process
       - libraries/stm
       - libraries/unix
       - nofib
       - utils/hsc2hs
      
      N.B. ghc-tarballs is not converted as it will probably be handled
           differently in the future.
      
      Signed-off-by: Herbert Valerio Riedel's avatarHerbert Valerio Riedel <hvr@gnu.org>
      db19c665
  29. Jun 04, 2014
  30. Apr 19, 2014
  31. Mar 23, 2014
  32. Jan 12, 2014
  33. Nov 04, 2013
  34. Oct 31, 2013
  35. Oct 27, 2013
  36. Sep 26, 2013
  37. Sep 02, 2013
  38. Jul 30, 2013
Loading