Skip to content

Ignored packages are written to glide.lock #460

@zcahana

Description

@zcahana

Hello,

I'm using the ignore: directive in glide.yaml to mark some package to be ignored.
When running glide up, this package is not downloaded by glide, but still gets written into glide.lock.
Later on, when running glide install, glide tries to fetch the ignored package.

I've recreated this behavior using the following simple setup:

/home/zvic/Workspace/go/src/github.com/myorg
├── app
│   ├── glide.yaml
│   └── main.go
└── lib
    └── lib.go

The code at app/main.go imports github.com/myorg/lib.
The glide.yaml looks like this:

package: github.com/myorg/app
ignore:
- github.com/myorg/lib
import:
- package: github.com/Sirupsen/logrus

Running glide up within the app folder, yields the following glide.lock file:

hash: c48ff98414e4591f66688724450e9c1893ed5d5281b5c6c0cbf6422386d76040
updated: 2016-06-06T18:18:35.766520479+03:00
imports:
- name: github.com/myorg/lib
  version: ""
- name: github.com/Sirupsen/logrus
  version: f3cfb454f4c209e6668c95216c4744b8fddb2356
- name: golang.org/x/sys
  version: 076b546753157f758b316e59bcb51e6807c04057
  subpackages:
  - unix
devImports: []

Notably, the github.com/myorg/lib package is listed as an import.

P.S., I'm using glide 0.10.2, but also recreated this with 0.11.0-dev.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions