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

Shadow-cljs repl started from deps.edn repl is not usable without workarounds #1270

Closed
hukka opened this issue Aug 20, 2021 · 1 comment
Closed
Labels

Comments

@hukka
Copy link

hukka commented Aug 20, 2021

Steps to reproduce:

  1. git clone https://github.com/fulcro-community/fulcro-exercises.git and open the project in Calva
  2. Jack in, selecting deps.edn and the :serve alias
  3. Manually promote the repl by running (shadow/repl :main)
  4. a) Try to evaluate the src/holyjak/fulcro_exercises.cljs file, or b) evaluate a single form from the file

Evaluation of the file gives a popup with error `Running the contributed command: 'calva.loadFile' failed.' Evaluating a single sexp doesn't do anything. The repl type in the repl is shown as 'cljc/clj' and the repl type in the file is shown as 'clj'.

Workaround:
After the first three steps, manually reconnect the repl (ctrl-alt-c ctrl-alt-c), this time selecting the shadow-cljs repl type. Now the repl's type in the bottom bar is 'cljc/cljs' and in the file 'cljs', and evaluation works.

What also doesn't work:
Trying to jack in directly to the shadow-cljs repl. Calva tries to launch it with npx, but the project isn't set up for it.

Ideas:
The project has been set up like https://shadow-cljs.github.io/docs/UsersGuide.html#deps-edn, but there is no support from calva for a shadow repl that is not started with the JS version of shadow-cljs itself. I suppose some kind of new option ("shadow-cljs via deps.edn" perhaps, or "shadow-cljs via clj") for this would need to be added, with the current shadow-cljs repl type renamed to "shadow-cljs via npx" for clarity.

Other option would be to have a way to tell calva what a repl's type is, overriding any automatic logic.

@bpringe
Copy link
Member

bpringe commented Aug 22, 2021

Calva had a shadow-cljs + deps.edn jack-in option until recently. See #1253. Let's see what @PEZ thinks about this issue.

If shadow is configured to use deps.edn than the shadow-cljs project type should be used.

Do we need to update the shadow-cljs configuration to work with deps.edn?

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

2 participants