Check-in [c0f0b90c04]

Not logged in
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to tclconference@googlegroups.com
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Added `kt::local*`, a variant of `kt::local` which does not forget the package and force a re-load.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:c0f0b90c04f58e092406b23b7b45096ee5ed142f
User & Date: aku 2017-10-04 23:28:40
Context
2017-10-05
06:28
Show extended stack traces when `kt::local` and sibling run into trouble. check-in: 273c213e57 user: aku tags: trunk
2017-10-04
23:28
Added `kt::local*`, a variant of `kt::local` which does not forget the package and force a re-load. check-in: c0f0b90c04 user: aku tags: trunk
19:12
Fix to scanning of files. Do not scan beyond a ^Z eof marker. I.e. do not scan the assets a file may have attached to their end. check-in: c629207a79 user: aku tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to testutilities.tcl.

64
65
66
67
68
69
70






















71
72
73
74
75
76
77
    # functionality.

    set saved [package unknown]
    try {
	package unknown ::kt::PU
	package forget  $name
	package require $name {*}$args






















    } on error {e o} {
	puts "    Aborting the tests found in \"[file tail [info script]]\""
	puts "    Required local package $name not found: $e"
	return -code return
    } finally {
	package unknown $saved
    }







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
    # functionality.

    set saved [package unknown]
    try {
	package unknown ::kt::PU
	package forget  $name
	package require $name {*}$args
    } on error {e o} {
	puts "    Aborting the tests found in \"[file tail [info script]]\""
	puts "    Required local package $name not found: $e"
	return -code return
    } finally {
	package unknown $saved
    }

    puts "LOCAL  [dict get $tag $type] $name [package present $name]"
    return
}

proc ::kt::local* {type name args} {
    variable tag
    # Specialized package require. Its search is restricted to the
    # local installation, via a custom unknown handler temporarily
    # replacing the regular functionality.

    set saved [package unknown]
    try {
	package unknown ::kt::PU
	package require $name {*}$args
    } on error {e o} {
	puts "    Aborting the tests found in \"[file tail [info script]]\""
	puts "    Required local package $name not found: $e"
	return -code return
    } finally {
	package unknown $saved
    }