bugmake - Bugs: bug #38432, Optional parameter to tag all...

 
 

bug #38432: Optional parameter to tag all output lines with unique text to improve logging capabilities

Submitter:  Brian Vandenberg <phantal>
Submitted:  Wed 27 Feb 2013 07:13:05 PM UTC
   
 
Severity:  3 - Normal Item Group:  Build/Install
Status:  Duplicate Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Component Version:  3.82 Operating System:  None
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 16 Apr 2013 05:56:03 AM UTC, comment #2: 

I've applied the fix for bug #33138.  I'm closing this as a duplicate even though the solution there isn't exactly what was asked for here.  If you feel that solution isn't sufficient please add a comment with reasoning.

Paul D. Smith <psmith>
Group administrator
Thu 28 Feb 2013 03:25:22 AM UTC, comment #1: 

WIthout discussing the merits of this particular proposal I will simply point out that this is a frequently-solved problem, though nothing has yet entered the GNU Make code base. I believe there have been multiple patches offered and numerous email discussion threads. I've seen a prototype non-GNU-make-specific implementation offered in an Ask Mr Make article (I think) and I wrote my own enhancement of that at https://github.com/boyski/SYNCSH. There's an existing RFE  with patch (https://savannah.gnu.org/bugs/?33138), also mine, and I think there may be one or two competing patches in savannah too.

Bottom line, look into what's out there  already. You're standing on the shoulders of ... well, other programmers.

David Boyce <boyski>
Wed 27 Feb 2013 07:13:05 PM UTC, original submission:  

When building in parallel it can be rather difficult to pair up errors with the thing being built or the command executed that induced the error in the first place.

The solution proposed here: tag all output text with something that makes it possible to group & re-order the output of make after-the-fact to clear things up.  For example:

  • Give each target a non-random numeric designation unique to the target (eg, a hash of the target name); for the sake of brevity I'll refer to this as a UUID in spite of the fact that typically refers to a very specific implementation/concept.
  • Prefix every line with a timestamp and a UUID.
  • Any output generated from inside a target (stdout/stderr, $(info), $(warning), $(error), etc) while evaluating the target uses the UUID for the target
  • Any output generated during the first pass when parsing, or otherwise generated outside a target uses a 'global' UUID.


Some possible issues:

  • What timestamp should be used?  Accurate to the moment the text was generated?  Accurate to the moment the recipe command was initiated?  One based on when the target's build was initiated (before any recipe lines are evaluated)? ...
  • How to handle sub-make processes ... they'd need to communicate with the top-tier processes and negogiate UUIDs in some fashion; however, there's a `configure` option to disable parent/child communication ... though I suppose in that case the parent could pass in a seed to sub-make processes.



Brian Vandenberg <phantal>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  • -email is unavailable- added by boyski (Posted a comment)
  • -email is unavailable- added by phantal (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-04-16 psmith StatusNone Duplicate
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code