I'm finding it a bit hard to understand how "dub add-local" works or
rather why it works like it does. What I don't understand is why
packages added with "dub add-local" have priory over packages in the Dub

Let me explain what I'm trying to do. I'm trying to figure out a good
workflow for working with multiple dub packages without pushing anything.

Say I have two projects A and B. B is a dependency of A. I want to make
some changes in A which also requires changes in B. Of course I would
like to make the changes both in A and B before pushing the changes in B.

So I tried using "dub add-local" for the path to project B. Then I
compiled A and to my surprise it picked up the changes in B. The
surprise is that I didn't have to change anything at all in dub.json.
That would suggest that all other packages that depend on B will have
this change as well, which I absolutely don't want to happen.

So why this behavior?

I much rather prefer how Bundler works in the Ruby world. Gemfile
contains the dependencies:

Gemfile for A

gem 'B', '1.2.3'

Now I would like to make some changes to B without creating a new
version of B or push anything. I then just change the file to:

gem 'B', path: /path/to/B

This doesn't require me to release a new version of the gem, push
anything or not even commit my changes. The best of all, it's only
project A that uses these specific changes to B.

BTW, how to I find out which packages have been added with "dub
add-local"? I tried "dub list" which list all packages regardless if
they where added with "dub add-local" or not. "dub list-overrides"
doesn't print anything.

/Jacob Carlborg