venantius / ultra

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

Declare middleware #97

Closed elzibubble closed 5 years ago

elzibubble commented 5 years ago

I'm getting these annoying warnings from Lein 2.8.2:

Warning: implicit middleware found: ultra.plugin/middleware 
Please declare all middleware in :middleware as implicit loading is deprecated.
[WARNING] No nREPL middleware descriptor in metadata of #'clojure.tools.nrepl.middleware.render-values/render-values, see nrepl.middleware/set-descriptor!

This seems relevant: https://github.com/technomancy/leiningen/blob/1dc131128279ef50f21d4d643c4d5c2133c1370d/doc/PLUGINS.md#project-middleware

emlyn commented 5 years ago

You can silence the warning by including:

:middleware [ultra.plugin/middleware]

in your project.clj

venantius commented 5 years ago

The philosophical changes to how Lein handles middleware relative to when this plugin was originally authored are significant. I appreciate the clarity in that document regarding deprecation and the long-term roadmap for Lein so that pretty clearly outlines a path forward for us.

That said, we're already in the process of seeing how Ultra's dependencies handle some of the underlying nREPL changes (which are heavily related to the configuration issues at hand here). There are probably 2-3 paths forward here that I'll need to block out some time to take a look at (unless someone else wants to pre-chew my food for me).

So, yes, this is definitely an issue and definitely needs resolution, but I need to spend a bit of time getting up to speed on what the specific right choice is.

drbobbeaty commented 5 years ago

I just ran into this with lein 2.9.0, and tried to silence the warning with:

:middleware [ultra.plugin/middleware]

in my project.clj file... and that didn't silence the warning.

I am on the latest version of Ultra:

 :user {:plugins [[lein-exec "0.3.7"]
                  [venantius/ultra "0.5.4"]]

and running JDK 1.8.0_181.

My complete ~/.lein/profiles.clj is:

{
 :user {:plugins [[lein-exec "0.3.7"]
                  [venantius/ultra "0.5.4"] ]
        :ultra {:color-scheme ;; :solarized_dark
                 {:delimiter [:bold :yellow]
                  :tag [:bold :yellow]
                  :nil [:cyan]
                  :boolean [:bold :cyan]
                  :number [:bold :green]
                  :string [:bold :red]
                  :character [:cyan]
                  :keyword [:yellow]
                  :symbol [:bold :magenta]
                  :function-symbol [:bold :blue]
                  :class-delimiter [:blue]
                  :class-name [:green]
                  :exception [:bold :red]}
                }}
}

I would like to keep running Ultra, as I really love how productive it makes the REPL, but it seems that I can't if I want to have a working REPL.

Is there a workaround as of today for this?

venantius commented 5 years ago

In my environment (now Lein 2.9.0, Clojure 1.9.0) the new 0.6.0 branch should resolve any warnings here.

drbobbeaty commented 5 years ago

OK... I'll try it as soon as it hits Clojars. :)

Thank you!