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

Append paths in global config to progdb in configureCompiler #10790

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jasagredo
Copy link
Collaborator

@jasagredo jasagredo commented Feb 10, 2025

Closes #9800


Template Α: This PR modifies behaviour or interface

Include the following checklist in your PR:

Copy link
Member

@Mikolaj Mikolaj left a comment

Choose a reason for hiding this comment

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

Thank you! Would it be possible to add a test for this?

@mpickering
Copy link
Collaborator

Could you perhaps add a testcase? See the similar test I added in 2c19bf3

@jasagredo
Copy link
Collaborator Author

I think a test would be possible to add. I however don't have the time at the moment for doing cabal stuff in my free time.

@yutotakano
Copy link

yutotakano commented Feb 25, 2025

I feel like I can contribute the test case.

I just want some clarification from Cabal devs beforehand though: The ExtraProgPath test seems to cover this scenario already (a global/project-level pkg-config override). Indeed, that test fails on my Mac before the PR, and passes with this PR. Is this correct behaviour? It's apparently skipped in the CI since it depends on cabal-install. I just wanted to check with someone else since I found it weird that an existing test fails with existing code.

The modification I would make to the test case is to make it cover Windows as well, which should cover the specific case raised in #9800 and probably would close #6304.

@mpickering
Copy link
Collaborator

I think it probably isn't skipped on CI, it's probably one which you have to pass --with-cabal to. I will look at what the testcase does tomorrow to comment more precisely.

@jasagredo
Copy link
Collaborator Author

jasagredo commented Feb 26, 2025

If I recall correctly it is indeed skipped on CI on Windows because "Windows CI has no pkg-config". So probably if you make sure pkg-config is installed before starting the testsuite you might be able to not skip it and call it a day.

I do wonder why I chose to skip it always on Windows and not only on Windows+CI 🤔

@jasagredo
Copy link
Collaborator Author

jasagredo commented Feb 26, 2025

If you look at this CI run, https://github.com/haskell/cabal/actions/runs/13251642775/job/36994558671#step:17:1 for MacOS in a PR separate from this one, and search for "ExtraProgPath/" you will see it is mentioned twice.

The first time it is a Cabal-the-library testsuite so it is skipped, and the second time it is a cabal-the-tool (cabal-install) testsuite. The second time it is run and the test is successful.

What error does it show in your Mac?

(Note you can filter the tests run with -p "/ExtraProgPath/" iirc)

(Also many thanks for offering to add the test)

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.

cabal can not find pkg-config even though the right directory has been added to the extra-prog-path
4 participants