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

Cabal: Take into account compilerBuildWay when computing final library ways (backport #10419) #10423

Closed
wants to merge 1 commit into from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Oct 4, 2024

In the profiling dynamic patch I made a mistake when computing the needed ways for a build.

When building an executable, the Haskell modules need to be built

  • For the final link way
  • For the build way of the compiler if TH is enabled

Before this patch, the modules were being built for all the configured library ways, which built modules in more configurations than the previous version of Cabal.

Fixes #10418

Please read Github PR Conventions and then fill in one of these two templates.


Template Α: This PR modifies behaviour or interface

Include the following checklist in your PR:

  • Patches conform to the coding conventions.
  • Any changes that could be relevant to users have been recorded in the changelog.
  • The documentation has been updated, if necessary.
  • Manual QA notes have been included.
  • Tests have been added. (Ask for help if you don’t know how to write them! Ask for an exemption if tests are too complex for too little coverage!)

Template B: This PR does not modify behaviour or interface

E.g. the PR only touches documentation or tests, does refactorings, etc.

Include the following checklist in your PR:

  • Patches conform to the coding conventions.
  • Is this a PR that fixes CI? If so, it will need to be backported to older cabal release branches (ask maintainers for directions).

This is an automatic backport of pull request #10419 done by [Mergify](https://mergify.com).

…y ways

In the profiling dynamic patch I made a mistake when computing the
needed ways for a build.

When building an executable, the Haskell modules need to be built

* For the final link way
* For the build way of the compiler if TH is enabled

Before this patch, the modules were being built for all the configured
library ways, which built modules in more configurations than the
previous version of Cabal.

Fixes #10418

(cherry picked from commit 27c2668)

# Conflicts:
#	Cabal/src/Distribution/Simple/GHC/Build.hs
@mergify mergify bot added the conflicts label Oct 4, 2024
Copy link
Contributor Author

mergify bot commented Oct 4, 2024

Cherry-pick of 27c2668 has failed:

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

You are currently cherry-picking commit 27c266884.
  (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:
	new file:   cabal-testsuite/PackageTests/BuildWays/p/CHANGELOG.md
	new file:   cabal-testsuite/PackageTests/BuildWays/p/p.cabal
	new file:   cabal-testsuite/PackageTests/BuildWays/p/src/MyLib.hs
	new file:   cabal-testsuite/PackageTests/BuildWays/q/CHANGELOG.md
	new file:   cabal-testsuite/PackageTests/BuildWays/q/app/Main.hs
	new file:   cabal-testsuite/PackageTests/BuildWays/q/q.cabal
	new file:   cabal-testsuite/PackageTests/BuildWays/setup.test.hs
	new file:   changelog.d/i10418

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   Cabal/src/Distribution/Simple/GHC/Build.hs

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

@geekosaur
Copy link
Collaborator

geekosaur commented Oct 4, 2024

I'm not sure this will fit into 3.12. In particular, #9900 wasn't backported.

@geekosaur
Copy link
Collaborator

geekosaur commented Oct 4, 2024

Oh, and it can't be backported because you changed the Cabal spec version.

@geekosaur geekosaur closed this Oct 4, 2024
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.

2 participants