venantius / ultra

A Leiningen plugin for a superior development environment
Eclipse Public License 1.0
1.24k stars 35 forks source link

clash with potemkin Vars #12

Closed ikitommi closed 9 years ago

ikitommi commented 9 years ago

There seems to a clash with potemkin Vars with my setup (using Vinyasa):

WARNING: protocol? already refers to: #'clojure.core/protocol? in namespace: potemkin.types, being replaced by: #'potemkin.types/protocol?
WARNING: protocol? already refers to: #'clojure.core/protocol? in namespace: potemkin.collections, being replaced by: #'potemkin.types/protocol?

what if Ultra would inject Vars into custom & configurable namespace like Vinyasa does (defaulting to ./), instead of adding stuff to clojure.core => would separate nicely the things "available in the dev repl" and "available in the installed prod".

thanks for the awesome tool.

venantius commented 9 years ago

Yeah, the current behavior is not optimal, for sure. I'm not a huge fan of the ./ namespace - I'm still trying to decide what the optimal path is, though at the moment I'm leaning towards a solution like #7. In the near-term you can disable the java support by setting :java false in your :ultra map.

This is on my roadmap for 0.2.0 so hopefully I'll have a proper fix out soon.

ikitommi commented 9 years ago

Thanks, but I have the :java false already. Midje seems to conflict with those, simple way to test:

lein new compojure-api ultra +midje
cd ultra
lein midje

gives out:

WARNING: protocol? already refers to: #'clojure.core/protocol? in namespace: potemkin.types, being replaced by: #'potemkin.types/protocol?
WARNING: protocol? already refers to: #'clojure.core/protocol? in namespace: potemkin.collections, being replaced by: #'potemkin.types/protocol?
All checks (2) succeeded.
ikitommi commented 9 years ago

more likely to come from [prismatic/plumbing "0.3.7"]. Uses potemkin under the hoods. So, running this test gives the warning (and removing the plumbing removes it):

(ns kikka.core-test
  (:require [midje.sweet :refer :all]
            plumbing.core))

(fact "plus"
  (+ 1 1) => 2)
venantius commented 9 years ago

I'm sorry, I didn't follow your last two comments. Are you saying that you think the warning is coming from Midje + Potemkin colliding with each other?

venantius commented 9 years ago

FWIW, I believe most cases in which Ultra was responsible for such warnings should be resolved with today's release (0.2.0). I'm going to close this issue, but please let me know if the new update doesn't resolve the problem for you.

ikitommi commented 9 years ago

problem was with Ultra, when used with Plumbing & Midje. Fixed in 0.2.0, thanks!