Bug 11160 - Now missing(?) copy of diagnostic file when there is an error?
Summary: Now missing(?) copy of diagnostic file when there is an error?
Status: CLOSED INVALID
Alias: None
Product: ccache
Classification: Unclassified
Component: ccache (show other bugs)
Version: dev
Hardware: All All
: P5 normal
Target Milestone: ---
Assignee: Joel Rosdahl
QA Contact: Joel Rosdahl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-11 16:12 UTC by ishikawa
Modified: 2015-03-18 22:22 UTC (History)
0 users

See Also:


Attachments
Missing copy of diagnostics file in case of compilation failure (1.53 KB, patch)
2015-03-11 16:12 UTC, ishikawa
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description ishikawa 2015-03-11 16:12:08 UTC
Created attachment 10861 [details]
Missing copy of diagnostics file in case of compilation failure

CAVEAT: The uploaded patch was created during the work to support
-gsplit-dwarf (FissionDwarf) of GCC.  (See bug 10005 )
Some of the patches have interdependence and if earlier patches are
not applied, the later ones may fail. I will re-create patches
appropriately depending on how an earlier patch is incorporated (or
dropped).

The whole list of broken patches below were uploaded in bug 10005 for
convenience, but now separate bugzilla is filed to follow up on each of it
(except for the main -gsplit-dwarf support, in bug 10005).

 0001-Harden-logging-perror-replaced-with-cc_log-and-fatal.patch
 0002-hash-file-creation-failure-is-recorded-now.patch
 0003-Use-x_unlink-instead-of-unlink-per-HACKING.txt.patch
 0004-make-sure-the-result-of-stat-call-is-checked.patch
 0005-Enhance-log-message-add-prefix-var.-name-and-a-few-a.patch
 0006-warning-about-missing-x_unlinks-when-get_file_from_c.patch
 0007-Support-for-gsplit-dwarf.patch
*0008-Missing-copy-of-diagnostics-file-in-case-of-failure.patch

What this entry is about:

Short explanation.

8: 0008-Missing-copy-of-diagnostics-file-in-case-of-failure.patch

   During the development of the support for -gsplit-dwarf, I noticed
   that when an error occurs, a premature exit path is taken, but
   maybe we might want to copy the temporary diagnostic (*_dia) file
   so that it is stored permanently somewhere.

   I tried to do something to this effect, but then the change of 
   default behavior of ccache to produce output in the final
   destination first (and then copy them back to cache destination)
   may have unnecessitated this change.

   But I am not so sure.

   So to alert the developers (and myself) about this, I inserted a
   comment to this effect.

   If people are sure that this is no longer necessary, this patch can
   be dropped.

   This is actually not related to -gsplit-dwarf and so I am filing
   this separate bugzilla.

TIA
Comment 1 Joel Rosdahl 2015-03-16 21:58:43 UTC
No, there's no need (and not possible) to copy a .dia file from the cache when the compiler fails since (as you mention) ccache nowadays writes files to the final destination first.
Comment 2 ishikawa 2015-03-17 06:35:18 UTC
(In reply to Joel Rosdahl from comment #1)

Thank you for the confirmation of my suspicion.
So this patch can go.

TIA