NCI 't' parameter type removed; no replacement?

Peter Lobsinger plobsing at gmail.com
Sat May 14 01:44:41 UTC 2011


On Fri, May 13, 2011 at 1:45 PM, Will Coleda <will at coleda.com> wrote:
> On Fri, May 13, 2011 at 10:21 AM, Peter Lobsinger <plobsing at gmail.com> wrote:
>> On Fri, May 13, 2011 at 7:24 AM, Jonathan Worthington
>> <jonathan at jnthn.net> wrote:
>>> Hi,
>>>
>>> The deprecated 't' parameter in NCI broke Zavolaj (the Perl 6 native call
>>> interface). This in turn broke various modules, including MiniDBI. Looking
>>> at:
>>>
>>> https://github.com/parrot/parrot/commit/75e2b4c94d602d3d7e8af4b679c325c8ec8d3fd9#src/nci/extra_thunks.nci
>>>
>>> It seems that the signatures for e.g. mysql database connection were
>>> removed, not updated! The deprecation notice doesn't provide anything that
>>> seems to help with our use case. Replacing t with S seems to lead to
>>> segfaults; a further look shows that seems not to be passing a C string or
>>> even the string buffer, but the STRING * pointer. None of the examples that
>>> use the 't' parameter have been updated.
>>
>> The signatures were removed with the intent that they be replaced
>> latter with their equivalents as needed. All code that was exercised
>
> Added in ebf2de7f (Christoph Otto       2010-07-28 02:39:31 +0000  85) -
>
>> HLLs, libraries and other users of Parrot will inevitably find that we
>> deprecate some core features which they depend on.  In order to minimize the
>> pain caused by this deprecation and the subsequent "upgrade tax" (i.e. the time
>> users must spend to keep their code working after an upgrade), we now forbid
>> the removal of any deprecated feature until an appropriate upgrade path has
>> been documented.  Any deprecated features that are removed without an
>> appropriate notification are subject to reversion until such notifications have
>> been added.  The single (rare) exception to this rule is any core feature which
>> is broken or incomplete to the point that it is deemed unusable by any user.
>
> This seems to fall under this clause, and I heartily agree.

The upgrade path exists, as evidenced by the libraries and tests that
were upgraded. The wiki page contains a description of this, and it
has been stated in this email thread as well: Call
Parrot_str_to_cstring and Parrot_str_free_cstring as is appropriate
for the lifetime of the buffer you are working with.

> Let's bring this back, fix Zavolaj, document the upgrade path,
> IMPLEMENT IT, and then we can worry about deleting the old stuff.

I am opposed to this course of action. The deprecation policy was
followed in this update. The deprecation policy does not guarrantee
that nothing will ever break. It aims to mitigate the associated
problems through notification and documentation, both of which have
been provided in this instance.

> --
> Will "Coke" Coleda
>


More information about the parrot-dev mailing list