-
Notifications
You must be signed in to change notification settings - Fork 704
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 precedence for PATH for build-tools-depends #8972
Conversation
Well done troubleshooting this and coming up with a fix! In the issue, you say (emphasis mine):
and right after:
If you allow me, this gives me the impression that your solution somewhat falls short of your own expectations and it makes me wonder if togheter we can find another way. From your diagnosis:
Repeating in my own words: cabal-install puts extra-prog-path in the PATH, then passes extra-prog-path to Cabal, which also puts it in the PATH causing confusion. What if cabal-install did not pass extra-prog-path to Cabal at all? using it only to set the PATH before calling Cabal.
#8506 was to resolve #6304, which was raised as a v2-build problem. Was there even a v1-build issue to solve? What is the difference between
and
? I am sure I am missing something here; so I thank you in advance for helping me to understand. |
@gbaz Would you like my help with fixing the conflicts of your PR? |
b37d3b5
to
4552405
Compare
4552405
to
f33c99b
Compare
, -- note that the above adds the extra-prog-path directly following the elaborated | ||
-- dep paths, so that it overrides the normal path, but _not_ the elaborated extensions | ||
-- for build-tools-depends. | ||
useExtraEnvOverrides = dataDirsEnvironmentForPlan distdir plan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comma goes here (for a cleaner diff), I believe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, please.
ProgramSearchPathDir | ||
(fromNubList $ configProgramPathExtra cfg) | ||
|
||
-- Note. We try as much as possible to _prepend_ rather than postpend the extra-prog-path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe postpend → append
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
append doesn't specify to front or back
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not going to debate a native speaker, but “add (something) to the end of a written document.” (def).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fun! I also don't like how artificial "postpend" sounds but on the other hand maybe extra clarity is justified here...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW I was surprised by "append doesn't specify"; I've always understood it as meaning "to the end of".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good AFAICS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I understand, this PR includes unrelated formatting changes, making a review more work than it would need to be.
@sol I believe a rebase will fix those. |
There's a test failure that I don't understand: https://github.com/haskell/cabal/actions/runs/5320595808/jobs/9634585502?pr=8972 |
@gbaz do you think you give some more love to this effort? It looks close! |
An end-to-end test that could have verified this PR can be harvested from: |
this subtle fix was apparently wrongly smashed by #9527 ? |
We must consider the path to the installed build-tool before the path to existing versions of the build tool in paths such as `extra-prog-path` or in the system path. This was previously fixed by haskell#8972 but undone by haskell#9527. This also renames `appendProgramSearchPath` to `prependProgramSearchPath` to describe correctly what that function does. Fixes haskell#9756
We must consider the path to the installed build-tool before the path to existing versions of the build tool in paths such as `extra-prog-path` or in the system path. This was previously fixed by haskell#8972 but undone by haskell#9527. This also renames `appendProgramSearchPath` to `prependProgramSearchPath` to describe correctly what that function does. Fixes haskell#9756
We must consider the path to the installed build-tool before the path to existing versions of the build tool in paths such as `extra-prog-path` or in the system path. This was previously fixed by haskell#8972 but undone by haskell#9527. This also renames `appendProgramSearchPath` to `prependProgramSearchPath` to describe correctly what that function does. Fixes haskell#9756
We must consider the path to the installed build-tool before the path to existing versions of the build tool in paths such as `extra-prog-path` or in the system path. This was previously fixed by haskell#8972 but undone by haskell#9527. This also renames `appendProgramSearchPath` to `prependProgramSearchPath` to describe correctly what that function does. Fixes haskell#9756
We must consider the path to the installed build-tool before the path to existing versions of the build tool in paths such as `extra-prog-path` or in the system path. This was previously fixed by haskell#8972 but undone by haskell#9527. This also renames `appendProgramSearchPath` to `prependProgramSearchPath` to describe correctly what that function does. Fixes haskell#9756
We must consider the path to the installed build-tool before the path to existing versions of the build tool in paths such as `extra-prog-path` or in the system path. This was previously fixed by haskell#8972 but undone by haskell#9527. This also renames `appendProgramSearchPath` to `prependProgramSearchPath` to describe correctly what that function does. Fixes haskell#9756
We must consider the path to the installed build-tool before the path to existing versions of the build tool in paths such as `extra-prog-path` or in the system path. This was previously fixed by #8972 but undone by #9527. This also renames `appendProgramSearchPath` to `prependProgramSearchPath` to describe correctly what that function does. Fixes #9756 (cherry picked from commit 84c30c2)
We must consider the path to the installed build-tool before the path to existing versions of the build tool in paths such as `extra-prog-path` or in the system path. This was previously fixed by haskell#8972 but undone by haskell#9527. This also renames `appendProgramSearchPath` to `prependProgramSearchPath` to describe correctly what that function does. Fixes haskell#9756
Resolves #8951 and modifies #8506 in the process. This is very subtle stuff and definitely needs a regression test added as well.