You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Warning: "debug build with assertions" interferes with --numeric-version #8645
I suppose normal verbosity is needed to help people avoid surprises. However, -v0 should work, so it's worth investigating. Also, I think there is a ticket about printing warnings (and errors?) to stderr.
I suppose normal verbosity is needed to help people avoid surprises.
Why do we need this warning preemptively at all? Couldn't we just add it as explanation if an actual assertion is thrown? In >99% of my invocations of cabal, this message is just spamming me.
I'd think the best path of action here (if we want to avoid the thickets of stdout vs stderr) is to remove the warning and only utter it when an assertion failed.
Ok, to not start a revolution, I submitted a modest PR that shifts the warning to stderr and restricts it to normal operation of cabal, i.e. not in special commands such as help and version:
Just as a historical note, there was certainly a case I found at some point where we were shipping binaries that accidentally had assertions on, leading to vastly decreased solver performance. I think having some warning in at least some cases is a good guard against this.
Digging the history I saw that once this warning had some text about decreased performance. Do you know why this part was dropped?
Which warning mentioned decreased performance? Are you referring to the expensive assertions mentioned in #8240? They were only enabled with a custom build flag, so they were not easy to enable unintentionally.
Activity
Mikolaj commentedon Dec 29, 2022
I suppose normal verbosity is needed to help people avoid surprises. However,
-v0should work, so it's worth investigating. Also, I think there is a ticket about printing warnings (and errors?) to stderr.andreasabel commentedon Dec 30, 2022
We have:
cabal runshould send info logging to stderr not stdout #7790This topic has a history...
Why do we need this warning preemptively at all? Couldn't we just add it as explanation if an actual assertion is thrown? In >99% of my invocations of
cabal, this message is just spamming me.I'd think the best path of action here (if we want to avoid the thickets of stdout vs stderr) is to remove the warning and only utter it when an assertion failed.
Mikolaj commentedon Dec 30, 2022
Some history:
andreasabel commentedon Dec 30, 2022
Ok, to not start a revolution, I submitted a modest PR that shifts the warning to
stderrand restricts it to normal operation ofcabal, i.e. not in special commands such ashelpandversion:ulysses4ever commentedon Dec 30, 2022
I like the idea of printing it only when an assertion actually fails.
sebright commentedon Jan 4, 2023
I think that the main purpose of the warning is to warn about decreased performance.
Fix #8645: no assertion warning on special modes (help, version, etc.) (
andreasabel commentedon Jan 6, 2023
@GrayJay wrote:
Digging the history I saw that once this warning had some text about decreased performance. Do you know why this part was dropped?
gbaz commentedon Jan 6, 2023
Just as a historical note, there was certainly a case I found at some point where we were shipping binaries that accidentally had assertions on, leading to vastly decreased solver performance. I think having some warning in at least some cases is a good guard against this.
sebright commentedon Jan 6, 2023
Which warning mentioned decreased performance? Are you referring to the expensive assertions mentioned in #8240? They were only enabled with a custom build flag, so they were not easy to enable unintentionally.
andreasabel commentedon Jan 6, 2023
@GrayJay: Ah, it was in a PR that didn't get merged as such: