Fork me on GitHub
#luminus
<
2019-06-19
>
Hendrik Poernama04:06:43

Would like to check if anyone seen this issue before I file in github... Previously, with the compojure template, I can change my route handler and refresh the browser to see the changes applied. Now with the reitit template, I need to refresh twice. The first refresh triggers namespace recompile and reload but returns the old result. The second refresh returns updated result.

Hendrik Poernama04:06:28

I suspect this is because the ring.middleware.relaod reloads the namespace, but it is using the old handler to process its current request.. But that worked for compojure somehow?

Hendrik Poernama04:06:11

or perhaps it is because the new template uses mount for the handler

rnandan27306:06:41

@yogthos i am using +shadow-cljs profile with luminus. After creating the project, when i run lein shadow --watch app Preparing npm packages Exception in thread "main" java.lang.NoSuchMethodError: com.fasterxml.jackson.core.JsonGenerator.writeStartObject(Ljava/lang/Object;)V

rnandan27306:06:01

sorry lein shadow watch app Preparing npm packages Exception in thread "main" java.lang.NoSuchMethodError: com.fasterxml.jackson.core.JsonGenerator.writeStartObject(Ljava/lang/Object;)V

rnandan27306:06:16

Am i missing anything?

yogthos12:06:38

The error indicates a dependency conflict. I would check your ~/.lein/profiles.clj to see if there are any plugins that might be causing the issue.

rnandan27313:06:29

I have this in ~/.lein/profiles.clj

rnandan27313:06:30

{:user {:dependencies [[proto-repl "0.3.1"]]}}

rnandan27314:06:18

shadow-cljs compile app works, but not lein shadow compile app

rnandan27314:06:59

Is there any advantage using lein shadow v/s shadow-cljs?

yogthos12:06:34

There's no real difference, all lein-shadow does is allow you to keep the shadow config in project.clj

yogthos12:06:51

so if shadow runs standalone, I'd just go with that