Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot jack in after shadow-cljs start #452

Open
filipesilva opened this issue Nov 6, 2019 · 4 comments
Open

Cannot jack in after shadow-cljs start #452

filipesilva opened this issue Nov 6, 2019 · 4 comments
Labels

Comments

@filipesilva
Copy link

Shadow-cljs allows having a background server running via shadow-cljs start. This speeds up individual shadow cljs invocations significantly and is useful for doing different builds or running commands via shadow-cljs run.

If I jack in when there is no background server, it all goes smoothly and a terminal shows the following:

> Executing task: C:\Program Files\nodejs\npx.cmd shadow-cljs -d cider/piggieback:0.4.1 -d cider/cider-nrepl:0.22.4 watch :app <

shadow-cljs - config: d:\work\learn-re-frame-course-files\cheffy\shadow-cljs.edn  cli version: 2.8.69  node: v10.16.0
shadow-cljs - updating dependencies
shadow-cljs - dependencies updated
shadow-cljs - HTTP server available at http://localhost:3000
shadow-cljs - server version: 2.8.69 running at http://localhost:9630
shadow-cljs - nREPL server started on port 3333
shadow-cljs - watching build :app
[:app] Configuring build.
[:app] Compiling ...
[:app] Build completed. (691 files, 1 compiled, 0 warnings, 9.60s)

But I I start a server beforehand, the output pane stays stuck on Jacking in... and never proceeds:

$ yarn shadow-cljs start
yarn run v1.17.3
$ D:\work\learn-re-frame-course-files\cheffy\node_modules\.bin\shadow-cljs start
shadow-cljs - config: D:\work\learn-re-frame-course-files\cheffy\shadow-cljs.edn  cli version: 2.8.69  node: v10.16.0
shadow-cljs - server starting ..................................... ready!
Done in 10.14s.
> Executing task: C:\Program Files\nodejs\npx.cmd shadow-cljs -d cider/piggieback:0.4.1 -d cider/cider-nrepl:0.22.4 watch :app <

shadow-cljs - config: d:\work\learn-re-frame-course-files\cheffy\shadow-cljs.edn  cli version: 2.8.69  node: v10.16.0
shadow-cljs - connected to server
shadow-cljs - watching build :app
[:app] Configuring build.
[:app] Compiling ...
[:app] Build completed. (691 files, 690 compiled, 0 warnings, 46.46s)

I thought this might be because now the terminal log doesn't have the nREPL info and maybe that tripped up the calva connect sequence for shadow-cljs. But I'm not sure because the current isConnectedRegExp doesn't match anything in the logs either.

I asked @thheller about this and he indicated that those log messages are now
in the .shadow-cljs/server.stdout.log and .shadow-cljs/server.stdout.log files. The messages are printed to the files when the server starts and not when Calva tries to connect to it. Since the nrepl.port file is also created on server startup and Calva looks for files created in .shadow-cljs, I suppose it will never see the file being created and just wait for that.

@cfehse cfehse added the jack-in label Nov 6, 2019
@slowdownitsfine
Copy link

I have the same issue when trying to jack-into a running shadow-cljs watch on macOS.

shadow-cljs@2.8.83

@slowdownitsfine
Copy link

Just fyi, It seems to be working for me again now. Thanks!

@filipesilva
Copy link
Author

@dcusan odd, in my case nothing changed...

@PEZ
Copy link
Collaborator

PEZ commented Mar 30, 2020

Seems we need to look at the various shadow-cljs jack-in scenarios a bit. Sorry for late response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants