cabal icon indicating copy to clipboard operation
cabal copied to clipboard

Draft: Add support for building profiled dynamic way

Open mpickering opened this issue 1 year ago • 2 comments

Draft: here for CI at the moment

mpickering avatar Apr 17 '24 10:04 mpickering

I require the version to be bumped to 3.13 before this can be finished.

mpickering avatar Apr 18 '24 10:04 mpickering

That's

  • #9897

ulysses4ever avatar Apr 19 '24 14:04 ulysses4ever

The test fails on 8.6.5 because of this GHC bug (fixed in 2018): e400b9babdcf11669f963aeec20078fe7ccfca0d

mpickering avatar May 29 '24 09:05 mpickering

Can someone please review this patch? I would like to get it off my plate as I have been working on it for quite a while.

mpickering avatar Jun 12 '24 14:06 mpickering

I made two recent improvements.

  • Better handling of -dynamic-too
  • Enforce that Cabal >3.13 constraint applies to all setups if profiling dynamic is used anywhere (this is conservative).

mpickering avatar Jun 18 '24 11:06 mpickering

I feel the code to handle "way" keeps getting more and more complex. Is there any way we can reduce this complexity?

E.g. do we really need to know what GHC support in what situation? can we instead just do what the user wants and leave GHC to deal with it? Otherwise we end up replicating a bunch of logic that belongs to the compiler.

Is there a particular bit of code which you find too complicated? I have just extended how cabal-install has already worked in relation to ways (and actually simplified a lot of the calculations about which ways are built and needed).

I have fixed the issue now about the cabal spec version, that is a good point.

mpickering avatar Jun 19 '24 08:06 mpickering

@andreabedini: was your concern answered satisfactorily? If so, could you mark it in the system so that mergify knows to proceed? Thank you!

Mikolaj avatar Jun 24 '24 08:06 Mikolaj

@Mikolaj My comment about the complexity was not essential to the request for changes. My only request was to guard the fields behind cabalSpecVersion, which has been acted upon. Thanks @mpickering.

andreabedini avatar Jun 25 '24 02:06 andreabedini