Code Monkey home page Code Monkey logo

Comments (8)

davidyang avatar davidyang commented on September 28, 2024 1

My understanding is that this is a pretty common pattern for those of us using VS Code and Calva.

When someone is working on an app with a Clojure server and a ClojureScript front-end and using one VSCode Workspace, Calva and VSCode only allow one nREPL session to one JVM for switching between clj and cljs (shadow) contexts. Calva doesn't support connecting to two separate nREPL sessions like sesman. Therefore Calva users tend to run the Shadow compiler via library calls from the same JVM that runs their HTTP server.

from telemere.

davidyang avatar davidyang commented on September 28, 2024 1

Thanks Peter! Updated and looks good over here.

from telemere.

ptaoussanis avatar ptaoussanis commented on September 28, 2024

Hi David,

I'm getting this error when trying to build the Shadow app:

Could you please clarify how exactly you're building? A small reproducible example would be ideal if possible, then I can try on my end. I expect that your shadow-cljs config might also be relevant, but I'm not sure.

where I'm running one JVM that boots up both a JVM app and a Shadow compiler

So your app uses shadow-cljs as a library? Is this just for build purposes, or your app actually uses shadow-cljs as part of its core functionality?

from telemere.

davidyang avatar davidyang commented on September 28, 2024

Hi Peter - I've created a basic repository that explains what I'm trying to do. It generates the compilation error if you run the command

clojure -A:server:browser -M -m server.main

https://github.com/davidyang/telemere-bug

from telemere.

ptaoussanis avatar ptaoussanis commented on September 28, 2024

Thanks David, that's great 👍 Will try take a proper look tomorrow, I'm just about to sign off.

In the meantime, could you please provide some context for your approach? I'm not so familiar with using shadow-cljs as a library and it's not obvious to me why one would want to simultaneously run both an app and shadow from the same JVM process.

Is this a common pattern? What's the motivation? I might be missing something obvious, so please explain like I'm five :-)

from telemere.

ptaoussanis avatar ptaoussanis commented on September 28, 2024

Thanks for the explanation and reproducible David, those were really helpful 👍

Quick update to say that I've identified the problem and will have a fix up later today.

from telemere.

ptaoussanis avatar ptaoussanis commented on September 28, 2024

Okay, this should be fixed with com.taoensso/encore {:mvn/version "3.111.0"} 👍 The next Telemere beta release will (as always) also include the latest Encore, so will include this fix. In the meantime you can just specify the latest Encore version yourself.

Apologies for the trouble with this!

from telemere.

ptaoussanis avatar ptaoussanis commented on September 28, 2024

Thanks for the confirmation!

from telemere.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.