Repository navigation
Keep repartee's variables and give each expression a value - #4
Merged
Merged
Conversation
Evals ran with prune_binding, which keeps only the variables the code reads or writes, so after `x = 1` and `y = 2` the session no longer had `x`. IEx doesn't prune either.
repartee evaluated the code of an eval as a single block and sent only the last value, so a client sending `x = 1` and `x + 1` together lost the first one. The expressions run one at a time now, like in IEx and in dialtone's Erlang backend, and each one but the last sends its value as it goes. A parenthesized block is still one expression, and load-file still reports just the last value, like nREPL.
Each expression sends its value as it goes now, but one that raised still took the session back to its state from before the eval, so after `y = 1` and `raise "boom"` together the client had seen y's value and couldn't use it. The expressions that ran keep what they did. IEx drops it all, but IEx also shows only the last value.
The stdout and stderr tests had become single expressions so that they got a single value. They're back to an expression after the output, which also checks that values and output stay in order.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A session lost its variables as soon as an eval didn't use them, as evals ran with
prune_binding. IEx doesn't prune. And an eval of several expressions sent only the last value, which proof'seval.multiple-formscheck didn't catch because proof's repartee profile had no snippet for it. The expressions now run one at a time, like IEx does and like dialtone's Erlang backend runs forms, and a parenthesized block still counts as one expression.An expression that fails keeps what the ones before it did, since the client already has their values. IEx drops it all, but it also shows only the last value.