Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2004-11-01
04:05 • Closed ticket [1026493fff]: interp alias and rename: confusing error message... artifact: 53f1d8946b user: dgp
2004-10-31
03:32 • Add attachment 1026493-8.4.patch to ticket [1026493fffffffff|1026493fff... artifact: 336a1b5f08 user: msofer
03:32 • Open ticket [1026493fff]: interp alias and rename: confusing error messages<... artifact: 99424a547b user: msofer
2004-10-27
00:44 • Ticket [1026493fff]: 5 changes artifact: 8228c2f109 user: dgp
2004-09-15
00:47 • Closed ticket [1026493fff]. artifact: 28f99eef34 user: msofer
2004-09-12
09:06 • Ticket [1026493fff]: 4 changes artifact: 3737eb111b user: msofer
05:27 • Ticket [1026493fff]: 4 changes artifact: 42c340e099 user: msofer
2004-09-11
22:08 • New ticket [1026493fff]. artifact: 4401faa4db user: msofer

[interp alias] and [rename]: confusing error messages

Closed / Fixed1026493fffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 22 years ago
Descriptionplain2004-09-11 22:08:54
% interp alias {} a {} b
a
% rename a c
% rename c b
cannot define or rename alias "a": would create a loop

This is related to Bug #707104, and the confusion
between tokens and command names.
msoferplain2004-09-12 05:27:27
Logged In: YES 
user_id=148712

It is relatively simple to make it so that the error message
becomes
  cannot define or rename alias to "b": would create a loop
by replacing 'aliasPtr->name' with
'Tcl_GetCommandName(cmdInterp, cmd)' in two error messages
in the function TclPreventAliasLoop().

It seems rather more involved to obtain
  cannot define or rename alias "c": would create a loop
msoferplain2004-09-12 09:06:45
Logged In: YES 
user_id=148712

This bug is fixed by the patch 707104.patch2 attached to bug
707104.
msoferplain2004-09-15 00:47:13
Logged In: YES 
user_id=148712

Patch to 707104 committed, this is fixed.
dgpplain2004-10-27 00:44:21
Logged In: YES 
user_id=80530

consider a backport for 8.4.8
msoferplain2004-10-31 03:32:13
File Added - 107063: 1026493-8.4.patch

Logged In: YES 
user_id=148712

Not sure about backporting: the fix of [Bug 707104] in HEAD
changes the behaviour of aliases, and requires doc changes
too. IMHO, not to be done in the stable branch.

OTOH, a partial fix of the error message only is feasible
(patch attached, not committed). But it does require
changing tests interp-17.4-5. Isn't such a thing a no-no for
the stable branch? 

As this particular bug is relatively harmless ... your call.
dgpplain2004-11-01 04:05:57
Logged In: YES 
user_id=80530

if there's any doubt, then skip it.
Just wanted to be sure it was considered.
Log in (anonymous is fine) to add a comment.

Attachments: