Pseudo project setup:
- $GOPATH/src/github.com/foo/common-libs
- $GOPATH/src/github.com/foo/my-project (has a dependency on common-libs managed by dep, copy in /vendor directory
Can't find a way to edit common-libs locally (i.e. in /src) and have those changes immediately reflected in my-project. The project /vendor file always has priority over that in $GOPATH.
Instead every time I need to push the common-libs changes to Github then run dep ensure -update
in my-project -- which is really slow and annoying.
Tried (unsuccessfully):
- Ignoring local /vendor in Gopkg.toml using
ignored = ["github.com/foo/common-libs*"]
, but throws a compilation error:cannot use &amount (type *"github.com/foo/my-project/vendor/github.com/shopspring/decimal".Decimal) as type *"github.com/foo/common-libs/vendor/github.com/shopspring/decimal".Decimal in field value
) - Manually deleting common-libs from the /vendor directory of my-project (temporarily) -- but this leads to the same compilation error as #1 (and is annoying because running
dep ensure
adds the deleted folder back to the vendor folder). - Manually editing common-libs in /vendor (temporarily), which works -- but I lose static code analysis and I have to copy the changes to the actual common-libs projects afterwards.
Any help appreciated! Thanks.