Have you restarted the JVM that can't see the new function?

Have you checked for older copies along the classpath for that JVM?

Is Maven capable of showing an old, stale cached copy under some
circumstances? If so, find out how and flush the relevant cache.


On Sat, May 25, 2013 at 2:29 AM, David Williams
<mobiusinvers...@gmail.com>wrote:

> Please note, this is a duplicate post of a stackoverflow question I just
> posted, Im extremely stumped and dont know what to make of this
>
>
> http://stackoverflow.com/questions/16747039/clojure-major-emergency-with-import
>
> This is really important, and I am totally stumped and on a deadline.
>  Help is greatly appreciated.
>
> I have a Clojure project called red-black, which in particular contains a
> file called interval_tree.clj
>
> I have been compiling this project with lein uberjar and then using the
> resulting jar in other projects by installing it in a local maven
> repository.  For example, in some project that uses the red-black project:
>
>     mvn install:install-file  \
>         -Dfile=../red-black/target/red-black-0.1.0.jar  \
>         -DgroupId=self   \
>         -DartifactId=red-black  \
>         -Dversion=0.1.0  \
>         -Dpackaging=jar  \
>         -DgeneratePom=true  \
>         -DcreateChecksum=true  \
>         -DlocalRepositoryPath=local_mvn_repo
>
> The crazy thing is, I added a new function, compiled my jar and
> reinstalled it in the local maven repository of another project, and now
> java cant find my new function
>
>     user=> (red-black.interval-tree/tree-to-flat-list )
>     CompilerException java.lang.RuntimeException: No such var:
> red-black.interval-tree/tree-to-flat-list, compiling (NO_SOURCE_PATH:1:1)
>
> However this function is in red-black.interval-tree.clj!  I even went into
> my local_mvn_repo, unzipped the jar, and looked at the interval_tree.clj
> source.  The function is there!
>
> Whats even more strange is that the other functions from that library are
> all accessible.  For example, in my second project with the local mvn repo:
>
>     user=> (use 'red-black.interval-tree)
>     nil
>
> Now a little tab tab magic:
>
>     user=> (red-black.interval-tree/
>     red-black.interval-tree/add-to-result
>  red-black.interval-tree/black
>  red-black.interval-tree/check-max-interval
>     red-black.interval-tree/get-color
>  red-black.interval-tree/get-hash
> red-black.interval-tree/get-interval
>     red-black.interval-tree/get-key
>  red-black.interval-tree/get-left
> red-black.interval-tree/get-max
>     red-black.interval-tree/get-parent
> red-black.interval-tree/get-right
>  red-black.interval-tree/get-root
>     red-black.interval-tree/get-sentinel
> red-black.interval-tree/get-value            red-black.interval-tree/has?
>     red-black.interval-tree/health-check
> red-black.interval-tree/high                 red-black.interval-tree/insert
>     red-black.interval-tree/insert-fixup
> red-black.interval-tree/left-rotate          red-black.interval-tree/low
>     red-black.interval-tree/max-of-three
> red-black.interval-tree/new                  red-black.interval-tree/node
>     red-black.interval-tree/point-lookup
> red-black.interval-tree/pretty-print
> red-black.interval-tree/recursive-max
>     red-black.interval-tree/red
>  red-black.interval-tree/right-rotate
> red-black.interval-tree/set-color
>     red-black.interval-tree/set-interval
> red-black.interval-tree/set-key
>  red-black.interval-tree/set-left
>     red-black.interval-tree/set-max
>  red-black.interval-tree/set-parent
> red-black.interval-tree/set-right
>     red-black.interval-tree/set-root
> red-black.interval-tree/set-value
>  red-black.interval-tree/update-max
>     user=> (red-black.interval-tree/
>
> But as you can see the funstion tree-to-flat-list is missing.  When I go
> back into my red-black project and launch the repl, I can invoke the
> project just find.  Help!  As of 5 hours ago I was creating new methods in
> my red-black project, compiling my uberjar and installing it in my other
> project via local maven install, and new methods were being picked up just
> fine.  Something appears to be very wrong, please advise.
>
>
>>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to