Comments (14)
Ah damn, I'm sorry about that 😭 try pouring it into a map or bean, it might get around the printing temporarily. I'm still waiting on my patch going into ClojureScript, maybe I can do a halfway house soon to fix the Clojure side at least.
Once that CLJS patch is in I won't have to parse anything returned from the prepl which will make things a lot easier. I'll see what I can do to mitigate it until the proper fixes are possible 🤔
from conjure.
Patch released in v0.17.1
to mitigate this, it'll show you the parse error and not kill the connection. Full fix will come with the errors / exceptions rework I think..
from conjure.
Error improvement work is now waiting for this patch to go into ClojureScript https://clojure.atlassian.net/browse/CLJS-3096
Once that's in I can rewrite how the error handling system works which means I don't need to parse output from prepl evaluations which means this error will vanish. This will make Conjure a lot more robust too, right now there's a few cases where returning something out of the ordinary will cause it to choke.
If you hit one of these errors, I'm really sorry. You'll just have to pour the data into Clojure data structures or use bean until this is patched, hopefully it won't be too long!
from conjure.
I think I'm running into this with Manifold streams. They have a custom print-method that returns this:
<< stream: {:pending-puts 0, :drained? false, :buffer-size 0, :permanent? false, :type "manifold", :sink? true, :closed? false, :pending-takes 0, :buffer-capacity 0, :source? true} >>
and causes Conjure to report "Invalid symbol: stream:.".
No rush, just wanted to add another data point.
Thanks for making Conjure, I enjoy using it every day.
from conjure.
I'm also being hit by this in a project I'm working on.
I did find a workaround: if you find yourself needing to evaluate a form where you know the result is a record, you can wrap it with (into {} the-form)
This turns the record into a plain map.
There is still a problem if you want to evaluate a form that contains records (e.g. a map where the values include records). I found a solution for this on StackOverflow: (clojure.walk/postwalk #(if (record? %) (into {} %) %) the-form)
It's not ideal, but I think it will tide me over until a fix comes down the pike :)
from conjure.
I've got an idea for how I could potentially work around this until ClojureScript prepl hits feature parity with Clojure prepl 🤔 I'll see what I can do ASAP, just got talk planning to do for next Wednesday.
from conjure.
Testing Slack integration...
from conjure.
@daveyarwood great idea to use clojure.walk. Here's my augmented version that handles manifold streams:
(defn nr
[form]
(clojure.walk/postwalk
#(cond
(record? %) (into {} %)
((supers (class %)) manifold.stream.core.IEventStream) (pr-str %)
:else %)
form))
from conjure.
So when someone who's experienced this has some free time, would you be able to try it again but on the result-refactor
branch? #47
I'll try to repro too, but it would be great if you could try to do exactly what you did before that caused Conjure to explode. I'm hoping my changes have fixed it, if not I think a slight tweak will be all that's needed after that refactor work.
Thanks a lot!
from conjure.
A simple repro case is to evaluate the following using your project's prepl:
;; this works because the return value is the var `my-namespace.Foo`
(defrecord Foo [])
;; this blows up because the return value is a record
(->Foo)
from conjure.
I just tried the result-refactor
branch, and the issue appears to be fixed!
I also tried it out on the work project where I ran into this issue before, and it's fixed there too 👍
from conjure.
Yessss, thank you for checking, that's great news. I'll wrap up the rest of that PR and get it out in a tagged release.
from conjure.
The issue is fixed for me as well. Thanks!
from conjure.
So this is fixed in v0.21.0
😄
from conjure.
Related Issues (20)
- Regression on the `develop` branch since 5119706fa08ecb1efa72fb9d6e68bb965d259015 HOT 3
- Other floating windows overlap HUD HOT 1
- How can I write a conjure client without aniseed? HOT 5
- How do I connect to a Fennel REPL via port? HOT 3
- Connection resets upon evaluation on Windows for Janet + Netrepl HOT 4
- Disable all default mappings? HOT 11
- [Feature Request] Add Tangerine support (Fennel)
- Duplicate kondo messages with Lazy and your provided config HOT 7
- Randomly losing keymaps HOT 1
- Clojure: evaluate word misinterprets single-quotes in symbol names HOT 6
- [Clojure]: A way to configure a default namespace HOT 6
- Swap `__name__` to something other than `__main__` in Python REPLs HOT 3
- README Suggestion HOT 2
- Cannot connect to Scheme through socket HOT 2
- Async/await doesn't work with ipython REPL HOT 13
- stdio repl handling of both stderr and stdout for a form can be a problem sometimes HOT 1
- <localleader>ee, <localleader>E evaluate the whole file HOT 9
- Problems with evaluation: wrong returns HOT 3
- Guile over nREPL, guile-ares-rs integration HOT 4
- Clojure Debugger: Evaluation failing on debug reader tags HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from conjure.