AvisoNovate / rook

Smart namespace-driven routing for Pedestal
http://rook.readthedocs.io/en/latest/index.html
Apache License 2.0
75 stars 11 forks source link

transit-clj required dependency ? #37

Open clyfe opened 9 years ago

clyfe commented 9 years ago

In the example app, it seems to me that transit-clj is a required dependency. Without it I get:

Exception in thread "main" java.io.FileNotFoundException: Could not locate cognitect/transit__init.class or cognitect/transit.clj on classpath: , compiling:(ring/middleware/format_params.clj:1:1)

Working project.clj (note the last line):

(defproject rook-example "0.0.1"
            :description "An example rook resource"
            :main rook_test.core/main
            :dependencies [
                           [org.clojure/clojure "1.6.0"]
                           [io.aviso/rook "0.1.21"]
                           [ring "1.3.2"]
                           [com.cognitect/transit-clj "0.8.267"]])
clyfe commented 9 years ago

https://github.com/dakrone/clj-http also needed, used in the test at the bottom.

clyfe commented 9 years ago

Oh, I just realized it's intentionally minimal, but the transit-clj thing still stands.

hlship commented 9 years ago

Sorry for the delay in responding; noise vs. signal and all.

I've been doing quite a bit of work resolving the dependencies and excluding as many as possible, I'll take another look at this.

jjjjw commented 9 years ago

+1

With this setup:

(ns example.server
  (:gen-class)
  (:import
    [org.eclipse.jetty.server Server])
  (:require
    [clojure.tools.logging :as l]
    [io.aviso.rook :as rook]
    [ring.adapter.jetty :as jetty]
    ))

I get the following error:

Exception in thread "main" java.io.FileNotFoundException: Could not locate cognitect/transit__init.class or cognitect/transit.clj on classpath: , compiling:(ring/middleware/format_params.clj:1:1)

It seems that transit-clj is required.

hlship commented 9 years ago

What version of Rook, and what else is in your project.clj?

jjjjw commented 9 years ago

Ah

Here are the dependencies:

  :dependencies [
    [io.aviso/rook "0.1.36"]
    [org.clojure/clojure "1.6.0"]
    [ring "1.4.0"]
  ]
jjjjw commented 9 years ago

Adding [com.cognitect/transit-clj "0.8.281"] does work.