Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Dynamically upgrade nrepl connection #3044

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

Merged
merged 2 commits into from
Sep 9, 2021

Conversation

plexus
Copy link
Contributor

@plexus plexus commented Sep 7, 2021

Piece together the final pieces to make dynamic loading + sideloading of
middleware work.

This introduces M-x cider-upgrade-nrepl-connection, which combines the different steps needed

  • fetch the cider-nrepl jar
  • start the sideloader
  • insert the middleware
  • reload the nREPL capabilities

This introduces a cider-jar mini library for looking up jars and files in jars fairly efficiently and in a cross-platform manner.

Part of #3037


Before submitting the PR make sure the following things have been done (and denote this
by checking the relevant checkboxes):

  • The commits are consistent with our contribution guidelines
  • [-] You've added tests (if possible) to cover your change(s)
  • All tests are passing (eldev test)
  • All code passes the linter (eldev lint) which is based on elisp-lint and includes
  • You've updated the changelog (if adding/changing user-visible functionality)
  • You've updated the user manual (if adding/changing user-visible functionality)

Thanks!

If you're just starting out to hack on CIDER you might find this section of its
manual
extremely useful.

@plexus plexus changed the title Upgrade nrepl connection Dynamically upgrade nrepl connection Sep 7, 2021
@plexus plexus force-pushed the upgrade-nrepl-connection branch 3 times, most recently from 9fbf04f to f21e727 Compare September 7, 2021 14:41
@plexus
Copy link
Contributor Author

plexus commented Sep 7, 2021

Apparently string-replace is an Emacs 28 thing.

@plexus plexus force-pushed the upgrade-nrepl-connection branch from f21e727 to 7aa3e03 Compare September 7, 2021 14:50
@plexus
Copy link
Contributor Author

plexus commented Sep 7, 2021

And it seems relying on internals of arc-mode wasn't smart either 😅

@plexus plexus force-pushed the upgrade-nrepl-connection branch from 7aa3e03 to 8670fc1 Compare September 7, 2021 14:56
@plexus
Copy link
Contributor Author

plexus commented Sep 7, 2021

Good thing we test on Emacs 25/26/27, and I use 28. Seems in 28 the implementation of arc-mode was changed to use structs instead of vectors. Will look into the remaining failures tomorrow.

@plexus plexus force-pushed the upgrade-nrepl-connection branch 6 times, most recently from 2c06783 to ab89ac5 Compare September 8, 2021 09:36
Piece together the final pieces to make dynamic loading + sideloading of
middleware work.

- Add cider-jar mini-library : download jars, list their contents and extract files
- Install unzip on CI, needed by arc-mode which we use for the jars
@plexus plexus force-pushed the upgrade-nrepl-connection branch from ab89ac5 to 7456966 Compare September 8, 2021 09:49
@plexus plexus force-pushed the upgrade-nrepl-connection branch from 06ee79f to bdb4bc0 Compare September 8, 2021 10:05
@plexus
Copy link
Contributor Author

plexus commented Sep 8, 2021

That... actually worked :D CI is looking ok now, apart from the invisible windows builds.

Could potentially use an extra one or two tests for the stuff in cider-eval. I'll do docs in a separate PR.

@bbatsov bbatsov merged commit 932f6a0 into clojure-emacs:master Sep 9, 2021
@bbatsov
Copy link
Member

bbatsov commented Sep 9, 2021

Great work! 🚀

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

Successfully merging this pull request may close these issues.

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.