cabal icon indicating copy to clipboard operation
cabal copied to clipboard

Add gcc path

Open zlonast opened this issue 5 months ago • 9 comments

Template B: This PR does not modify behaviour or interface

E.g. the PR only touches documentation or tests, does refactorings, etc.

show-build-info with -pgmc gives new output on each platform https://github.com/haskell/cabal/pull/10969#issuecomment-2952148207

Include the following checklist in your PR:

  • [ ] Patches conform to the coding conventions.
  • [X] Is this a PR that fixes CI? If so, it will need to be backported to older cabal release branches (ask maintainers for directions).

zlonast avatar Aug 25 '25 19:08 zlonast

Can you please write a quick (but legible) self-contained explanation of why we want this?

ulysses4ever avatar Aug 25 '25 23:08 ulysses4ever

@ulysses4ever philosophically I'm trying to convince myself to write a few dozen link tests 😅

the real problem is that when adding -pgm* flags we need to write at least 5(10) tests instead of one because the output contains the path to the C compiler

example from the pull request I'm referring to:

  1. no -pgmc single-2.out single-2.test.hs
  2. gcc is /usr/bin/gcc single.out single.test.hs
  3. clang is /tools/ghc-<GHCVER>/lib/../mingw/bin/clang win-single-4.out win-single-4.test.hs
  4. clang is /ghcup/ghc/<GHCVER>/lib/../mingw/bin/clang win-single-8-6.out win-single-8-6.test.hs
  5. clang is /ghcup/ghc/<GHCVER>/lib/../mingw//bin/clang win-single.out win-single.test.hs

zlonast avatar Aug 26 '25 10:08 zlonast

That sounds more like a bug / deficiency in the normalizer to me.

geekosaur avatar Aug 26 '25 15:08 geekosaur

That sounds more like a bug / deficiency in the normalizer to me.

What is a normalizer?

zlonast avatar Aug 26 '25 15:08 zlonast

It's a postprocessor for test output that produces those <UPPERCASE> things in place of mutable paths. https://github.com/haskell/cabal/blob/master/cabal-testsuite/src/Test/Cabal/OutputNormalizer.hs

geekosaur avatar Aug 26 '25 16:08 geekosaur

@zlonast: any progress? could we help?

Mikolaj avatar Nov 14 '25 20:11 Mikolaj

@zlonast: a kind ping?

Mikolaj avatar Dec 04 '25 18:12 Mikolaj

@Mikolaj Hi, sorry for not answering, I don't have time to continue here yet.

zlonast avatar Dec 05 '25 02:12 zlonast

No worries, take care!

Mikolaj avatar Dec 05 '25 12:12 Mikolaj