Skip to content

backport: Find build-tool installed programs before programs in path #9767

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

Merged
merged 5 commits into from
Mar 11, 2024

Conversation

alt-romes
Copy link
Collaborator

A backport of 443c890 (#9762)

@alt-romes
Copy link
Collaborator Author

@gbaz here it is

@alt-romes alt-romes changed the title Find build-tool installed programs before programs in path (BP) backport: Find build-tool installed programs before programs in path Mar 1, 2024
@geekosaur
Copy link
Collaborator

@alt-romes
Copy link
Collaborator Author

@geekosaur any chance you could drive this to completion? I don’t know when I will be able to get back to this.

@geekosaur
Copy link
Collaborator

I can try. My availability can be spotty due to sensory overload issues. (This is also why I usually have the camera off during calls; I can't handle the light for long.)

@geekosaur
Copy link
Collaborator

So somehow this breaks cabal-testsuite/PackageTests/PkgConfigParse, which can't find its replacement pkg-config any more. I'm lost as to why; the code seems correct to me.

@geekosaur
Copy link
Collaborator

Also, testing with a newer Cabal causes other test failures, which I presume are related to #9671 not being backported.

@Mikolaj
Copy link
Member

Mikolaj commented Mar 4, 2024

@Kleidukos, @gbaz, IIRC you advocated for squeezing this PR into 3.10.3. Given that the fix is more troublesome than we expected, shall we pass in the interest of shipping 3.10.3 ASAP?

@gbaz
Copy link
Collaborator

gbaz commented Mar 5, 2024

After some investigation, I think we should close. if @andreasabel feels otherwise, please speak up. But there's something subtle going on that involves other changes as well, and I we could get more regressions if we port this back without figuring out exactly how everything interacts.

@gbaz gbaz closed this Mar 5, 2024
@andreasabel
Copy link
Member

It is not a new regression, it is already there in 3.10.1, so it is not a blocker for 3.10.3. However, it would be good to fix it in 3.10 eventually. Maybe 3.10.4 then?

@andreasabel andreasabel added regression in 3.10 re: extra-prog-path Concerning the `extra-prog-path` configuration option labels Mar 5, 2024
@gbaz
Copy link
Collaborator

gbaz commented Mar 5, 2024

alright, let me reopen. i'm just.. not sure exactly what's happening is all. and not sure how much we can dig in.

What's supposed to happen is we get [Default-Path, extra-lib-path], and that is indeed what's happening here. So in a sense the mystery is why it works on HEAD...

@gbaz gbaz reopened this Mar 5, 2024
@gbaz
Copy link
Collaborator

gbaz commented Mar 5, 2024

Ah, so on HEAD the default path itself is also extended by extra-lib-dirs, which means that the extra-lib-dirs appear three times in the build -- twice from the inclusion of default-path before and after the explicit extra-lib-dirs and once in the middle. You might say "this is absurd" and it is, but this is sort of necessary because we need the Configure.hs file to work with v1-build as well, in which case we don't have any extensions to the default path.

So we need to backport whatever is necessary to fix this, as well...

@gbaz
Copy link
Collaborator

gbaz commented Mar 6, 2024

ok i think I figured it out. #8972 was never backported at all, and that contained the additional necessary fix I was looking for.

@Mikolaj
Copy link
Member

Mikolaj commented Mar 6, 2024

@alt-romes, @geekosaur: could you have a look (ideally, review) now that Gershom cracked the nut?

@alt-romes
Copy link
Collaborator Author

Thanks @gbaz, this looks good. Glad you spotted it.

@alt-romes
Copy link
Collaborator Author

alt-romes commented Mar 6, 2024

GH does not allow me to approve the pull request because I opened it

Copy link
Collaborator

@geekosaur geekosaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strictly speaking, I probably shouldn't be reviewing because I worked on it.

@gbaz gbaz added the squash+merge me Tell Mergify Bot to squash-merge label Mar 6, 2024
@alt-romes alt-romes self-assigned this Mar 7, 2024
@mergify mergify bot added the merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days label Mar 9, 2024
@Kleidukos
Copy link
Member

Looks like mergify didn't pick this one up. I am merging.

@Kleidukos Kleidukos merged commit ce72f63 into haskell:3.10 Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days re: extra-prog-path Concerning the `extra-prog-path` configuration option regression in 3.10 squash+merge me Tell Mergify Bot to squash-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants