Overview
| Artifact ID: | 2cde84d51270e1488e574c169eaf8db0c9f0b79c |
|---|---|
| Ticket: | 573338ffffffffffffffffffffffffffffffffff
incomplete compatibility in tcltest 2.1 (TIP 101) |
| User & Date: | dgp on 2002-06-24 21:42:08 |
Changes
- assignee changed to: "dgp"
- cmimetype changed to: "text/plain"
- comment changed to:
The changes approved in TIP 101 included a promise of compatibility. The actual implementation falls just slightly short of the mark. It is intended that when any tcltest operation that could be influenced by configuration from the command line occurs, then tcltest is auto-configured from ::argv as it always has been. Users wishing to use [tcltest::configure] to control their own configuration need to call it after [package require tcltest 2.1] and before any other tcltest commands (all of them are likely to auto-configure, because they all change behavior based on the -debug option) or reading any tcltest::* variables directly. This in fact does work, but it is set up with variable traces, which leads to its own problems. Because traces are disabled while traces are serviced, the auto-configuration can't completely work when triggered by access to variables that need further traces to complete their configuration. More specifically, if the first tcltest operation following a [package require tcltest] is a read of any of the following variables: tcltest::loadFile tcltest::outputFile tcltest::errorFile either directly, or through the corresponding commands: [tcltest::loadFile] [tcltest::outputFile] [tcltest::errorFile] then the auto-configuration from the command line arguments will not be correct for the corresponding option, if it appears on the command line, because these options need enabled trace to complete their configuration. For example, if a test file starts: package require tcltest puts "writing to [tcltest::outputFile]" then the "-outfile" option will not work properly on that test file. The fix is to insert some other operation before that one; or to require 2.1, and call configure yourself. package require tcltest set dummy [tcltest::debug] puts "writing to [tcltest::outputFile]" OR package require tcltest 2.1 eval tcltest::configure $argv puts "writing to [tcltest::outputFile" Given these workarounds, and the expected rarity of these very particular test file configurations, this bug will not be fixed. Most files will have compatibility serviced fine, but these rare cases will just have to deal with it. - foundin changed to: "obsolete: 8.4a5"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "dgp"
- subsystem changed to: "34. tcltest Package"
- title changed to: "incomplete compatibility in tcltest 2.1"
- type changed to: "Bug"