Skip to content
This repository was archived by the owner on Nov 17, 2021. It is now read-only.

Support for local and external packages? #20

Open
mna opened this issue Dec 5, 2013 · 5 comments
Open

Support for local and external packages? #20

mna opened this issue Dec 5, 2013 · 5 comments

Comments

@mna
Copy link

mna commented Dec 5, 2013

Hi,

I'm trying gom for the first time, so it's possible I'm doing something wrong. I have the following structure for a project in a private repo (not go getable, requires auth):

private/cmd
private/cmd/package1
private/cmd/package2

cmd is a main package, and it uses cmd/package1 and cmd/package2. They are part of the same repo, so I don't want to vendor the packages. But cmd and the packages use external dependencies from github and google code.

I generated the Gomfile, and deleted the lines for the cmd/package1 and cmd/package2. When I run gom build, it complains that he cannot find those packages. Is this a supported scenario, to have some dependencies resolved in the standard GOPATH, and some resolved using the vendor/gom-defined GOPATH?

Thanks,
Martin

@janckerchen
Copy link

+1

my case

my project directory is in $GOPATH, I need a subdir to collect some stuff like models

src/models/user.go
src/main.go

gom prevent me to import "model", because $GOPATH is replaced totally.

$ gom test
sqlite3_db_test.go:7:2: cannot find package "model" in any of:
    /usr/local/Cellar/go/1.1.2/libexec/src/pkg/model (from $GOROOT)
    /opt/dev_play/go_projects/src/gorm_demo/vendor/src/model (from $GOPATH)
gom:  exit status 1

gom set "./vendor " to $GOPATH, but it's better to append it to $GOPATH.

@dre1080
Copy link

dre1080 commented Jan 14, 2014

+1 @mattn I have the same issue as @janckerchen and @PuerkitoBio

@ezotrank
Copy link

+1
Maybe syntax like this:

gom 'some_private_package', path => './vendor/some_private_package'

@mattn
Copy link
Owner

mattn commented Feb 13, 2014

Maybe, this issue depend on https://codereview.appspot.com/61630048/

@rberger
Copy link

rberger commented Jul 11, 2015

So how does one deal with packages that are inside of the repo that gom is operating on?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants