You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by Massimo Manghi <mx...@apache.org> on 2016/09/06 20:22:55 UTC

::rivet::catch command weirdness

Hi everybody, I need your help and experience in order to track the 
origin of a problem that is plaguing the current version of rivet 2.3.0 
when 'catch' is used in certain forms

The issue emerged when ::rivet::lempty (intensively called from dio.tcl 
and other dio_*.tcl files) started to return 0 even when its only 
argument was an empty list.

::rivet::lempty is very simple

proc lempty {list} {
   if {[catch {llength $list} len]} { return 0 }
   return [expr {$len == 0}]
}


and the problem is with 'catch' failing with a syntax error. The problem 
turned out to be related to ::rivet::catch (at least removing this 
command from the installation restores the expected lempty behavior). 
Still Rivet intentionally doesn't export the command ::rivet::catch and 
therefore it can't be imported into the global namespace so that the 
core command in not shadowed. Someone has some explanation for this? 
Another problem is with the setup that causes the problem: my Debian 
'stretch' systems does have it, while a custom apache installation on 
linux Mint works as expected.

any ideas?

  -- Massimo


---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org


Re: ::rivet::catch command weirdness

Posted by Massimo Manghi <mx...@apache.org>.
Hi Brice, good to know, I'd like to have feedbacks when the release is out

  -- Massimo

On 09/09/2016 05:44 PM, Brice Hamon wrote:
> Thanks Massimo.
>
> We are in the process of migrating to OpenSuse 13.2 with Apache 2.4. It's
> working in dev right now.
>
> We are looking forward for this release.
>
> Thank you as always,
> Brice.
>
> On Fri, Sep 9, 2016 at 10:44 AM, Massimo Manghi <ma...@unipr.it>
> wrote:
>
>> I'm preparing a new release of rivet (2.3.2) with a fix of this bug and a
>> new tests checking the ::rivet::try and ::rivet::catch functionality. Also
>> the new test suite supporting Apache 2.4 (running the prefork MPM) will be
>> included.
>>
>>  Anyone has more requests or recommendations for this release?
>>
>>  -- Massimo
>>
>>
>> On 09/06/2016 10:42 PM, Massimo Manghi wrote:
>>
>>> Since ::rivet::lempty runs within the ::rivet namespace the catch
>>> procedure called here is ::rivet::catch, which is a wrapper around
>>> ::catch. Fully qualifying the name solves the problem but doesn't
>>> explain why it was functional pretty well before
>>>
>>>  -- M
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
>> For additional commands, e-mail: rivet-dev-help@tcl.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org


Re: ::rivet::catch command weirdness

Posted by Brice Hamon <br...@ydotm.com>.
Thanks Massimo.

We are in the process of migrating to OpenSuse 13.2 with Apache 2.4. It's
working in dev right now.

We are looking forward for this release.

Thank you as always,
Brice.

On Fri, Sep 9, 2016 at 10:44 AM, Massimo Manghi <ma...@unipr.it>
wrote:

> I'm preparing a new release of rivet (2.3.2) with a fix of this bug and a
> new tests checking the ::rivet::try and ::rivet::catch functionality. Also
> the new test suite supporting Apache 2.4 (running the prefork MPM) will be
> included.
>
>  Anyone has more requests or recommendations for this release?
>
>  -- Massimo
>
>
> On 09/06/2016 10:42 PM, Massimo Manghi wrote:
>
>> Since ::rivet::lempty runs within the ::rivet namespace the catch
>> procedure called here is ::rivet::catch, which is a wrapper around
>> ::catch. Fully qualifying the name solves the problem but doesn't
>> explain why it was functional pretty well before
>>
>>  -- M
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
> For additional commands, e-mail: rivet-dev-help@tcl.apache.org
>
>

Re: ::rivet::catch command weirdness

Posted by Massimo Manghi <ma...@unipr.it>.
I'm preparing a new release of rivet (2.3.2) with a fix of this bug and 
a new tests checking the ::rivet::try and ::rivet::catch functionality. 
Also the new test suite supporting Apache 2.4 (running the prefork MPM) 
will be included.

  Anyone has more requests or recommendations for this release?

  -- Massimo


On 09/06/2016 10:42 PM, Massimo Manghi wrote:
> Since ::rivet::lempty runs within the ::rivet namespace the catch
> procedure called here is ::rivet::catch, which is a wrapper around
> ::catch. Fully qualifying the name solves the problem but doesn't
> explain why it was functional pretty well before
>
>  -- M
>


---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org


Re: ::rivet::catch command weirdness

Posted by Massimo Manghi <mx...@apache.org>.
Since ::rivet::lempty runs within the ::rivet namespace the catch 
procedure called here is ::rivet::catch, which is a wrapper around 
::catch. Fully qualifying the name solves the problem but doesn't 
explain why it was functional pretty well before

  -- M

On 09/06/2016 10:22 PM, Massimo Manghi wrote:
> Hi everybody, I need your help and experience in order to track the
> origin of a problem that is plaguing the current version of rivet 2.3.0
> when 'catch' is used in certain forms
>
> The issue emerged when ::rivet::lempty (intensively called from dio.tcl
> and other dio_*.tcl files) started to return 0 even when its only
> argument was an empty list.
>
> ::rivet::lempty is very simple
>
> proc lempty {list} {
>   if {[catch {llength $list} len]} { return 0 }
>   return [expr {$len == 0}]
> }
>
>
> and the problem is with 'catch' failing with a syntax error. The problem
> turned out to be related to ::rivet::catch (at least removing this
> command from the installation restores the expected lempty behavior).
> Still Rivet intentionally doesn't export the command ::rivet::catch and
> therefore it can't be imported into the global namespace so that the
> core command in not shadowed. Someone has some explanation for this?
> Another problem is with the setup that causes the problem: my Debian
> 'stretch' systems does have it, while a custom apache installation on
> linux Mint works as expected.
>
> any ideas?
>
>  -- Massimo
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
> For additional commands, e-mail: rivet-dev-help@tcl.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org