tools.nrepl

Inconsistency between session and eval responses

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: 0.2.4
  • Fix Version/s: 0.2.4
  • Component/s: None
  • Labels:
  • Patch:
    Code

Description

At present, the interruptible-eval handler sends the :value or :eval-error status message before it updates the session to reflect the new binding result. This leaves the session values, particularly *e, *1, etc inconsistent with the state implied by those response messages.

As a practical example, if we want to wrap the "eval" op to check for an :eval-error and add error detail to the response from *e, (get @session #'*e) needs to hold the exception that resulted in the :eval-error. At present, however, it still holds the previous exception, leaving us no way to retrieve the current one in band.

The attached (minimal) patch makes ensures the session is updated before "eval" responses are sent.

Activity

Hide
Jeff Valk added a comment -

In the event that the attached patch seems a reasonable fix, I should probably add that my CA will be in the mail shortly.

Show
Jeff Valk added a comment - In the event that the attached patch seems a reasonable fix, I should probably add that my CA will be in the mail shortly.
Hide
Bozhidar Batsov added a comment -

I'm just here to pledge my support for Jeff's patch. Btw, Jeff, few days later and you could have signed the CA electronically.

Show
Bozhidar Batsov added a comment - I'm just here to pledge my support for Jeff's patch. Btw, Jeff, few days later and you could have signed the CA electronically.
Hide
Jeff Valk added a comment -

The irony did not escape me. Anyway, my CA (in dead tree form) is now on file.

Show
Jeff Valk added a comment - The irony did not escape me. Anyway, my CA (in dead tree form) is now on file.
Hide
Chas Emerick added a comment -

Looks good, thanks for the patch Applied as f02956d.

Show
Chas Emerick added a comment - Looks good, thanks for the patch Applied as f02956d.

People

Vote (1)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: