What I've been doing is inside of ~/.juliarc.jl check `git rev-parse
--is-inside-work-tree` and then using `git rev-parse --show-toplevel` to
modify JULIA_PKGDIR and LOAD_PATH. That way each git repository can have
its own collection of packages. I'd like to formalize this pattern so that
it's easier to use, but it's already quite doable if a bit roll-your-own.
The installed packages can be checked in as submodules, but this
unfortunately brings its own set of headaches because of all the usability
problems of git submodules. I'd also like to make Pkg submodule-aware so
that it handles this smoothly, but it's a bit tricky.


On Mon, Feb 24, 2014 at 1:43 AM, Ben Mabey <[email protected]> wrote:

> Clojure just rides on top of Java's Maven which installs jars to ~/.m2 and
> then updates your project's CLASSPATH based on the deps listed in your
> project config file. Ruby does something similar with Gemfile's.  All gems
> are installed in your Gempath but then Bundler (maybe part of gem itself?)
> updates your load path so all the listed deps are in it. Python has
> virutalenv.
>
> What I believe Dave is asking for the ability to have different versions
> of libraries installed at the same time but have each project specify which
> one to use.  So, when you say "using Gadfly" it would use a project dep
> config file to lookup when one to use.
>
>
> On Sunday, February 23, 2014 11:16:58 PM UTC-7, Stefan Karpinski wrote:
>
>> I'm not entirely sure what you mean. Can you elaborate on this a little?
>> You cannot have many separate instances of dependencies as in NPM – only
>> one version of each package is loaded when you do "using" or "import". The
>> approach of having many instantiations of a package, possibly in different
>> versions is feasible in JavaScript because modules are written in pure
>> JavaScript and it's uncommon to load dynamic libraries. Julia is in the
>> opposite situation – it is extremely common to load and use dynamic
>> libraries with global state. Thus, the NPM approach is not practical. I'm
>> not sure what Clojure does.
>>
>>
>> On Sun, Feb 23, 2014 at 3:22 PM, Dave Bettin <[email protected]> wrote:
>>
>>> First, I have recently enjoyed the use of both Clojure's and Node's
>>> package management facilities.
>>>
>>> I am trying to understand how local project dependencies in Julia
>>> compare. So far what I can gather is most of Julia's intrinsic package
>>> handling is global.
>>>
>>> Is it possible to download a private and/or public package and only
>>> manage its dependencies? Can one store these dependencies local to the
>>> package, akin to 'node_modules' in npm?
>>>
>>> Thanks!
>>> Dave
>>>
>>
>>

Reply via email to