plumatic / plumbing

Prismatic's Clojure(Script) utility belt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

two weird errors

pbaille opened this issue · comments

Hi,

I'm trying plumbing in a leiningen project, i've added [prismatic/plumbing "0.4.4"] to my project dependencies vector

require it in my ns like so:

(ns plumbing-test.core (:require [plumbing.core :as p]))

but when i'm loading the file into the repl

CompilerException java.lang.RuntimeException: No such var: schema-macros/cljs-env?, compiling:(plumbing/fnk/impl.clj:365:19)

and if i'm loading a second time i've got this:

CompilerException java.lang.Exception: namespace 'plumbing.fnk.impl' not found, compiling:(plumbing/core.clj:1:1)

any help would be welcome

PB

I think this should not be a plumbing issue, i've tried to reproduce it in a new leiningen project and got no issues. I close this issue

The second error is because currently when you require a ns from the (cider, at least) repl and the load of a dependent namespace fails due to a compiler exception, subsequent reloads assume the dependent ns has been loaded and fail when it isn't with the error you saw.

This means that the exception was probably occurring when loading plumbing.fnk.impl. My best guess is that your project was inadvertently using incompatible versions of plumbing and schema, due to a transitive dependency on an old version of schema from one of your other deps. Running lein deps :tree should help you find the offending lib, and you can upgrade (if possible), add :exclusions to the dependency, or depend on an earlier version of plumbing to rectify.