Giter Club home page Giter Club logo

Comments (6)

lnostdal avatar lnostdal commented on July 4, 2024

E.g.,

lamina.core> (import-fn channel/receive)
--->
No message.
[Thrown class java.lang.NullPointerException]

Restarts:
0: [QUIT] Quit to the SLIME top level

Backtrace:
0: java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:922)
1: clojure.lang.Namespace.find(Namespace.java:188)
2: clojure.core$find_ns.invoke(core.clj:3659)
3: clojure.core$the_ns.invoke(core.clj:3691)
4: clojure.core$intern.invoke(core.clj:5586)
5: potemkin.namespace$import_fn.invoke(namespace.clj:28)
6: clojure.lang.Var.invoke(Var.java:409)
7: clojure.lang.AFn.applyToHelper(AFn.java:167)

..but the old way still works:

lamina.core> (import-fn #'channel/receive)
#'lamina.core/receive
lamina.core>

from potemkin.

ztellman avatar ztellman commented on July 4, 2024

Hmm, it should work. Make sure you've cleared out the ~/.m2/repository before running lein deps.

On Dec 11, 2011, at 9:27 AM, Lars Rune NΓΈ[email protected] wrote:

Hi,
The switch from (import-fn #'some-fun) to (import-fn some-fn) in the clj-3 branches of lamina, gloss and aleph doesn't seem to work -- and I think this might be because the import-fn macro in potemkin is missing some updates. (?)


Reply to this email directly or view it on GitHub:
#2

from potemkin.

lnostdal avatar lnostdal commented on July 4, 2024

Ok, I've compared md5sums to make 100% sure I'm not getting a stale potemkin-0.1.1-SNAPSHOT.jar while doing lein deps.

I've also re-cloned the git repositories, just to make sure something hasn't gone wrong at that point.

from potemkin.

lnostdal avatar lnostdal commented on July 4, 2024

This change seems to work:

diff --git a/src/potemkin/namespace.clj b/src/potemkin/namespace.clj
index 9687f8d..170af93 100644
--- a/src/potemkin/namespace.clj
+++ b/src/potemkin/namespace.clj
@@ -12,7 +12,7 @@
"Given a function in another namespace, defines a function with the same name in the
current namespace. Argument lists, doc-strings, and original line-numbers are preserved."
[sym]

  • (let [m (meta (eval sym))
  • (let [m (eval `(meta (var ~sym)))
    m (meta (intern (:ns m) (:name m)))
    n (:name m)
    arglists (:arglists m)

from potemkin.

ztellman avatar ztellman commented on July 4, 2024

I'm sorry, I was testing a locally generated jar rather than the one that was actually checked in. I've checked in the changes, it should be working now.

from potemkin.

lnostdal avatar lnostdal commented on July 4, 2024

Just did a pull and things are OK. :)

from potemkin.

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.