Open martinvonwittich opened 1 year ago
Thanks for the report. I suspect you're right. I wonder whether I thought the warning was sufficiently important to show it anyway. And I really don't want to go down the -really-silent path...
I've definitely tripped on this... I kinda guessed that was the reason (but didn't look for this ticket) at the time...
If it's relatively safe, I'd probably favor a "log" file (in the same directory as the coverage database) that lists each time coverage is deleted for a file... That'd leave the information available, but not surface it (thus avoiding breaking tests, while enabling people to debug broken programs/tests).
Devel::Cover has a silent option that is enabled by default when enabling Devel::Cover via PERL5OPT:
https://metacpan.org/pod/Devel::Cover
Contrary to my expectations, this doesn't suppress the "Deleting old coverage for changed file" message whenever I change my code without manually deleting the old coverage data, which causes spurious test breakage because my tests check the STDERR output of my program:
I've tracked this warning down to https://github.com/pjcj/Devel--Cover/blob/82526a3d8b9886ec579896311e66f4556a3b41cd/lib/Devel/Cover/DB/Structure.pm#L306-L307
This warning should probably honor
$Devel::Cover::Silent
.