couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gordon Stratton (JIRA)" <j...@apache.org>
Subject [jira] Updated: (COUCHDB-245) Couch uses the erlang stdlib module regexp, which is deprecated and set to be removed. It should use the module re instead.
Date Mon, 03 Aug 2009 03:23:15 GMT

     [ https://issues.apache.org/jira/browse/COUCHDB-245?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gordon Stratton updated COUCHDB-245:
------------------------------------

    Attachment: couch_re_patch_2

It looks like couch_rep_changes_feed.erl is now using re instead of regexp. Given that, maybe
we should revisit this issue? I've attached an updated patch that applies against r800186
and passes the Futon test suite.

The re module's behavior seems to be to throw exceptions instead of doing {error, Reason}-style
returns. There were a couple places in couch_config_writer.erl that looked like they could
benefit from removal of arguably unnecessary error handling code (the regexp should never
fail to be compiled, things should crash if it does), but I could be way off track with that.
This is my first Erlang and CouchDB patch, so it's probably going to need some more work.

> Couch uses the erlang stdlib module regexp, which is deprecated and set to be removed.
It should use the module re instead.
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: COUCHDB-245
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-245
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Infrastructure
>    Affects Versions: 0.7.2, 0.8, 0.8.1, 0.9
>         Environment: regexp is set to be removed from stdlib when R15 is released.
>            Reporter: alisdair sullivan
>         Attachments: couch_mochi_re_patch, couch_re_patch, couch_re_patch_2
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> Couch uses the erlang stdlib module regexp, which is deprecated and set to be removed.
It should use the module re instead. re is not a drop in replacement for regexp, it operates
on and returns binary strings instead of native strings. 
> Affects files couch_config.erl, couch_config_writer.erl, couch_httpd.erl, couch_httpd_server.erl,
couch_log.erl and couch_server.erl. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message