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

Workflow for contributing to a vendored package #706

Closed
krasi-georgiev opened this issue Jun 2, 2017 · 2 comments
Closed

Workflow for contributing to a vendored package #706

krasi-georgiev opened this issue Jun 2, 2017 · 2 comments
Labels

Comments

@krasi-georgiev
Copy link

krasi-georgiev commented Jun 2, 2017

Hi

The vendored packages don't seem to carry the .git metadata from the upstream.

I was wondering workflow do you use when package has a bug and I fix it locally (inside the vednored folder) and want to make a pull request.

@carolynvs
Copy link
Collaborator

Personally I do this:

  1. Delete the package from my vendor folder temporarily. I just leave the dep config files alone and don't run dep ensure for a bit.
  2. Work on the package in my GOPATH so that it's picked up automatically by the go tools.
  3. Once my fix is upstream, or I'm ready to vendor my fork, I tweak my manifest to either use the fork by running dep ensure, or update to the latest version upstream by running dep ensure -update X to repopulate my vendor.

Essentially I would recommend against ever working in your vendor directory since dep will overwrite any changes. It's too easy to lose work that way.

@carolynvs carolynvs added the docs label Jun 2, 2017
@ibrasho
Copy link
Collaborator

ibrasho commented Jun 15, 2017

Closing this since we've updated the FAQs in #755 to include an answer to this question.

@ibrasho ibrasho closed this as completed Jun 15, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants