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

Fix extra-prog-path propagation in the codebase. (backport #9527) #9629

Merged
merged 3 commits into from
Jan 22, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jan 18, 2024

This is an automatic backport of pull request #9527 done by Mergify.
Cherry-pick of 46df8ba has failed:

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

You are currently cherry-picking commit 46df8ba71.
  (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:   changelog.d/propagate-extra-prog-path

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   Cabal/src/Distribution/Simple/Configure.hs
	both modified:   Cabal/src/Distribution/Simple/ConfigureScript.hs
	both modified:   Cabal/src/Distribution/Simple/GHC.hs
	both modified:   Cabal/src/Distribution/Simple/GHCJS.hs
	both modified:   Cabal/src/Distribution/Simple/Program/Db.hs
	both modified:   Cabal/src/Distribution/Simple/Program/Find.hs
	both modified:   Cabal/src/Distribution/Simple/Program/GHC.hs
	both modified:   Cabal/src/Distribution/Simple/Program/Run.hs
	both modified:   Cabal/src/Distribution/Simple/Program/Types.hs
	both modified:   cabal-install/src/Distribution/Client/CmdExec.hs
	both modified:   cabal-install/src/Distribution/Client/CmdInstall.hs
	both modified:   cabal-install/src/Distribution/Client/CmdRun.hs
	both modified:   cabal-install/src/Distribution/Client/Config.hs
	both modified:   cabal-install/src/Distribution/Client/Get.hs
	both modified:   cabal-install/src/Distribution/Client/HttpUtils.hs
	both modified:   cabal-install/src/Distribution/Client/ProjectConfig.hs
	both modified:   cabal-install/src/Distribution/Client/ProjectOrchestration.hs
	both modified:   cabal-install/src/Distribution/Client/ProjectPlanning.hs
	both modified:   cabal-install/src/Distribution/Client/SetupWrapper.hs
	both modified:   cabal-install/src/Distribution/Client/VCS.hs
	both modified:   cabal-install/tests/UnitTests/Distribution/Client/Get.hs
	both modified:   cabal-install/tests/UnitTests/Distribution/Client/VCS.hs

Cherry-pick of f06195d has failed:

On branch mergify/bp/3.10/pr-9527
Your branch is ahead of 'origin/3.10' by 1 commit.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit f06195d3a.
  (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-install/src/Distribution/Client/CmdRun.hs
	new file:   changelog.d/pr-9341

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   cabal-install/src/Distribution/Client/CmdExec.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

@jasagredo
Copy link
Collaborator

There were many conflicts so probably it is worth double-checking that I didn't forget anything. I can do it next week probably if no one can do it earlier.

I went conflict by conflict trying to replicate the style that was there before, but with the code from the new chunks.

@mergify mergify bot added the backport label Jan 22, 2024
@Kleidukos Kleidukos added merge me Tell Mergify Bot to merge and removed conflicts labels Jan 22, 2024
jasagredo and others added 3 commits January 22, 2024 00:02
Extra prog paths were being handled in many different ways all thorugh
the codebase. This PR introduces a unified way to look at them.

Aiming for traceability, the addition of extra paths is now traced via
`logExtraProgramSearchPath`. All appearances of
`modifyProgramSearchPath` are replaced with `appendProgramSearchPath`
which traces the added paths.

`progInvokePathEnv` was only being set by GHC for some paths to
executables in components and only under certain circumstances. Now
every `ghcInvocation` sets the extra paths directly into `pkgInvokeEnv`.

In particular this fixes PATH issues when running MinGW cabal in
PowerShell, as usually for other OSes the system path contains most of
the expected directories.

(cherry picked from commit 46df8ba)

# Conflicts:
#	Cabal/src/Distribution/Simple/Configure.hs
#	Cabal/src/Distribution/Simple/ConfigureScript.hs
#	Cabal/src/Distribution/Simple/GHC.hs
#	Cabal/src/Distribution/Simple/GHCJS.hs
#	Cabal/src/Distribution/Simple/Program/Db.hs
#	Cabal/src/Distribution/Simple/Program/Find.hs
#	Cabal/src/Distribution/Simple/Program/GHC.hs
#	Cabal/src/Distribution/Simple/Program/Run.hs
#	Cabal/src/Distribution/Simple/Program/Types.hs
#	cabal-install/src/Distribution/Client/CmdExec.hs
#	cabal-install/src/Distribution/Client/CmdInstall.hs
#	cabal-install/src/Distribution/Client/CmdRun.hs
#	cabal-install/src/Distribution/Client/Config.hs
#	cabal-install/src/Distribution/Client/Get.hs
#	cabal-install/src/Distribution/Client/HttpUtils.hs
#	cabal-install/src/Distribution/Client/ProjectConfig.hs
#	cabal-install/src/Distribution/Client/ProjectOrchestration.hs
#	cabal-install/src/Distribution/Client/ProjectPlanning.hs
#	cabal-install/src/Distribution/Client/SetupWrapper.hs
#	cabal-install/src/Distribution/Client/VCS.hs
#	cabal-install/tests/UnitTests/Distribution/Client/Get.hs
#	cabal-install/tests/UnitTests/Distribution/Client/VCS.hs
Similarly to CmdExec and CmdTest, get paths to all dependency binaries
and add those to PATH. Unlike CmdExec, add just the explicitly required
paths.

(cherry picked from commit f06195d)

# Conflicts:
#	cabal-install/src/Distribution/Client/CmdExec.hs
@Mikolaj Mikolaj force-pushed the mergify/bp/3.10/pr-9527 branch from ed46a96 to f8be891 Compare January 22, 2024 00:02
@mergify mergify bot merged commit 1ced344 into 3.10 Jan 22, 2024
41 checks passed
@mergify mergify bot deleted the mergify/bp/3.10/pr-9527 branch January 22, 2024 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants