BetterThanTomorrow / calva

Clojure & ClojureScript Interactive Programming for VS Code
https://marketplace.visualstudio.com/items?itemName=betterthantomorrow.calva
Other
1.68k stars 217 forks source link

Feature request: provide some functionality to make it easier to work on multi-build projects #112

Closed il-tmfv closed 3 years ago

il-tmfv commented 5 years ago

It would be nice to have some command which might help to switch CLJS REPL's builds.

Here is simple project with 2 build profiles – "app1" & "app2" – basically this project has two applications that are available from index page: https://github.com/il-tmfv/test-lein-multi-build Dependencies are copied from my project as is (may there are some conflicts, it will be good to know).

My ~/.lein/propfiles.clj:

{:repl {:plugins [[cider/cider-nrepl "0.19.0"]]
        :dependencies [[cider/piggieback "0.3.10"]
                       [figwheel-sidecar "0.5.16"]]
        :repl-options {:nrepl-middleware [cider.piggieback/wrap-cljs-repl]}}}

Leiningen v2.7.1.

How I start this app:

In embedded "ClojureScript REPL" I see

Launching ClojureScript REPL for build: app2

Open file clojure/src/test_lein_multi_build/app1/core.cljs, eval it and try to find definition for greet fn. It will success, coz it is in shared file. Try it for Info1 it this file and it will fail.

Now open clojure/src/test_lein_multi_build/app2/core.cljs. "Go to Definition" will be successful for both greet and Info2.

And this happens because of "app2" is a active build for REPL.

bpringe commented 3 years ago

https://calva.io/jack-in-guide/#switch-clojurescript-builds I believe this feature may provide this functionality. Closing this, but please reopen if needed.