luminus-framework / luminus-template

a template project for the Luminus framework
http://www.luminusweb.net/
MIT License
647 stars 147 forks source link

+shadow-cljs includes outdated Calva lein-shadow command #537

Closed tkindy closed 3 years ago

tkindy commented 3 years ago

In 4.10, the lein-shadow plugin was removed from the +shadow-cljs template. However, it's still referenced as part of the custom Calva commands in .vscode/settings.json. This command now fails since the lein-shadow plugin is no longer available.

lein update-in :dependencies conj '[nrepl,"0.8.3"]' -- update-in :dependencies conj '[cider/cider-nrepl,"0.26.0"]' -- update-in :plugins conj '[cider/cider-nrepl,"0.26.0"]' -- update-in '[:repl-options,:nrepl-middleware]' conj '["cider.nrepl/cider-middleware"]' -- with-profile +dev shadow watch app test
'shadow' is not a task. See 'lein help'.
Error encountered performing task 'shadow' with profile(s): 'base,system,user,provided,dev,dev'
tkindy commented 3 years ago

Is there a recommended way to start the server and client apps at once now? Should I just manually use npx shadow-cljs watch app for the CLJS compilation alongside lein run for the service?

yogthos commented 3 years ago

Yeah, looks like Calva settings need to be updated for the change as well. Using npx shadow-cljs watch app is the way to go now. Pinging @PEZ regarding Calva settings update. :)

PEZ commented 3 years ago

Hello,

@tkindy, I haven't looked in to it yet. But from what I read in this conversation I think your hunch is correct. Now you will no longer be able to work with both the server and the client from the same VS Code window. Try this:

Please let me know if this doesn't work.

@yogthos, I'll have a look at this and see what needs to be changed in configuration and documentation. It would be nice if we could save the ability to work with the server and client from the same VS Code window. That was pretty sweet. 😄

tkindy commented 3 years ago

Thanks for the confirmation @PEZ! I agree, it'd be great to have both client and server running from the same VS Code window if possible. Let me know if I can help in any way!

PEZ commented 3 years ago

@tkindy I still can run and hack on both the server and the client using shadow-cljs only jack-in. Like so:

  1. jack in, choosing shadow-cljs and the app and test builds.
  2. wait for the shadow builds to complete
  3. start the server using the custom command for it in Calva (ctrl+alt+space space)
  4. load.the app in the browser

You probably should change :lein true in shadow-cljs.edn to :lein {:profile "+dev"} in order for the server dev dependencies to be satisfied.

@yogthos, I'll fiddle around a bit with the Calva configuration and will PR an update when I've figured out something that works.