couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Shorin (JIRA)" <>
Subject [jira] [Commented] (COUCHDB-1075) Circular require's in CommonJS modules
Date Thu, 05 May 2011 12:04:03 GMT


Alexander Shorin commented on COUCHDB-1075:

Two questions:
1. Why new object created for cache proposes instead of storing compiled modules with replacing
of original code? That could be required to create anonymous function before to not cache
module, exports and require arguments, but anyway that could be more cheaper solution.
2. I see that all tests have finished with 200 OK status with no errors, but circular dependencies
are signs of architecture flaws, aren't they? Wouldn't it better to explicitly alert developer
to fix code before it haven't create require's hell?

No offence, I just interested in behavior synchronization(:

> Circular require's in CommonJS modules
> --------------------------------------
>                 Key: COUCHDB-1075
>                 URL:
>             Project: CouchDB
>          Issue Type: Bug
>          Components: JavaScript View Server
>            Reporter: Caolan McMahon
>              Labels: javascript
>         Attachments: module_cache.diff
> Having a CommonJS module A which requires B, when B also requires A causes the stack
to fill up with require calls. A prerequisite for this fix is the caching of modules, even
if it is only on a per-request basis.
> Patch incoming.

This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message