I’ve been using my own launch script that does something similar to the new clj 
script. (I’m caching a Leiningen generated classpath.)  I had some bugs when my 
project directory was copied to another user or machine because the cached 
classpath was not validate in the new environment, particularly with a 
different Maven repository.  The same kind of problem can happen with a 
remotely mounted project directory.  File time checks did not necessarily 
protect against these relocations.

I fixed my problem with two changes.  First, I put the cache in the 
PROJECT/target subdirectory so that a “lein clean” would allow the user to 
recover.  Second, I named my cache file with the inode of the project.clj file. 
 If the project is copied somewhere else, it is highly unlikely that the inode 
numbers would match.  The inode of the Maven repository or project deps.edn 
should work with the new clj script.

I use rlwrap, except within an Emacs shell.  I suggest you test for the 
presence of rlwrap as you do for java.  $(type -p rlwrap)  and ignore it if 
it’s not found.  I think Emacs is popular enough that it’s worth testing for 
within your clj script ($EMACS will be defined).  It would be good enough if 
you provided an option to turn off rlwrap so I could wrap your script with my 
own.

I can file bugs and provide patches if you want.

Steve Miner
stevemi...@gmail.com <mailto:stevemi...@gmail.com>




> On Jul 25, 2017, at 10:19 AM, Alex Miller <a...@puredanger.com> wrote:
> 
> tools.deps.alpha is a new contrib library API for transitive dependency graph 
> expansion and the creation of classpaths.
> 
> For more information, I would invite you to check out:
> 
> * the README 
> <https://github.com/clojure/tools.deps.alpha/blob/master/README.md> from 
> tools.deps.alpha
> * the slides 
> <http://cdn.cognitect.com/presentations/2017/dependency_heaven.pdf> from my 
> EuroClojure talk (video coming in the next week or two)
> 
> There are some additional pieces still to come that will provide installers 
> for various systems as well. This is still a work in progress but is targeted 
> for completion along with Clojure 1.9.
> 

-- 
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/d/optout.

Reply via email to