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

middleware doesn't load with trampoline? #34

Closed
icambron opened this issue Dec 24, 2014 · 4 comments
Closed

middleware doesn't load with trampoline? #34

icambron opened this issue Dec 24, 2014 · 4 comments

Comments

@icambron
Copy link

I realize this may not be an issue in Piggieback itself, but I figured this would still be the right place to bring it up. When I do lein repl, I can bring up my browser repl no problem (I'm using Weasel, not Piggieback directly, but AFAIK that doesn't matter). But when I do lein trampoline repl and do the same thing, I get:

IllegalStateException Can't change/establish root binding of: *cljs-repl-options* with set  clojure.lang.Var.set (Var.java:221)

Reading through the issues here, I understand that error means the nrepl-middleware hasn't loaded? Is there something about the way trampoline works that creates a problem there?

@cemerick
Copy link
Collaborator

Yeah, trampoline has consistently posed a challenge for various plugins (emezeske/lein-cljsbuild#204 is another issue I'm aware of).

I can reproduce the problem you describe, and you're correct about the proximate cause (the middleware hasn't been loaded). Happy to take a PR, though from what I understand of trampoline, its environment is subtly (but sufficiently) different from "normal" task execution that getting piggieback to work with it properly may not be feasible/worth the effort?

@icambron
Copy link
Author

Thanks for looking into it. Since I know next to nothing about the inner workings of lein, I'll defer to your judgment on it not being worth it. Would you take a PR that provided a better error message about the possible causes of that error?

@cichli
Copy link
Member

cichli commented Dec 29, 2014

There's a similar issue at greglook/whidbey#6 where @trptcolin speculates that trampoline repl fails to load middleware at all. Perhaps it's worth logging this on the leiningen issue tracker?

@cemerick
Copy link
Collaborator

@cichli Sure, sounds reasonable.

@icambron Yeah, mentioning something about not using trampoline there would be fine.

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

4 participants