|
From: Donald G P. <don...@ni...> - 2017-09-18 14:03:33
|
On 09/17/2017 11:32 PM, Andy Goth wrote: > Please review the amg-string-insert branch. ... > The real reason I'm adding [string insert] is as a learning exercise. I'm happy you're going through this exercise, getting experience on making improvements and getting access to the various systems. This is going to be valuable. On the actual proposed [string insert] command, there is one clear alternative that I like better. Make an incompatible revision to the [string replace] command so that it stops refusing to replace empty strings. Make that change and you no longer need a [string insert]. And if you just like the name, you could build it on top of a [string replace] with proper capabilities. We approved exactly this as part of TIP 323 "Do Nothing Gracefully" but then after implementation, the incompatibility was found to actually break something somewhere out there. The change was reverted to be re-considered later. Some damn fool neglected to actually write down what package or app it was out there that demands [string replace] refuse to replace empty strings. It would be helpful to recover that information to know how best to proceed. > It appears bytecoding has changed since the creation of stringComp.test. I believe the reliable way to exercise direct evaluation pathways is to use the [testevalex] command. See for example how the [run] alias is redirected in basic.test. > I also created an amg-string-insert branch in the [incr Tcl] repository > to contain the necessary updates to its test suite. Otherwise adding a > [string insert] command causes several of its tests to fail. Thank you! for actually checking how a change influences bundled packages. That said, the better fix is to get the Itcl test suite out of the business of checking literal Tcl error messages. That's an encapsulation mistake. Don't make Itcl start demanding to see "insert" in the error message (it will start failing when built against Tcl 8.6), but make the test stop caring about parts of the error messages that are outside Itcl control and are not part of the functioning under test. -- | Don Porter Applied and Computational Mathematics Division | | don...@ni... Information Technology Laboratory | | http://math.nist.gov/~DPorter/ NIST | |______________________________________________________________________| |