-
Notifications
You must be signed in to change notification settings - Fork 540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolve Test Imports #461
Resolve Test Imports #461
Conversation
Tried this out on a (albeit small) project that's using Ginkgo and Gomega, and it picked them up and installed them as expected 👍 One question: should this be writing to the |
@ches test imports should end up on testImport. But, if the import is also used in the app it will show up in import instead. testImports is for imports that are only used in tests and nowhere else. This is done because you can't safely have different versions of the same import in use. |
My test:
The good news is that the [INFO] Downloading dependencies. Please wait...
[INFO] Fetching updates for k8s.io/kubernetes/pkg/client/unversioned/remotecommand.
[INFO] Fetching updates for k8s.io/kubernetes/pkg/kubectl/cmd/util.
[INFO] Fetching updates for github.com/golang/protobuf/ptypes/any.
[INFO] Fetching updates for k8s.io/kubernetes/pkg/client/unversioned/clientcmd.
[WARN] k8s.io/kubernetes/pkg/client/unversioned/remotecommand appears to be a vendored package. Unable to update. Consider the '--update-vendored' flag.
[WARN] k8s.io/kubernetes/pkg/kubectl/cmd/util appears to be a vendored package. Unable to update. Consider the '--update-vendored' flag.
[WARN] github.com/golang/protobuf/ptypes/any appears to be a vendored package. Unable to update. Consider the '--update-vendored' flag.
[WARN] k8s.io/kubernetes/pkg/client/unversioned/clientcmd appears to be a vendored package. Unable to update. Consider the '--update-vendored' flag.
[INFO] Fetching updates for github.com/ghodss/yaml.
[INFO] Fetching updates for github.com/golang/protobuf/proto.
[INFO] Fetching updates for k8s.io/kubernetes/pkg/api.
[INFO] Fetching updates for k8s.io/kubernetes/pkg/labels.
[INFO] Fetching updates for github.com/golang/protobuf/ptypes/timestamp.
[WARN] github.com/golang/protobuf/proto appears to be a vendored package. Unable to update. Consider the '--update-vendored' flag.
[INFO] Fetching updates for golang.org/x/net/context.
[WARN] k8s.io/kubernetes/pkg/api appears to be a vendored package. Unable to update. Consider the '--update-vendored' flag.
[WARN] k8s.io/kubernetes/pkg/labels appears to be a vendored package. Unable to update. Consider the '--update-vendored' flag.
[WARN] github.com/golang/protobuf/ptypes/timestamp appears to be a vendored package. Unable to update. Consider the '--update-vendored' flag.
[INFO] Fetching updates for k8s.io/kubernetes/pkg/kubectl/resource.
[WARN] golang.org/x/net/context appears to be a vendored package. Unable to update. Consider the '--update-vendored' flag.
[INFO] Fetching updates for k8s.io/kubernetes/pkg/client/unversioned/portforward.
[WARN] k8s.io/kubernetes/pkg/kubectl/resource appears to be a vendored package. Unable to update. Consider the '--update-vendored' flag.
[WARN] k8s.io/kubernetes/pkg/client/unversioned/portforward appears to be a vendored package. Unable to update. Consider the '--update-vendored' flag.
[INFO] Downloading dependencies. Please wait...
[INFO] Fetching updates for k8s.io/kubernetes/pkg/api/meta.
[INFO] Fetching updates for google.golang.org/grpc/metadata.
[WARN] k8s.io/kubernetes/pkg/api/meta appears to be a vendored package. Unable to update. Consider the '--update-vendored' flag.
[WARN] google.golang.org/grpc/metadata appears to be a vendored package. Unable to update. Consider the '--update-vendored' flag.
[INFO] Fetching updates for k8s.io/kubernetes/pkg/client/unversioned/fake.
[WARN] k8s.io/kubernetes/pkg/client/unversioned/fake appears to be a vendored package. Unable to update. Consider the '--update-vendored' flag.
[INFO] Setting version for github.com/Masterminds/semver to 1.1.0.
[INFO] Detected semantic version. Setting version for github.com/Masterminds/sprig to 2.2.0. And the relevant portion of - pkg/storage
- pkg/kubelet/qos
- pkg/master/ports
+ - pkg/api/testapi
+ - federation/apis/federation
+ - federation/apis/federation/install
+ - federation/apis/federation/v1alpha1
+- name: k8s.io/kubernetes/pkg/api
+ version: 9990f843cd62caa90445cf76b07d63ba7b5c86fd
+- name: k8s.io/kubernetes/pkg/client/unversioned/clientcmd
+ version: 9990f843cd62caa90445cf76b07d63ba7b5c86fd
+- name: k8s.io/kubernetes/pkg/client/unversioned/portforward
+ version: 9990f843cd62caa90445cf76b07d63ba7b5c86fd
+- name: k8s.io/kubernetes/pkg/client/unversioned/remotecommand
+ version: 9990f843cd62caa90445cf76b07d63ba7b5c86fd
+- name: k8s.io/kubernetes/pkg/kubectl/cmd/util
+ version: 9990f843cd62caa90445cf76b07d63ba7b5c86fd
+- name: k8s.io/kubernetes/pkg/kubectl/resource
+ version: 9990f843cd62caa90445cf76b07d63ba7b5c86fd
+- name: k8s.io/kubernetes/pkg/labels
+ version: 9990f843cd62caa90445cf76b07d63ba7b5c86fd |
- Fixes cases where dependency can end up on imports list multiple times - I think this fixes parsing top level packages even when now used
@technosophos fixed the broke thing. |
This is ready to be tested.
glide init
finds test dependencies.glide update
resolves their tree, unless flag opts-out, andglide install
will install them (unless opt-out flag is used).Note, test dependencies in vendor/ are not handled. Just those in local codebase.