Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ANNOUNCE: Next Scripting Framework 2.3.0 is available

121 views
Skip to first unread message

gustafn

unread,
May 10, 2019, 5:14:17 AM5/10/19
to
Dear Community,

We are pleased to announce the availability of the Next Scripting
Framework (NSF) 2.3.0. The changes are mostly perfective improvements
in terms of bug fixes, API consistency, and backwards
compatibility. See below for the Major changes relative to 2.2.0.

Best regards
- Gustaf Neumann
- Stefan Sobernig


Diff stats since 2.2.0:
189 files changed, 17743 insertions(+), 16889 deletions(-)
(222 commits)

NSF:

* Reform of "uplevel" and "upvar" methods:

- The methods "uplevel" and "upvar" (well as the underlying
commands [current callinglevel] and [self callinglevel]) behave
now more consistently and more similar to the XOTcl 1
semantics. This eases the migration of XOTcl 1 code. These
methods are needed for "frame skipping", i.e. when methods using
":upvar" or ":uplevel" are overlaid with filters/mixin classes
but should keep the uplevel semantics without these
interceptors. Otherwise, adding a filter/mixin can easily break
existing code.

- The behavior of uplevel/upvar should be stable now with respect to
Tcl's "namespace eval" and similar commands.

- Error handling for providing potentially invalid level arguments
was fixed.

* Rename reform for "nsf::procs": NSF procs can now be safely renamed
(or deleted) using the Tcl [rename] command. This was only partially
supported before, and could also lead to crashes (when redefining
a renamed NSF proc).

* New object property "autonamed": NSF objects having been created
using "new", rather than using "create", can now be tested for
this condition using the object property "autonamed".

The property "autonamed" can be used to avoid having to rely on
pattern matching of the command names. This is e.g. useful in the
NaviServer/AOLserver blueprint management, where temporary objects
should be omitted.


% package req nx
2.3
% nsf::object::property [nx::Object new] autonamed
1
% nsf::object::property [nx::Object create o] autonamed
0


* Extended object property "volatile": By setting or unsetting the
object property "volatile", the volatility of a given NSF object
changed dynamically. In previous releases, it was not possible
to remove the volatility property of an object.

% package req nx
2.3
% ::nx::Object create ::o -volatile
::o

# query volatile property
% nsf::object::property ::o volatile
1

# modify volatile property
% nsf::object::property ::o volatile false
0


NX:

* Properties and variables now provide "exists" as an additional
accessor method, in addition to "get".
The accessor method "exists" was mainly added achive symmetry
in the accessor API.


% package req nx
2.3
% nx::Class create C {
:property -accessor public {a 1}
}
::C
% ::C create ::c1
::c1
% if {[::c1 a exists]} { ::c1 a get } else { ::c1 a set "1" }
^^^^^^


* Fixed method combination for ensemble methods: In previous
releases, calling [next] at the end of a next chain in ensemble
methods could fire unintentionally the unknown handler.

* nx::zip rewrite: nx::zip now uses the built-in Tcl 8.6 encode and
decode facilities, if available, rather than requiring the Trf
package to be present.


XOTcl:

* Improved compatibility of XOTcl2 with XOTcl1 behavior
for volatile objects (see "volatile reform" above).

* Improved compatibility of XOTcl2 with XOTcl1 behavior for
uplevel/upvar from within methods (see "uplevel/ upvar reform"
above).


nx::serializer:

* Improved backward compatibility: Preserve overriding accessor/
mutators methods (instprocs) for slots.



MongoDB interface:

* Added JSON serializer: The "find all" and "bson" methods now
provide for JSON-formatted results, on request.
These new methods ease implementing e.g. single-page
applications that require an easy mapping between
NX and JSON.


::nx::mongo::Class "find all" -asJSON
::nx::mongo::Object bson asJSON


* Fixed test suite; tested the NSF MongoDB binding against latest
stable releases of MongoDB (4.0.9) and MongoDB-C driver (1.14.0).


Documentation:

* Added documentation of uplevel and upvar methods.
* Improved spelling and wording in numerous places


Maintenance & bug fixes:

* VLA reform: Avoid the use of variable-length arrays (VLA) when
building argument vectors of `Tcl_Obj's internally to NSF. Use
fixed-sized ones (stack-allocated for a size known at compile time
or dynamically allocated above) to prevent from potential
overflows and to produce more time-efficient instructions.

* Tcl 8.7:

Support for Tcl 8.7a1 and the upcoming, unreleased Tcl 8.7a2
(core.tcl-lang.org/tcl branch "core-8-branch"). NSF compiles and its
regression tests execute successfully (including `TCL_NO_DEPRECATE`).

* Misc (esp. NSF/C): Ran valgrind checks, plugged one source of
potential leaks (`NsfProcStubDeleteProc`) and one invalid read on a
dangling pointer (`NsfCCreateMethod).

* Test suite: Fix recursion tests on 8.5 (Windows-only,
forward.test) for platform-specific error messages (CheckCStack),
obsolete for 8.6 with NRE. Guarded test case on recursive
forwards, to avoid preemptive crashes on stack-size limited
systems.


Build environments:

* Microsoft C compilers: Turned off COMDAT folding (/opt:icf) under
"nmake" builds which can lead to unusable, pointless
function-pointer comparisons (`Nsf_ConvertToSwitch` vs.
`Nsf_ConvertToBoolean`).

* Improve robustness of configure/ make procedure in the absence of
generated DTRACE artifacts so that they are truly conditional
on the corresponding configure flags for DTRACE.

* Improved robustness of Windows (nmake) installation routines by
testing for the existence of the install directory.

* Rendered inference of GIT commit in autotools setup more robust, in
light of partial GIT checkouts (e.g., w/o tags).


The detailed changelog is available at
https://next-scripting.org/xowiki/download/file/ChangeLog-2.2.0-2.3.0.log

The Next Scripting Framework 2.3.0 (containing NX 2.3.0 and XOTcl
2.3.0) can be obtained from https://next-scripting.org/. Please report
issues and wishes by opening a ticket at
https://sourceforge.net/p/next-scripting/tickets/.


Manfred

unread,
May 12, 2019, 4:09:14 AM5/12/19
to
Hi


I compiled NSF 2.3.0 on windows with cygwin.

but if I start the package nx I get:

"The program can't start because cygwin1.dll is missing from your
computer. Try reinstalling the program to fix this problem."

With NSF 2.2.0 I don't have this problem.


Ok. I copied cygwin1.dll on the directory where nsf2.3.0.dll is located
Now I can start the package without an error, but the application hangs.

Is there an workaround?

regards
Manfred

Am 10.05.19 um 11:14 schrieb gustafn:

stefan

unread,
May 12, 2019, 6:05:49 PM5/12/19
to
Hi Manfred,

From your description, it is hard to provide any guidance, I am afraid.

Aside: We are not testing with cygwin, but MinGW and MSVC. A MinGW x86_64 build corresponding to the release can be obtained from:

https://next-scripting.org/builds/nsf_master_core-8-6-9_win_autoconf-tea_20190512_273.zip

> I compiled NSF 2.3.0 on windows with cygwin.

Okay, did you run "make test"? What is the outcome?
What Tcl version are you targeting exactly?

>
> but if I start the package nx I get:
>
> "The program can't start because cygwin1.dll is missing from your
> computer. Try reinstalling the program to fix this problem."
>
> With NSF 2.2.0 I don't have this problem.

I cannot imagine that this one is related to NSF/NX per se, this is a common issue with one's cygwin installation.

> Ok. I copied cygwin1.dll on the directory where nsf2.3.0.dll is located

This is a recommended way to fix the dependencies of any cygwin-based build.

> Now I can start the package without an error, but the application hangs.

By "starting the package", you mean: executing "package req nx"?
What is the application?
How do you execute your application? tclsh, wish, ...?
How did y

> Is there an workaround?

Can you try to use the MinGW-based build cited above, and see whether this works for you?

Stefan

Manfred

unread,
May 13, 2019, 3:04:39 PM5/13/19
to
Hi Stefan

I need it for 32-bit.
Now I compiled with MinGw and it works like expected.

Thank you.


Regards

Manfred


Am 13.05.19 um 00:05 schrieb stefan:

stefan

unread,
May 13, 2019, 5:45:39 PM5/13/19
to
> Now I compiled with MinGw and it works like expected.

Good to know, thanks.

Stefan
0 new messages