-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
unquote doesn't work in profiles.clj :repl-options #1199
Comments
The magic leiningen unquoting is only a feature of the To the larger question: adding the ability to unquote in profiles is technically possible, but would require an eval where we don't currently have one, after reading profiles. I spiked it out on the profile_unquoting branch, but I suspect there are edge cases, as usual with profiles, so I don't feel super-confident (the |
Even if you could unquote in profiles, this wouldn't work because it would involve compiling a function and then sending it to a subprocess, and there is no way to decompile a function for serialization at present. |
True, but for this use case it does work, unless I'm missing some subtlety. That [undocumented] reply feature is used in reply directly, in the lein process, not sent through the nREPL. |
That's right, the :value option is used on the client, and is not sent from server to client. On Jun 1, 2013, at 9:01 PM, Colin Jones [email protected] wrote:
|
Oh, I see. In that case I would say it's the repl's task to turn an |
On Jun 1, 2013, at 9:38 PM, Phil Hagelberg [email protected] wrote:
|
@technomancy Yes, when reply actually supports this feature, it'll be treated just like the |
@benbooth5 Fair warning: you won't be able to completely treat these results as a real stream, because values come back from nREPL as single messages. So you'll have to realize the whole result set at once, and the changes you're talking about would just be a view into it. Beyond that, I'm not sure how you plan to pipe output to |
@trptcolin This is what I have so far, although I haven't tested it yet:
|
@trptcolin Hmm.. I tried it with the read-eval trick. Looks like the input/output of the Runtime.exec process isn't connected to the terminal. This is going to require more experimentation... |
@trptcolin Got it working! Here's the working code in case anyone's interested. Java 7 required:
|
Should we make changes in Leiningen to support this? Maybe eval |
I don't think it's Lein's job to know about eval-ing this. I still think letting unquoting work in profiles, as in https://github.com/technomancy/leiningen/tree/profile_unquoting, would be nice, though. Is there more complexity I'm missing around unquoting in profiles beyond the existing unquoting? |
I would actually rather get rid of our unquoting implementation in It seems like if reply takes an argument that it needs to be a function then Leiningen should be able to handle convert the setting from project.clj. It could do so in a way that would preserve values that were already |
Oh yeah, that's fine w/ me, I just want consistency. That's probably less surprising since there are no explicit syntax-quotes typically. REPLy will not require a real fn once trptcolin/reply#118 is done - I'm already handling some other options with conversions. |
OK, I'll close this here if it's being tracked in reply; thanks. |
Here is my ~/.lein/profiles.clj:
Here is what I get in lein repl after I type any expression that returns a value:
It looks like unquoting is not working for some reason, but I have no idea why. I would like the (fn) form to be evaluated as a function instead of a Cons. The sample.project.clj file seems to suggest that this is possible. Why doesn't this work?
The text was updated successfully, but these errors were encountered: