Giter VIP home page Giter VIP logo

Comments (7)

Olical avatar Olical commented on May 22, 2024

from conjure.

jlesquembre avatar jlesquembre commented on May 22, 2024

yes, I'm on latest commit from master: 9840c45
Take your time and enjoy the weekend, you are doing a great job with Conjure :)

from conjure.

Olical avatar Olical commented on May 22, 2024

So the culprit is this error:

Error from thread 'read-chan handler': java.lang.ClassCastException: clojure.lang.PersistentArrayMap cannot be cast to java.lang.String

Which is caused by the :val key in the prepl response being a map and not a string. I think this is because it's an assertion error and the prepl isn't catching it. Might be at macro time I guess... so maybe I can try to catch it but I should also make the parsing of the :val get skipped if it's not a string.

from conjure.

Olical avatar Olical commented on May 22, 2024

@jlesquembre hopefully this is sort of fixed for you now! It's only on master though.

I say "sort of" because I don't know why that exception is leaking out of the prepl, it shouldn't be! It should be caught by my (catch Throwable... code, I've resorted to handling these leaky exceptions and logging them properly so the connection won't die and you'll know what happened.

Ideally we won't ever get to this point though, that error should be caught before it comes out of the prepl then it can be returned as tagged data (see conjure.code/eval-str). I'm not sure why or how that generator bypasses my try/catch.

from conjure.

Olical avatar Olical commented on May 22, 2024

I KNOW WHY!

Because this is lazy code and it's getting forced as it's pr-stred inside the prepl code. When the forcing happens (doall or whatever) it triggers the lazy code which throws the exception outside of my try/catch! Nasty!

So maybe I need to doall results inside evals to prevent this sort of thing, if it's a seq anyway...

from conjure.

Olical avatar Olical commented on May 22, 2024

Okay this should be fixed properly in master now! I've still got that extra code that logs uncaught exceptions rather than swallowing them but I fixed the root cause of lazy-seqs being evaluated by the pr-str call in the prepl code.

from conjure.

jlesquembre avatar jlesquembre commented on May 22, 2024

Thanks for fixing it! I just tested it and works :)

from conjure.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.