Skip to content

Conversation

@Malabarba
Copy link
Member

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this will always behave as we expect it to. Does this code always run in the context of interruptible-eval (didn't go through the implementation in much detail)? @cichli does it look legit to you?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps I should go with a more verbose name for the key, like :cider-sync?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I think I get your question now. I suppose there's nothing preventing other middleware from evaling code as well.
In fact, I think pprint might be one.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems breakpoint is only ever called within the context of an nREPL eval, so *msg* should always be bound here. If we want to call this function from other middleware handlers we could just bind *msg* to the message being handled, assuming we include the :sync key for all requests (i.e. not just eval requests).

Not been following the issue too closely, so forgive my ignorance, but shouldn't this really be fixed client-side (i.e. properly handle need-input during synchronous requests) so we don't need this kind of hack?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not been following the issue too closely, so forgive my ignorance, but shouldn't this really be fixed client-side (i.e. properly handle need-input during synchronous requests) so we don't need this kind of hack?

Yes, this should be fixed client-side, but I'm under the impression that even with the handle-input fix in sync-request the breakpoint will still bug out during a sync eval (because its workings are more complicated than a simple need-input event). Still, I haven't had a chance to test that conjecture yet (busy busy busy :-P).

@Malabarba Malabarba closed this Apr 10, 2015
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.

3 participants