Opened 2 months ago

Closed 4 weeks ago

#1505 closed defect (fixed)

Trace output is messy for eggs

Reported by: sjamaan Owned by:
Priority: not urgent at all Milestone: 5.0
Component: extensions Version: 5.0.0rc2
Keywords: trace output, messy Cc:
Estimated difficulty: medium

Description

Trace output (and, by extension, profiler output) is quite messy for the parts that are compiled from eggs.

Trivial example:

(import intarweb)

(headers 'fail)

Results in:

Error: bad argument type - not a list: fail

        Call history:

        /home/sjamaan/src/intarweb/intarweb.scm:652: chicken.base#make-parameter          
        /home/sjamaan/src/intarweb/intarweb.scm:671: chicken.base#make-parameter          
        /home/sjamaan/src/intarweb/intarweb.scm:786: chicken.base#make-parameter          
        /home/sjamaan/src/intarweb/intarweb.scm:864: chicken.base#make-parameter          
        /home/sjamaan/src/intarweb/intarweb.scm:959: chicken.base#make-parameter          
        /home/sjamaan/src/intarweb/intarweb.scm:987: chicken.irregex#irregex      
        /home/sjamaan/src/intarweb/intarweb.scm:1010: chicken.irregex#irregex     
        /home/sjamaan/src/intarweb/intarweb.scm:1043: chicken.base#make-parameter         
        test.scm:2: intarweb#headers      
        ##sys#dynamic-wind        
        ##sys#profile-entry       
        /home/sjamaan/src/intarweb/intarweb.scm:236: make-headers         
        ##sys#dynamic-wind        
        ##sys#profile-entry       
        ##sys#profile-exit        
        /home/sjamaan/src/intarweb/intarweb.scm:237: srfi-1#fold                <--

This is caused by the full pathname that's in the build script emitted by chicken-install. I'm not sure how to best fix this (or if it's even worth fixing?), but it looks messy and causes chicken-profile output to wrap columns in many cases.

Change History (5)

comment:1 Changed 6 weeks ago by felix

I don't see the point. A relative pathname is of little use. An absolute pathname can at least be accessed for eggs under development as a direct pointer to the relevant sources. If you want clean output, you might as well drop pathnames completely.

comment:2 follow-up: Changed 6 weeks ago by sjamaan

The output of chicken-profile goes beyond 80 columns, resulting in hard to read output unless I fullscreen the terminal window.

In CHICKEN 4, it used the pathname relative to the build directory of the egg. In CHICKEN 5, the same is true for all user code (and CHICKEN core too, if built with debug info, as you can see in the sample output above), but traces of procedures in eggs contain absolute pathnames. This is not very useful and actively annoying: I really don't care where an egg was compiled (and certainly not the full path).

In the output you also see the module name (because it's fully qualified), which is enough information for me when I'm profiling my code.

I don't see why a relative pathname would be of little use: the place where an egg is installed from is irrelevant, the only thing that matters is where in the egg that file exists. The full path to the chicken-install cache directory or the place where I happened to have the egg checked out doesn't tell me anything.

comment:3 in reply to: ↑ 2 Changed 6 weeks ago by felix

Replying to sjamaan:

The output of chicken-profile goes beyond 80 columns, resulting in hard to read output unless I fullscreen the terminal window.

That depends on your font- and terminal settings and shouldn't be the case for everybody.
But if this is a problem with chicken-profile, it can be addressed there.

In CHICKEN 4, it used the pathname relative to the build directory of the egg. In CHICKEN 5, the same is true for all user code (and CHICKEN core too, if built with debug info, as you can see in the sample output above), but traces of procedures in eggs contain absolute pathnames. This is not very useful and actively annoying: I really don't care where an egg was compiled (and certainly not the full path).

Ok, you don't care. I understand.

I don't see why a relative pathname would be of little use: the place where an egg is installed from is irrelevant, the only thing that matters is where in the egg that file exists. The full path to the chicken-install cache directory or the place where I happened to have the egg checked out doesn't tell me anything.

Acme users, for example, can directly jump to the source-file + location, because the information is canonical.

comment:4 Changed 4 weeks ago by sjamaan

  • Milestone changed from 5.1 to 5.0
  • Version changed from 5.0 to 5.0.0rc2

Looks like Evan was able to convince you this is useful after all :)

Moving it to milestone to match release

comment:5 Changed 4 weeks ago by sjamaan

  • Resolution set to fixed
  • Status changed from new to closed

Fixed with 6ab2304d43c609b76d8f3efbb9042a517c80ec51

Note: See TracTickets for help on using tickets.