Merl's Blog

Updates Are Important

It can be the small things that make the biggest difference.

I am in the process of connecting my Tic tac toe game with my server. However this has been quite a challenge. Initially I thought it would not be. I knew I needed to make a JAR file from my server. I had done this before so no problem.

But I needed to connect my old Clojure code.

For Clojure initially I have just been using Leiningen. It has served me well, but to convert that project into a library it is best to convert this to deps.edn.

This is a more straightforward path to accomplish this task. What should have been a simple process was made difficult. I was making sure my dependencies were using their latest version. I had to make sure I matched the exact syntax. I also had to make sure I incorporated speclj in correctly.

All of these took some time but this still did not work.

{
:paths   ["src" "resources"]
:deps    {
          org.clojure/clojure               {:mvn/version "1.11.1"}
          org.clojure/data.json             {:mvn/version "2.5.0"}
          org.postgresql/postgresql         {:mvn/version "42.7.2"}
          com.github.seancorfield/next.jdbc {:mvn/version "1.3.909"}
          quil/quil                         {:mvn/version "4.3.1563"}


          httpserver/httpserver             {:local/root "/path/to/MyHTTPServer.jar"}
          ttt/ttt                           {:local/root "/path/to/ttt_clojure"}
          }


:aliases {
          :dev  {:extra-deps {speclj/speclj {:mvn/version "3.4.6"}}}
          :test {:extra-paths ["spec"]
                 :extra-deps  {speclj/speclj {:mvn/version "3.4.6"}}
                 :main-opts   ["-m" "speclj.main" "-c"]}
          :run  {:main-opts ["-m" "webtictactoe.server"]}
          }
}

What in the world?!?!

Well, I finally came to the conclusion. I had not updated some of my dependencies in IntelliJ. Cursive needed to be updated, because the previous version had a bug that would prevent what I am trying to accomplish.

After updating Cursive, I was able to finally connect my libraries successfully.

So the lesson for today: stay up to date with your updates.

Best,

Merl