Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

Installing not yet used packages #303

Closed
@Alexendoo

Description

@Alexendoo

go version go1.8 linux/amd64

I was starting a new project and decided to give dep a whirl, so this experience is from my first moments with the tool

I started with a noop main.go, ran dep init which produced an empty lock/manifest which seemed about right, then attempted dep ensure github.com/gorilla/mux which gave an error of sorts, with no packages being added to vendor/

dep: No constraint or alternate source specified for "github.com/gorilla/mux", omitting from manifest

So I attempted to manually specify a constraint: dep ensure github.com/gorilla/mux@^1.3.0 which gave no output but did add the dependency to the manifest. However no packages were added to vendor or the lock file.

With a bit of trial and error I found that I have to use the package in my project before it exists to have dep install it.

The main reason I want to install a package first as it allows editors to provide code completion, but it's also just habit from other tools/languages (npm, cargo, glide etc)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions