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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors when executed over a prepl connection #22

Open
Olical opened this issue Feb 20, 2019 · 3 comments
Open

Errors when executed over a prepl connection #22

Olical opened this issue Feb 20, 2019 · 3 comments

Comments

@Olical
Copy link

Olical commented Feb 20, 2019

So this is a bit of a weird onc since there's hardly anyone (possibly just me?) is using prepl for development right now, if you don't care just yet then that's totally fine! Thought I'd let you know anyway 馃槃

The error is Can't change/establish root binding of: *cljs-warnings* with set, which works fine in a normal REPL. This could be an issue with prepl itself that isn't setting up binding in the right way.

Even if I can't fix it, finding a work around would be great. If I find something I'll put it here, any help would be much appreciated though. This error occurs with any oops operation due to the fact that the setting of *cljs-warnings* is attempted by every macro low down.

I'm not sure what the difference is between a prepl and regular REPL though. You can try it yourself by starting a prepl:

clj -J-Dclojure.server.node="{:port 5556 :accept cljs.server.node/prepl}"

Connecting with something like nc:

nc 127.0.0.1 5556

And executing any oops operation such as:

(oops.core/ocall #js {"a" +} "a" 1 1)
@darwin
Copy link
Member

darwin commented Feb 21, 2019

This might be related: nrepl/piggieback#95

I would accept a patch which would make this code configurable so you could opt-out.

@Olical
Copy link
Author

Olical commented Feb 21, 2019

I found that one too, I'm not sure if it's actually related though. I wonder how different piggieback / nrepl is to prepl when it comes to this sort of thing. I doubt I'll get around to a patch since I've resorted to my own functions for now. I don't need that much interop so it's okay for me to avoid.

If you'd like to close this that's totally fine, at least the issue will exist for future reference. Maybe it's a bug in ClojureScript since prepl is built into Clojure(Script) 馃

@darwin
Copy link
Member

darwin commented Feb 21, 2019

This is fine. Let's keep it open. I might add that configuration flag next time when I get to working on the lib.

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

2 participants