Fix extra-prog-path propagation in the codebase. (backport #9527)#9629
Merged
mergify[bot] merged 3 commits into3.10from Jan 22, 2024
Merged
Fix extra-prog-path propagation in the codebase. (backport #9527)#9629mergify[bot] merged 3 commits into3.10from
mergify[bot] merged 3 commits into3.10from
Conversation
5 tasks
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. |
Kleidukos
approved these changes
Jan 22, 2024
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
ed46a96 to
f8be891
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an automatic backport of pull request #9527 done by Mergify.
Cherry-pick of 46df8ba has failed:
Cherry-pick of f06195d has failed:
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 refreshwill re-evaluate the rules@Mergifyio rebasewill rebase this PR on its base branch@Mergifyio updatewill merge the base branch into this PR@Mergifyio backport <destination>will backport this PR on<destination>branchAdditionally, on Mergify dashboard you can:
Finally, you can contact us on https://mergify.com