Control expensive assertions in cabal-install with a build flag.
I added a function, 'debugAssert', that wraps 'assert' and only calls it when the build flag 'debug-assertions' is enabled. The flag defaults to false. I only replaced one call to 'assert' so far (in Distribution.Solver.Modular.Linking) in order to resolve #4258.
Showing
- cabal-install/Distribution/Client/Utils/Assertion.hs 16 additions, 0 deletionscabal-install/Distribution/Client/Utils/Assertion.hs
- cabal-install/Distribution/Solver/Modular/Linking.hs 2 additions, 1 deletioncabal-install/Distribution/Solver/Modular/Linking.hs
- cabal-install/cabal-install.cabal 12 additions, 0 deletionscabal-install/cabal-install.cabal
Please register or sign in to comment