We are pleased to announce the availability of the Next Scripting
Framework (NSF) 2.5.0, including NX 2.5.0 and XOTcl 2.5.0. This
release completes the Tcl 9 compatibility work for the Tcl 9.0 and 9.1
series while retaining support for Tcl 8.5 and 8.6 on Linux, Windows,
and macOS. Highlights include return-value checking for nsf::proc, introspection of constant object variables, improved argument
validation, and fixes for method dispatch, memory management, and
interpreter shutdown. The MongoDB binding has also been updated for
Tcl 9.
Special thanks are due to the following adopters and supporters (in alphabetical order): Oleg Checkulaev, Jan Nijtmans, Antonio Pisano,
H|-ctor Romojaro, and Maksym Zinchenko.
With this release, NSF and its predecessors have been available and
supported for more than 27 years. In May 1999, the first paper on
XOTcl was presented at the 5th USENIX Conference on Object-Oriented Technologies and Systems (COOTS '99):
-a Gustaf Neumann & Uwe Zdun: Filters as a Language Support for Design
-a Patterns in Object-Oriented Scripting Languages, in: Proc. of
-a COOTS'99, San Diego, California, USA, May, 1999, URL:
https://www.usenix.org/legacy/events/coots99/full_papers/neumann/ neumann.pdf
The work leading to this release was presented at the 10th OpenACS
conference and the 22nd European Tcl/Tk Users Meeting in July 2026 in
Vienna, Austria:
-ahttps://openacs.km.at/evaluate/org/129998253/conferencenews/
Diff stats since 2.4.0:
-a130 files changed, 9157 insertions(+), 6217 deletions(-)
The main changes are:
- Tcl 9.1 compatibility (stubs and TIP 626/627 Command layout): Tcl 9.1
-aremoved the legacy objProc/objClientData fields from the Command
-astruct, replacing them with objProc2/objClientData2. NSF added a set
-aof version-neutral accessor macros (TCL_COMMAND_OBJPROC, etc.) and
-asupporting CPP machinery. Stub headers and stub vector
-ainitialisation for 9.1 were also added.
-aBinary compatibility: NSF uses internal Tcl interfaces and data
-astructures that changed between Tcl 9.0 and 9.1. Separate NSF builds
-aare therefore required for Tcl 9.0 and Tcl 9.1. When distributing
-abinaries, provide builds for the Tcl versions you support.
-aBackground:
-a-a-a https://core.tcl-lang.org/tips/doc/trunk/tip/626.md
-a-a-a https://core.tcl-lang.org/tips/doc/trunk/tip/627.md
- Tcl 9 size-type support: Updated collection lengths, indexes,
-aargument counts, and related formatting to use Tcl_Size-compatible
-atypes and APIs throughout the NSF core. These changes address
-aremaining assumptions about int-sized values while preserving
-acompatibility with Tcl 8.
-aBackground:
-a-a-a https://core.tcl-lang.org/tips/doc/trunk/tip/494.md
-a-a-a https://core.tcl-lang.org/tips/doc/trunk/tip/660.md
- Method dispatch: Fixed a crash and missing error reporting when a
-anonexistent method is called and all registered filter guards reject
-aexecution. Such calls now follow the unknown-method dispatch path.
- Hashtable-lookup version-agnostic idiom: Introduced
-aNsfFindHashEntry() to do lookup-only access using Tcl_FindHashEntry
-aon 9.1+ instead of Tcl_CreateHashEntry(..., NULL), preventing
-aaccidental creation of empty command-table entries when using
-aTcl_CreateHashEntry() in modern Tcl (post TIP 626). Applied across
-amethod lookup, precedence lists, resolvers, filter/variable/forward
-alistings, etc.
- Scripting improvements:
-a* nx::Object "info consts" (nx.tcl): New introspection method that
-a-a lists only unmodifiable (constant) variables, similar to "info
-a-a vars" but restricted to constants created via the Tcl 9 "const"
-a-a command.-a The method accepts an optional pattern for filtering. On
-a-a Tcl 8, it returns an empty list.
-a* "nsf::proc" return-value checkers (nsf.c + tests): You can now
-a-a write "nsf::proc ... -returns <spec> ..." and introspect it
-a-a with "nsf::cmd::info returns". The underlying Tcl "string is" checker
-a-a was also fixed so it no longer clobbers the result when used as a
-a-a return-value checker (save/restore of the original result).
-a* "nsf::parseargs": Now enforces "required" flags when passed an
-a-a empty argument list, reporting missing required arguments.
-a* NX parameter validation: Malformed property and variable
-a-a specifications, such as ":property {fiscalyear:integer,
-a-a required}", now produce an explicit error.
-a* "nsf::parseargs": Better error handling for malformed parameter
-a-a specs. Stray spaces like in ":property {fiscalyear:integer,
-a-a required}" now raise a proper error.
-a* Script-level refinements to NX and XOTcl 2 object systems (nx.tcl,
-a-a xotcl.tcl):
-a-a The "delete" accessor now rejects single-valued properties and
-a-a variables, consistently with add. Additional tests document
-a-a per-slot accessor behaviour.
-a-a Incremental slot operations now correctly preserve custom
-a-a "value=add" and "value=delete" methods, while avoiding repeated
-a-a computations.
-a-a "info" introspection for object parameters now returns "switch"
-a-a correctly
-a-a Tcl 9 "trace variable removal" (testo.xotcl) rCo trace variable
-a-a (deprecated since 8.4) was removed by TIP 673 in Tcl 9; tests
-a-a updated accordingly.
-a* File encoding (Script.xotcl): Switched to UTF-8 for robustness
-a-a across Tcl 9 variants (e.g. TIP 657).
-a* Serializer verbosity (serializer.tcl): Reduced log noise
-a* ZIP downloads: nx::zip now flushes buffered output between files
-a-a to avoid excessive buffering and potential integer overflows on
-a-a slow connections. The ns_returnZipFile method accepts an optional
-a-a -channel argument for downloads using an existing NaviServer
-a-a connection channel, including background operations.
--a MongoDB: Updated the NSF/NX binding for Tcl 9, including size-type
-a corrections that fix stack corruption in collection queries. JSON
-a generation now uses Canonical Extended JSON through
-a bson_as_canonical_extended_json(), replacing the deprecated
-a bson_as_json() call. Applications consuming generated JSON should
-a account for the changed representation.
-a Added ::mongo::oid::gettimestamp to extract the timestamp embedded
-a in an ObjectId, and updated the build instructions and tests.
-a Testing covered MongoDB C driver/libbson 1.30.8 and MongoDB
-a Community Server 8.0.28 on macOS and Linux. MongoDB C driver 2.x
-a has not been integrated or tested.
- Bug fixes & hardening (selection):
-a* Thread-safe exit handling (POSIX, other than WIN native):
-a-a ExitHandler reworked to call Tcl_Release(interp) only from the
-a-a interp-owning thread (i.e., the one registered during Nsf_Init()),
-a-a avoiding "Tcl_AsyncDelete: async handler deleted by the wrong
-a-a thread" crashes and a memory leak.
-a* Safe interpreters: Fixed NSF initialisation in Tcl 9 safe
-a-a interpreters by skipping access to the unavailable
-a-a ::tcl::unsupported::disassemble command.
-a* Simplified memory management: Removed the "canFree" flag from the
-a-a "nsfParam" struct, in favour of pure refcounts, fixing a memory leak
-a-a on Tcl_DupInternalRep.
-a* Worked around a Tcl 9 memory leak involving an NX method-context
-a-a object.
-a* MongoDB client pool: guarded "mongoc_client_pool_push/pop" with a
-a-a mutex to prevent races.
-a* XOTcl2: fixed handling of leading "~" in file paths under Tcl 9.
-a* Robust parallel package installs (e.g., avoid overwriting of the
-a-a package index files)
-a* Runtime hardening: Selected internal consistency checks now remain
-a-a active in release builds and produces explicit diagnostics when an
-a-a invariant is violated. Additional checks improve error handling in
-a-a method dispatch, command-list maintenance, and variable
-a-a resolution.
-a* Build improvements: Compiler-specific warning detection improves
-a-a portability across GCC and Clang. Generated NSF stub declarations
-a-a now include printf-format annotations, allowing compilers to
-a-a detect format-string mismatches. Warning groups and Tcl source
-a-a directories used for stub generation can be overridden.
- Documentation:
-a* Object.man: Added fragment about "info consts"
- NSF has been built and tested with Tcl 9.0.4 and the Tcl 9.1b1 RC1
-aprerelease. Build and test results are available at:
-a-a https://github.com/nm-wu/nsf/actions
-a-a https://ci.appveyor.com/project/mrcalvin/nsf-2ylk0/history
-aImportant: As for Tcl 8.5, NSF is only tested with (unreleased) Tcl
-a8.5 revisions taken from `core-8-5-branch` at
-ahttps://core.tcl-lang.org/tcl/.
The detailed changelog is available at
-ahttps://next-scripting.org/xowiki/download/file/ChangeLog-2.4.0-2.5.0.log
The Next Scripting Framework version 2.5.0 (containing NX 2.5.0 and XOTcl 2.5.0) can be obtained from https://next-scripting.org/. Please report
issues and wishes by opening a ticket at:
-ahttps://sourceforge.net/p/next-scripting/tickets/
Best regards
- Gustaf Neumann
- Stefan Sobernig
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 76 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 56:40:31 |
| Calls: | 1,265 |
| Calls today: | 1 |
| Files: | 1,362 |
| D/L today: |
3 files (2,684K bytes) |
| Messages: | 285,808 |