luminus

2019-06-19T04:32:43.030100Z

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.

2019-06-19T04:36:28.031300Z

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?

2019-06-19T04:38:11.032Z

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

rnandan273 2019-06-19T06:42:41.032800Z

@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

rnandan273 2019-06-19T06:43:01.033200Z

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

rnandan273 2019-06-19T06:43:16.033600Z

Am i missing anything?

yogthos 2019-06-19T12:56:38.034800Z

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.

rnandan273 2019-06-19T13:41:29.035400Z

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

rnandan273 2019-06-19T13:41:30.035500Z

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

rnandan273 2019-06-19T14:03:18.036200Z

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

rnandan273 2019-06-19T14:17:59.036800Z

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

yogthos 2019-06-20T12:59:34.042100Z

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

yogthos 2019-06-20T12:59:51.042300Z

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