Skip to content

Use new session exec in test and refresh middleware #590

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 13 commits into from
Feb 11, 2019

Conversation

cichli
Copy link
Member

@cichli cichli commented Jan 22, 2019

Pending 0.6.0 release of nREPL – piggieback will also need updating to fix the build. I will take a look at that.

  • Use session exec in test middleware
  • Use session exec in refresh middleware
    • This makes the relevant ops interruptible and also serialised with evaluations / other ops that use exec (in the same session)
    • We still serialise all refresh ops globally but now using an explicit lock rather than an agent

Fixes #581.

@cichli cichli changed the title [Fix #581] Use new session exec in test and refresh middleware Use new session exec in test and refresh middleware Jan 22, 2019
@bbatsov
Copy link
Member

bbatsov commented Jan 23, 2019

Nicely done! Btw, probably we should document the usage of interruptible eval, so people would know it’s there mostly so that the ops can be interrupted. (I know recently there was some confusion about why it was used in the test middleware)

As I’m without a computer for the next couple of months I’ve given you permissions to push nREPL updates to Clojars as well (I don’t recall if we published builds automatically or not).

@cichli cichli force-pushed the session-exec branch 2 times, most recently from 0072c67 to 037a989 Compare February 2, 2019 17:51
@cichli
Copy link
Member Author

cichli commented Feb 2, 2019

Updated for the new print middleware. Now waiting on nrepl/nrepl#128 and releases of nREPL and Piggieback. I'll start looking at the client changes soon (I think it should just be renaming :printer).

Btw, probably we should document the usage of interruptible eval, so people would know it’s there mostly so that the ops can be interrupted.

I will update the docs and changelog for this. Just leaving a note here to remind myself.

@cichli cichli force-pushed the session-exec branch 3 times, most recently from 4d0f04c to 506fd45 Compare February 4, 2019 18:32
@codecov
Copy link

codecov bot commented Feb 4, 2019

Codecov Report

Merging #590 into master will decrease coverage by 0.13%.
The diff coverage is 67.51%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #590      +/-   ##
==========================================
- Coverage    76.9%   76.76%   -0.14%     
==========================================
  Files          38       37       -1     
  Lines        2386     2376      -10     
  Branches      137      128       -9     
==========================================
- Hits         1835     1824      -11     
- Misses        414      424      +10     
+ Partials      137      128       -9
Impacted Files Coverage Δ
src/cider_nrepl/plugin.clj 82.75% <ø> (-1.12%) ⬇️
src/cider/nrepl/middleware/debug.clj 55.21% <0%> (ø) ⬆️
src/cider/nrepl/middleware/format.clj 97.43% <100%> (+0.21%) ⬆️
src/cider/nrepl/middleware/util/error_handling.clj 96% <100%> (ø) ⬆️
src/cider/nrepl.clj 95.94% <100%> (+0.58%) ⬆️
src/cider/nrepl/middleware/test.clj 56.92% <42.37%> (-2.36%) ⬇️
src/cider/nrepl/pprint.clj 59.25% <42.85%> (-8.93%) ⬇️
src/cider/nrepl/middleware/stacktrace.clj 84.94% <80.76%> (+1.52%) ⬆️
src/cider/nrepl/middleware/inspect.clj 93.65% <91.66%> (+3.02%) ⬆️
src/cider/nrepl/middleware/refresh.clj 90.26% <93.75%> (+0.54%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d9be18e...6d61a14. Read the comment docs.

@cichli cichli force-pushed the session-exec branch 2 times, most recently from 5259c41 to c977f76 Compare February 5, 2019 21:41
The bindings map is no longer reliably updated due to changes in nREPL – it is
now possible for the inspector state to be overwritten if we use it. Use the
session's metadata instead (as the session middleware itself does).
Currently if analyze-causes throws an exception, the stacktrace makes it hard to
identify the cause. Compute results eagerly so the offending caller can be
tracked down.
@cichli cichli force-pushed the session-exec branch 2 times, most recently from 6285c08 to 26a7746 Compare February 5, 2019 22:45
@cichli cichli merged commit e7175f1 into clojure-emacs:master Feb 11, 2019
@cichli cichli deleted the session-exec branch February 11, 2019 13:35
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.

Update the test middleware for nREPL 0.6
2 participants