Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for using GHC's -jsem option (backport #9139) #9140

Closed
wants to merge 1 commit into from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jul 19, 2023

This is an automatic backport of pull request #9139 done by Mergify.
Cherry-pick of 0a1c167 has failed:

On branch mergify/bp/3.10/pr-9139
Your branch is up to date with 'origin/3.10'.

You are currently cherry-picking commit 0a1c167a7.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   Cabal/Cabal.cabal
	new file:   Cabal/src/Distribution/Types/ParStrat.hs
	modified:   bootstrap/linux-8.10.7.json
	modified:   bootstrap/linux-9.0.2.json
	modified:   bootstrap/linux-9.2.8.json
	modified:   cabal-install/cabal-install.cabal
	modified:   cabal-install/tests/IntegrationTests2.hs
	new file:   cabal-testsuite/PackageTests/NewBuild/Semaphore/C.hs
	new file:   cabal-testsuite/PackageTests/NewBuild/Semaphore/Semaphore.cabal
	new file:   cabal-testsuite/PackageTests/NewBuild/Semaphore/Setup.hs
	new file:   cabal-testsuite/PackageTests/NewBuild/Semaphore/cabal.out
	new file:   cabal-testsuite/PackageTests/NewBuild/Semaphore/cabal.project
	new file:   cabal-testsuite/PackageTests/NewBuild/Semaphore/cabal.test.hs
	new file:   cabal-testsuite/PackageTests/NewBuild/Semaphore/sub-package-A/A.hs
	new file:   cabal-testsuite/PackageTests/NewBuild/Semaphore/sub-package-A/Setup.hs
	new file:   cabal-testsuite/PackageTests/NewBuild/Semaphore/sub-package-A/sub-package-A.cabal
	new file:   cabal-testsuite/PackageTests/NewBuild/Semaphore/sub-package-B/B.hs
	new file:   cabal-testsuite/PackageTests/NewBuild/Semaphore/sub-package-B/Setup.hs
	new file:   cabal-testsuite/PackageTests/NewBuild/Semaphore/sub-package-B/sub-package-B.cabal
	new file:   changelog.d/pr-8557
	new file:   changelog.d/pr-8557-2
	modified:   doc/cabal-project.rst

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	both modified:   Cabal/src/Distribution/Simple/Build.hs
	both modified:   Cabal/src/Distribution/Simple/Compiler.hs
	both modified:   Cabal/src/Distribution/Simple/GHC.hs
	both modified:   Cabal/src/Distribution/Simple/GHCJS.hs
	both modified:   Cabal/src/Distribution/Simple/Program/GHC.hs
	both modified:   Cabal/src/Distribution/Simple/Setup.hs
	deleted by us:   Cabal/src/Distribution/Simple/Setup/Build.hs
	both modified:   bootstrap/linux-9.4.5.json
	both modified:   cabal-install/src/Distribution/Client/Config.hs
	both modified:   cabal-install/src/Distribution/Client/JobControl.hs
	both modified:   cabal-install/src/Distribution/Client/ProjectBuilding.hs
	both modified:   cabal-install/src/Distribution/Client/ProjectConfig.hs
	both modified:   cabal-install/src/Distribution/Client/ProjectConfig/Legacy.hs
	both modified:   cabal-install/src/Distribution/Client/ProjectConfig/Types.hs
	both modified:   cabal-install/src/Distribution/Client/ProjectPlanning.hs
	both modified:   cabal-install/src/Distribution/Client/Setup.hs
	both modified:   cabal-install/tests/UnitTests/Distribution/Client/ProjectConfig.hs

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

* The top-level user interface to enable the use of the semaphore is the
  `--semaphore` flag. If you pass `-j4 --semaphore` then cabal will
  create a semaphore with 4 slots which is passed to ghc using the
  `-jsem` option so that all GHC processes coordinate to use 4
  capabilities.

  - The semaphore logic is provided by a new package `semaphore-compat`
    which provides a cross-platform abstraction for semaphores.

* The low level `./Setup.hs build` interface accepts the `--semaphore
  <SEMAPHORE>` option, which can be used to directly pass the semaphore
  you require to the Setup script.

(cherry picked from commit 0a1c167)

# Conflicts:
#	Cabal/src/Distribution/Simple/Build.hs
#	Cabal/src/Distribution/Simple/Compiler.hs
#	Cabal/src/Distribution/Simple/GHC.hs
#	Cabal/src/Distribution/Simple/GHCJS.hs
#	Cabal/src/Distribution/Simple/Program/GHC.hs
#	Cabal/src/Distribution/Simple/Setup.hs
#	Cabal/src/Distribution/Simple/Setup/Build.hs
#	bootstrap/linux-9.4.5.json
#	cabal-install/src/Distribution/Client/Config.hs
#	cabal-install/src/Distribution/Client/JobControl.hs
#	cabal-install/src/Distribution/Client/ProjectBuilding.hs
#	cabal-install/src/Distribution/Client/ProjectConfig.hs
#	cabal-install/src/Distribution/Client/ProjectConfig/Legacy.hs
#	cabal-install/src/Distribution/Client/ProjectConfig/Types.hs
#	cabal-install/src/Distribution/Client/ProjectPlanning.hs
#	cabal-install/src/Distribution/Client/Setup.hs
#	cabal-install/tests/UnitTests/Distribution/Client/ProjectConfig.hs
@Kleidukos
Copy link
Member

hmm fuck.

@Kleidukos Kleidukos marked this pull request as draft July 19, 2023 11:26
@ulysses4ever
Copy link
Collaborator

Hey! Just wanted to double-check: are we changing the policy for point releases to be bug fix only?

@Kleidukos
Copy link
Member

I wanted to see if that one was free. :p But hopefully by the time 9.8 arrives and is widely used, we'll have 3.12 as the new cabal stable

@ulysses4ever
Copy link
Collaborator

By all means! I'm also eager to have this in a release but it's a sizeable patch, and I just wanted to play cautious here...

@Mikolaj
Copy link
Member

Mikolaj commented Sep 4, 2023

Now that the experiment is through, could you close the PR?

@Kleidukos Kleidukos closed this Sep 4, 2023
@mergify mergify bot deleted the mergify/bp/3.10/pr-9139 branch September 4, 2023 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants