-
Notifications
You must be signed in to change notification settings - Fork 1k
Could not introduce package, as its subpackage does not contain usable Go code #899
Comments
It looks like this may be stemming from something similar to #705: in this case, https://github.com/stathat/consistent/blob/master/example_test.go has a relative import that could be the culprit. |
hi hi! awesome that you're giving dep a shot with veneur 😄 so, tl;dr - if you can change this to longer explanation is that you're hitting a few interrelated things, and it's being compounded by us needing to improve our failure feedback - very much a known pain point, but difficult, and something i haven't yet found time for. these issues are:
idk if you have access to fix |
Should we document in the FAQ that relative imports aren't supported? |
@carolynvs yes, probably worth doing 😄 |
Aha - that would do it! Thanks @sdboyer. We don't have write access to Regarding (2), I could probably take a stab at that. Feel free to assign me the ticket when you write it up. |
@ChimeraCoder cool cool - #902 is that ticket. (GH limits first-class ticket assignment to org members, unfortunately 😞) Reflecting on the proper fix for this a little more, it may end up getting into all the same issues as #420, which ultimately amount to the tangle of #291 that I've been deferring. So, removing the help-wanted tag and assigning to me, as that's a morass I need to wade through. |
Added #910 for the FAQ entry. |
I see this issue is still open, so I hope it's okay to ask a related question. I opened an issue with the I've searched through the If you would like me to open a separate issue for my question, I'm happy to do so. Thanks. |
@jlovero-isp yeah, if you could open a separate issue for that, that'd be ideal. thanks! |
Hello, I actually get the same required = ["golang.org/x/tools"]
[[constraint]]
name = "golang.org/x/tools"
branch = "release-branch.go1.9"
[prune]
go-tests = true
unused-packages = true I get the same error behavior for golang.org/x/crypto as well. |
@mcandre, @sdboyer explained to me that constraint.name is a project (repository root, which may not be an actual import path) but required is a list of packages (project directories with Go code; actual import paths). Dep should probably diagnose this better but the workaround for now is to put a real package import path in required. |
@mcandre yep, this can definitely be confusing (and we're working on some changes that may help to clear up the semantics, but as our docs indicate, |
Necessary to play well with dep: golang/dep#899
Relative imports break tools like dep (golang/dep#899) and they're in general not recommended to be used.
We're migrating Veneur (github.com/stripe/veneur) to dep, but getting an error on master (current: 08b7908a70f4c76fd8a84635415a477811605e39).
The error appears similar to #387 - it complains that the subpackage
stathat.com/c/consistent
doesn't contain usable Go code, which... well, isn't true, either for the vendored version in the repository or for the version in my GOPATH.This happens on two different machines with completely different Go setups, so it doesn't look like a local issue.
What version of Go (
go version
) anddep
(git describe --tags
) are you using?go version go1.8.3
, both darwin/amd64 and linux/amdx64v0.1.0-286-g0a63c47
What
dep
command did you run?What did you expect to see?
¯_(ツ)_/¯
What did you see instead?
The text was updated successfully, but these errors were encountered: