Summary

Trace output is messy for eggs

Metadata

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.

Changes and comments

[2018-09-09 09:27:44 UTC] felix wrote:

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.

[2018-09-09 12:04:47 UTC] sjamaan wrote:

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.

[2018-09-09 14:46:08 UTC] felix wrote:

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.

[2018-09-23 10:56:08 UTC] sjamaan changed version from 5.0 to 5.0.0rc2

[2018-09-23 10:56:08 UTC] sjamaan changed milestone from 5.1 to 5.0

[2018-09-23 10:56:08 UTC] sjamaan wrote:

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

Moving it to milestone to match release

[2018-09-23 11:26:46 UTC] sjamaan changed status from new to closed

[2018-09-23 11:26:46 UTC] sjamaan set resolution to fixed

[2018-09-23 11:26:46 UTC] sjamaan wrote:

Fixed with 6ab2304d43c609b76d8f3efbb9042a517c80ec51