TRACE inconsistently prints package prefixes

Bug #1856768 reported by Paul F. Dietz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
New
Undecided
Unassigned

Bug Description

* (defpackage :foo (:use :cl))
#<PACKAGE "FOO">
* (in-package :foo)
#<PACKAGE "FOO">
* (defun bar (&rest args) args)
BAR
* (bar 'a 'b 'c)
(A B C)
* (trace bar)
(BAR)
* (bar 'a 'b 'c)
  0: (FOO::BAR FOO::A FOO::B FOO::C)
  0: BAR returned (A B C)
(A B C)

Why is the traced function being printed with FOO:: prefixes on symbols in the call? This becomes seriously annoying when tracing a function in a package with a large name. The package prefixes aren't showing up in the return trace output either.

Revision history for this message
Attila Lendvai (attila-lendvai) wrote :

my two cents: what is even more annoying is when you have a complex system that loads/creates a large number of packages, and the trace output is a function of which symbols the current *package* happens to have imported, and you fail to notice that one of the symbols are not what they seem to be.

this was by far the biggest single time-waster for me when debugging common lisp.

Revision history for this message
Douglas Katzman (dougk) wrote :

It seems like OP is saying not to show package qualifiers in the traced call but comment #1 is saying the exact opposite? This just proves that there is not a 1-size-fits-all solution.

Once upon a time I had the idea to use a property on the symbol naming the traced function as a description of how to show its input and output. It might have been as simple as an overriding format string used in lieu of the default.
Other proposals for how to specify display of traced args/returns are welcome.

Revision history for this message
Stas Boukarev (stassats) wrote :

I sometimes want to see package prefixes, and sometimes don't want to, when there's a lot of output.
TRACE already has options, maybe add one for printing symbols?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.