Fork me on GitHub

@djblue Can you think of a reason by evaluating (portal.api/open {:launcher :vs-code}) into a Socket REPL from VS Code would not open the VS Code webview? But (portal.api/open {}) does open an external browser?


Are there some specific things that the :vs-code launcher depends on in the environment? Perhaps JVM version? (this is a REPL running on JDK8 for... reasons...)


Ah, this is about the .portal/vs-code.edn file, isn't it?

👍 1

Hmm, let me go digging...


...yup, that was the issue! This particular REPL was started in a different folder so .portal wasn't available by walking up the filesystem. I just added a symlink to deal with this situation.


Was it started in a child folder?


No, this is down to a quirk of our environment at work.


All our Clojure code + build infrastructure + everything "modern" lives in one repo wsmain and all our CFML legacy code lives in a second repo worldsingles (what used to be our single repo).


Normally I run VS Code out of wsmain and that's where .portal is and everything works great in the Clojure world.


Today, it finally occurred to me that I could use Portal with the Socket REPL that runs inside our CFML apps!


But the REPL that the CFML apps starts is in the application's web root -- in worldsingles/wsadmin/www -- not in the wsmain repo at all.


The UI/runtime connection makes perfect sense the way it is. I just have a very weird setup for this embedded REPL 🙂

👍 1

But the upshot is: I can now develop live into our legacy apps with full debugging and with Portal used in VS Code to visualize data inside the CFML app!

awesome 1

In the future, if repl extensions provide a repl api to other extensions, the ux could be much better 👌


I just moved my "Portal extras" from my dot-clojure repo directly into my VS Code/Clover setup, which will make it easier for others to adopt my VS Code/Portal setup, without needing to look at my dot-clojure setup.

👍 2

Also, if this strategy of connecting ui and runtime is problematic, I'm down to change it :thumbsup: