lsort -integer fails when trying to sort a list of wide integers (i.e. a list with timestamps, like clock milliseconds returns).
I see for example in Tcl_LsortObjCmd(), in file tclCmdIL.c, line 3911 (may have changed I haven't updated to fossil):
} else if (sortMode == SORTMODE_INTEGER) {
long a;
if (TclGetLongFromObj(sortInfo.interp, indexPtr, &a) != TCL_OK) {
sortInfo.resultCode = TCL_ERROR;
goto done1;
}
elementArray[i].index.intValue = a;
I think that Tcl_GetWideIntFromObj() should be called if Tcl_GetLongFromObj() fails, before returning an error to the caller...
This is not a bug. It's preservation of compatible output
from [lsort -integer] across minor releases.
That may be an unwise choice, but changing it is a
feature request.
See http://core.tcl.tk/tcl/info/cf82eb92c8
for a checkin implementing the requested
functionality as [lsort -entier].
Very much un(der)tested at this point, BTW.