<< Back to previous view

[NREPL-52] Middleware linearizes wrong with redundant :expects entries Created: 02/May/14  Updated: 02/May/14  Resolved: 02/May/14

Status: Closed
Project: tools.nrepl
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Major
Reporter: Gary Fredericks Assignee: Chas Emerick
Resolution: Duplicate Votes: 0
Labels: None


Consider the following:

(def wrap-foo identity)
(mid/set-descriptor! #'wrap-foo
                     ;; note that these two entries are redundant since
                     ;; the session middleware implements "clone"
                     {:expects #{#'clojure.tools.nrepl.middleware.session/session "clone"}})

;; this one returns correctly
(mid/linearize-middleware-stack [#'wrap-foo
;; => (#'clojure.tools.nrepl.middleware.session/session

;; this one returns incorrectly -- note that by adding a presumably
;; unrelated extra middleware to the stack, session and wrap-foo have
;; switched their order relative to each other.
(mid/linearize-middleware-stack [#'wrap-foo
;; => (#'user/wrap-foo

Comment by Gary Fredericks [ 02/May/14 10:08 PM ]

I'm going to close this since I think NREPL-53 gets more to the root of the matter.

Generated at Mon Jan 22 10:50:31 CST 2018 using JIRA 4.4#649-r158309.