Tcl Library Source Code

View Ticket
Login
Ticket UUID: a0e091b25d27428a84e527006c87b87b89175596
Title: misformatted description in auto-generated help text
Type: Bug Version: 0.5
Submitter: anonymous Created on: 2016-02-29 05:51:47
Subsystem: tepam Assigned To: droll
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2016-03-05 07:58:45
Resolution: Fixed Closed By: droll
    Closed on: 2016-03-05 07:58:45
Description:
Below is a script that uses tepam to define a procedure with 5 sub-procedures.  When the -help flag is used to autogenerate a digest of the procedure, the sub-procedure names are not properly listed in the DESCRIPTION section of the help text. Note that "subproc5" is repeated as the name for each subproc.  The help digest text appears as:

NAME
      bug::tproc
SYNOPSIS
      bug::tproc subproc1
      bug::tproc subproc2
      bug::tproc subproc3
      bug::tproc subproc4
      bug::tproc subproc5
DESCRIPTION
      bug::tproc subproc5
         desc1.
      bug::tproc subproc5
         desc2.
      bug::tproc subproc5
         desc 3.
      bug::tproc subproc5
         desc 4.
      bug::tproc subproc5
         desc 5.

script:
##########

package require tepam 0.5

namespace eval ::bug {

tepam::procedure {tproc subproc1} {
	-description "desc1."
} {}

tepam::procedure {tproc subproc2} {
	-description "desc2."
} {}

tepam::procedure {tproc subproc3} {
	-description "desc 3."
} {}

tepam::procedure {tproc subproc4} {
	-description "desc 4."
} {}

tepam::procedure {tproc subproc5} {
	-description "desc 5."
} {}

}

##########
User Comments: droll added on 2016-03-05 07:58:45:
The issue has been fixed with commit [5b9813887f]. The TEPAM version has been incremented to 0.5.1.

aku added on 2016-03-03 06:35:53:
Based on the size of the .tcl files, i.e.

   747 modules/tepam/tepam_doc_gen.tcl
  2762 modules/tepam/tepam.tcl

I deduce that this is applied to "tepam.tcl". Except, looking at the given lines the match does not look that good. On the third hand, both locations seem to be inside of proc ProcedureHelp, so that fits.

A unified diff (diff -u) might be a better choice of output for comment and attachment as that format for patches provides context, i.e. a few lines around the actual change, making matching easier, both for humans and the patch command.

droll added on 2016-03-02 21:38:20:
Good catch! The following patch for TEPAM 0.5 will correct the identified issue:

'''Patch Begin'''
1398a1399
>                   set PureProcName [PureProcName]
1412a1414
>                   set PureProcName [PureProcName]
'''Patch End'''

I will add a test to the regression environment and perform a few additional verification in the coming days before I submit the bug fix to the repository.

aku added on 2016-03-02 05:04:05:
Assigned to package author.

Attachments: