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

Can't Jack-In to new Luminus template (+re-frame +shadow-cljs). #777

Closed
dfehrenbach opened this issue Sep 1, 2020 · 8 comments
Closed
Labels
bug Something isn't working high priority jack-in

Comments

@dfehrenbach
Copy link

Referring to https://calva.io/luminus/, it seems very straight forward, but I'm getting an odd error.

ERROR: Unhandled REPL handler exception processing message {:op eval, :code *ns*, :id 1}
Syntax error compiling at (cider/nrepl/inlined_deps/orchard/v0v6v0/orchard/java/legacy_parser.clj:1:1).

running:
lein update-in :dependencies conj '[nrepl"0.6.0"]' -- update-in :dependencies conj '[clj-kondo"2020.04.05"]' -- update-in :dependencies conj '[cider/cider-nrepl"0.23.0"]' -- update-in :plugins conj '[cider/cider-nrepl"0.23.0"]' -- update-in '[:repl-options :nrepl-middleware]' conj '["cider.nrepl/cider-middleware"]' -- with-profile +dev shadow watch app test

by itself works without issue, however, jacking in results in the above error.

Note: for reference, this Luminus project was created with the following command:
lein new luminus my-luminus-shadow +re-frame +shadow-cljs

@bpringe bpringe added bug Something isn't working jack-in labels Sep 1, 2020
@bpringe
Copy link
Member

bpringe commented Sep 1, 2020

I've gone all the way back to 2.0.118 and it still doesn't work 🤔

@bpringe
Copy link
Member

bpringe commented Sep 1, 2020

Oh... This seems to be related to the template using nrepl version 0.8.0: https://github.com/luminus-framework/luminus-template/blob/06bc88aeecbbfce7250cc5ec305439f38ae5c437/CHANGES.md#384

Calva uses nrepl 0.6.0 in jack-in and may require some code changes to work well with 0.8.0.

@PEZ I remember seeing something about this in slack somewhere... Do you think bumping Calva's nrepl version to 0.8.0 will require many changes? Seems this might be something we should do.

@bpringe
Copy link
Member

bpringe commented Sep 1, 2020

@dfehrenbach For now you can change the nrepl version in the project.clj to 0.6.0 and it should work as far as I know (jack-in worked for me like that, at least).

@dfehrenbach
Copy link
Author

dfehrenbach commented Sep 1, 2020

@bpringe Thanks for the quick turn around! I'll be looking forward to calva using 0.8.0 for the nrepl 👍

@bpringe
Copy link
Member

bpringe commented Sep 25, 2020

I've been investigating this and here are my findings thus far, for future reference:

Lein uses nrepl version 0.7.0. If a different version is included in project.clj deps, the different version will be used (this can be seen with lein classpath). If a different version is instead included via lein update-in :dependencies then lein will only use it if newer than its own version. So currently, any lein projects used with Calva's jack-in are actually using nrepl 0.7.0, unless they specify otherwise in their project.clj.

Calva should stay up to date with nrepl anyway, so we should update it in the jack-in task. Currently that seems to break jack-in, so fixing that is required.

@bpringe
Copy link
Member

bpringe commented Sep 25, 2020

Found that it's a bug in nrepl 0.8.0! nrepl/nrepl#206

It was fixed in version 0.8.1.

Jack-in works fine in this case with nrepl 0.8.2 (latest as of right now). Fix coming soon.

@bpringe
Copy link
Member

bpringe commented Sep 25, 2020

It appears the luminus template has been updated to include nrepl 0.8.1 already, so new projects generated shouldn't have this problem, but I'm going to bump Calva's jack-in nrepl version to 0.8.2 anyway, as it'll fix this issue with any projects that do use 0.8.0.

@bpringe
Copy link
Member

bpringe commented Dec 18, 2020

Just to document here if anyone else has this issue - I was having this issue on a particular project since the above fix, and upgrading leiningen solved the issue.

Update: The issue came back. I can't consistently reproduce, but lein clean then jack-in seems to fix it, at least temporarily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high priority jack-in
Projects
None yet
Development

No branches or pull requests

2 participants