Skip to content
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

nREPL support , missing edge case #118

Open
danielsz opened this issue Jun 2, 2019 · 1 comment
Open

nREPL support , missing edge case #118

danielsz opened this issue Jun 2, 2019 · 1 comment

Comments

@danielsz
Copy link
Contributor

danielsz commented Jun 2, 2019

In the current implementation of the nREPL support (ClojureNReplMojoj.java), I noticed that an edge case is missing. User in the list below refers to user of clojure-maven-plugin.

  • User doesn't specify custom handler nor custom middleware -> no problem, nREPL defaults end up being used
  • User specifies custom nREPL handler and no custom nREPL middleware -> no problem, user-specified nREPL handler gets merged with nREPL default middleware
  • User specifies custom nREPL middleware and no custom nREPL handler -> no problem, user-specified nREPL middleware gets merged with nREPL default handler
  • User specifies both custom nREPL handler and custom nREPL middleware -> this is a problem, only the custom nREPL handler is being merged, custom nREPL middleware is ignored.

This is not a use case that comes up frequently, and it's possible to work around it, but it might be a good idea to handle it anyway.

@danielsz
Copy link
Contributor Author

danielsz commented Jun 2, 2019

Or, instead of handling the case, throw an error to indicate that either a custom nREPL handler can be used, or user-supplied middleware, but not both at the same time.

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

No branches or pull requests

1 participant