cemerick / friend

An extensible authentication and authorization library for Clojure Ring web applications and services.
1.16k stars 122 forks source link

Remove ring-core dependency from friend #123

Closed jeluard closed 10 years ago

jeluard commented 10 years ago

ring-core dependency comes with a significant number of useless indirect dependencies.

By copying the few and simple ring-clojure methods used by friend those could be removed. Would this be accepted as a pull request?

cemerick commented 10 years ago

I'm confused: is friend ever not used with ring?

jeluard commented 10 years ago

I'm using it with http-kit which follows ring spec but does not rely on ring the dependency.

Even as a ring user to be sure ring dependencies do not conflict with your own you would need to use the same ring version as the one used by friend.

Ideally ring-core would be split in smaller chunks so that you could only pay the cost of dependencies that you really need but I don't see this happening soon.

cemerick commented 10 years ago

Right, I forgot about http-kit.

My current inclination would be to recommend http-kit users add an :exclusion for ring's transitive dependencies to their friend dependency vector. Inconvenient, yes, but copy/pasting utility fns (no matter how simple) introduces debt that just isn't worth limiting the scope of default dependencies.

jeluard commented 10 years ago

Fair enough!

jeluard commented 10 years ago

See ring-clojure/ring#156 for a related ring issue.