kit-clj / modules

Official Kit modules
https://kit-clj.github.io/
10 stars 11 forks source link

Failures after installing :kit/htmx module #6

Closed markokocic closed 2 years ago

markokocic commented 2 years ago

Just observed strange behaviour after installing :kit/htmx module.

The following snipped is added to system.edn

 :reitit.routes/ui {:base-path "",
                    :env #ig/ref :system/env}

See , that is added after :base-path although it is not there in module config.edn. Nt sure if it's a bug though, since comma is a valid edn delimiter, but looks a bit strange.

Also, trying to (reset) from the repl of running application ends up with the following errors in console:

user=> (reset)
:reloading (marko.ttt3.routes.ui)
:error-while-loading marko.ttt3.routes.ui
Execution error (IllegalStateException) at clojure.tools.namespace.repl/recover-ns (repl.clj:77).
start-app already refers to: #'marko.ttt3.core/start-app in namespace: user
user=>

Running first (halt) and then (go) seems to work properly.

The strange thing here is that the exact same code is running properly when I manually create ui.clj file, and shows the above error when the file is created by kit/install-module.

Maybe it's something about my system (Windows using both cmd and mingw, editors Sublime Text and Emacs).

@yogthos @nikolap can you please check if this is something kit related, since at the moment I'm completely lost on this one.

markokocic commented 2 years ago

Reloading issue has been fixed now. It was due to wrong namespace name.

The issue with , is still there, but it's not a real issue, so closing the ticket.