Fork me on GitHub
#portal
<
2021-10-20
>
seancorfield23:10:00

@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?

seancorfield23:10:49

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...)

seancorfield23:10:15

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

👍 1
seancorfield23:10:27

Hmm, let me go digging...

seancorfield23:10:09

...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.

djblue23:10:38

Was it started in a child folder?

seancorfield23:10:25

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

seancorfield23:10:09

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).

seancorfield23:10:34

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

seancorfield23:10:05

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

seancorfield23:10:40

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.

seancorfield23:10:53

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

👍 1
seancorfield23:10:38

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
djblue23:10:48

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

seancorfield23:10:38

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
djblue23:10:34

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