[NREPL-29] Provide a mechanism for overriding an operation Created: 09/Sep/12 Updated: 13/Nov/12 |
|
| Status: | Open |
| Project: | tools.nrepl |
| Component/s: | None |
| Affects Version/s: | 0.2.0-beta9, 0.2.0-beta10 |
| Fix Version/s: | None |
| Type: | Enhancement | Priority: | Major |
| Reporter: | Hugo Duncan | Assignee: | Chas Emerick |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
When specifying middleware, it would be much easier for the user to be able to override a default middleware without having to specify a handler. For example, if there is a default middleware providing the "complete" operation, the user should be able to just specify their preferred completion middleware, without having to specify all middleware as a handler. One way to do this might be to check metadata for the provided operations of the specified metadata, and ensure that either the default middleware for that operation is removed, or that the specified middleware takes precendence (which may be simpler when a middleware provides multiple operations). |
| Comments |
| Comment by Chas Emerick [ 14/Sep/12 7:44 AM ] |
|
Agreed. Just making sure that the order in which additional middlewares are provided is taken as a default stack order will suffice for most use cases. Transforming middlewares (either in full or in part) would need another metadata slot, :replace perhaps, though it seems like that would be much more difficult to get right. |