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

runtimes should be nestable #14

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open

Conversation

RutledgePaulV
Copy link
Owner

No description provided.

@RutledgePaulV
Copy link
Owner Author

addresses #1, #2, #12, #13

@dotemacs
Copy link

Cloned this branch and added deps.edn:
dotemacs@f481e11

Requiring my clone like so:

io.github.dotemacs/clj-embed {:git/url "https://github.com/dotemacs/clj-embed.git"
                                      :git/sha "f481e11f859cc5faed7ff29a4df61faad4dd568d"}

Then I try the code from the readme:

(require '[clj-embed.core :as embed])

(embed/with-temporary-runtime
 (+ 1 2 3))

And it blows up with:

1. Unhandled java.lang.NullPointerException
   (No message)

              Matcher.java: 1770  java.util.regex.Matcher/getTextLength
              Matcher.java:  416  java.util.regex.Matcher/reset
              Matcher.java:  253  java.util.regex.Matcher/<init>
              Pattern.java: 1133  java.util.regex.Pattern/matcher
                  core.clj: 4881  clojure.core/re-matcher
                  core.clj: 4911  clojure.core/re-matches
                  core.clj: 4911  clojure.core/re-matches
                 maven.clj:   40  clojure.tools.deps.alpha.extensions.maven/specific-version
                 maven.clj:   38  clojure.tools.deps.alpha.extensions.maven/specific-version
                 maven.clj:   61  clojure.tools.deps.alpha.extensions.maven/eval9517/fn
              MultiFn.java:  239  clojure.lang.MultiFn/invoke
                 alpha.clj:  366  clojure.tools.deps.alpha/canonicalize-deps/fn
             protocols.clj:   49  clojure.core.protocols/iter-reduce
             protocols.clj:   75  clojure.core.protocols/fn
             protocols.clj:   75  clojure.core.protocols/fn
             protocols.clj:   13  clojure.core.protocols/fn/G
                  core.clj: 6886  clojure.core/reduce
                  core.clj: 6868  clojure.core/reduce
                 alpha.clj:  365  clojure.tools.deps.alpha/canonicalize-deps
                 alpha.clj:  363  clojure.tools.deps.alpha/canonicalize-deps
                 alpha.clj:  497  clojure.tools.deps.alpha/resolve-deps
                 alpha.clj:  478  clojure.tools.deps.alpha/resolve-deps
                  core.clj:   49  clj-embed.core/resolve-deps
                  core.clj:   48  clj-embed.core/resolve-deps
                  core.clj:  130  clj-embed.core/new-runtime
                  core.clj:  122  clj-embed.core/new-runtime
                  core.clj:  127  clj-embed.core/new-runtime
                  core.clj:  122  clj-embed.core/new-runtime
                      REPL:    5  cljref.jail/eval10494
                      REPL:    5  cljref.jail/eval10494
             Compiler.java: 7194  clojure.lang.Compiler/eval
             Compiler.java: 7149  clojure.lang.Compiler/eval
                  core.clj: 3215  clojure.core/eval
                  core.clj: 3211  clojure.core/eval
    interruptible_eval.clj:   87  nrepl.middleware.interruptible-eval/evaluate/fn/fn
                  AFn.java:  152  clojure.lang.AFn/applyToHelper
                  AFn.java:  144  clojure.lang.AFn/applyTo
                  core.clj:  667  clojure.core/apply
                  core.clj: 1990  clojure.core/with-bindings*
                  core.clj: 1990  clojure.core/with-bindings*
               RestFn.java:  425  clojure.lang.RestFn/invoke
    interruptible_eval.clj:   87  nrepl.middleware.interruptible-eval/evaluate/fn
                  main.clj:  437  clojure.main/repl/read-eval-print/fn
                  main.clj:  437  clojure.main/repl/read-eval-print
                  main.clj:  458  clojure.main/repl/fn
                  main.clj:  458  clojure.main/repl
                  main.clj:  368  clojure.main/repl
               RestFn.java: 1523  clojure.lang.RestFn/invoke
    interruptible_eval.clj:   84  nrepl.middleware.interruptible-eval/evaluate
    interruptible_eval.clj:   56  nrepl.middleware.interruptible-eval/evaluate
    interruptible_eval.clj:  152  nrepl.middleware.interruptible-eval/interruptible-eval/fn/fn
                  AFn.java:   22  clojure.lang.AFn/run
               session.clj:  218  nrepl.middleware.session/session-exec/main-loop/fn
               session.clj:  217  nrepl.middleware.session/session-exec/main-loop
                  AFn.java:   22  clojure.lang.AFn/run
               Thread.java:  829  java.lang.Thread/run

@dotemacs
Copy link

Further digging into this, it's related to #12

@dotemacs
Copy link

And then I tried the version from @SevereOverfl0w:

io.github.severeoverfl0w/clj-embed {:git/url "https://github.com/SevereOverfl0w/clj-embed.git"
                                            :git/sha "f17d268945d4d3ed6f3f0c791d7ab2671f423aac"}

which has the fix in it. At least for the #12

Thanks

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

Successfully merging this pull request may close these issues.

2 participants