...
 
Commits (7)

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

engines:
version: "2"
checks:
argument-count:
enabled: false
complex-logic:
enabled: false
file-lines:
enabled: false
method-complexity:
enabled: false
method-count:
enabled: false
method-lines:
enabled: false
nested-control-flow:
enabled: false
return-statements:
enabled: false
similar-code:
enabled: false
identical-code:
enabled: false
plugins:
gofmt:
enabled: true
govet:
enabled: true
golint:
enabled: true
ratings:
paths:
- "**.go"
exclude_paths:
- vendor/
- internal/gps/_testdata
- gps/_testdata
- cmd/dep/testdata
- testdata
- internal/gps/internal/pb
- gps/internal/pb
......@@ -21,5 +21,8 @@
/cmd/dep/testdata/harness_tests/status** @darkowlzz
/cmd/dep/graphviz* @darkowlzz
# gps caching
/internal/gps/source_cache* @jmank88
# gps components
/gps/source* @jmank88
/gps/constraint* @jmank88
/gps/version* @jmank88
/gps/vcs* @jmank88
......@@ -17,8 +17,6 @@ everything here and write out the request, providing as much context as you can.
Paste the output of the commands you ran in here, making sure to pass -v for maximum context.
The output of `dep hash-inputs` may also be helpful to include.
-->
### What did you expect to see?
......
......@@ -8,3 +8,4 @@
/licenseok
/profile.out
/coverage.txt
release/
......@@ -7,34 +7,31 @@ jobs:
- stage: test
go_import_path: github.com/golang/dep
install:
- go get -u github.com/golang/lint/golint honnef.co/go/tools/cmd/megacheck
- make get-deps
- npm install -g codeclimate-test-reporter
env:
- DEPTESTBYPASS501=1
os: linux
go: 1.9.x
go: 1.10.x
script:
- go test -i ./...
- ./hack/lint.bash
- ./hack/validate-vendor.bash
- ./hack/validate-licence.bash
- make validate test
- ./hack/coverage.bash
after_success:
- codeclimate-test-reporter < coverage.txt
# YAML alias, for settings shared across the simpler builds
- &simple-test
go: 1.8.x
go: 1.9.x
stage: test
go_import_path: github.com/golang/dep
install: skip
env:
- DEPTESTBYPASS501=1
script: go test -race $(go list ./... | grep -v vendor)
script: make test
- <<: *simple-test
go: tip
- <<: *simple-test
os: osx
go: 1.9.x
go: 1.10.x
install:
# brew takes horribly long to update itself despite the above caching
# attempt; only bzr install if it's not on the $PATH
......@@ -49,8 +46,11 @@ jobs:
# for future safety.
# Related: https://superuser.com/questions/1044130/why-am-i-having-how-can-i-fix-this-error-shell-session-update-command-not-f
- trap EXIT
- go test -race ./...
- go: 1.9.x
- make test
- go: 1.10.x
# Run on OS X so that we get a CGO-enabled binary for this OS; see
# https://github.com/golang/dep/issues/1838 for more details.
os: osx
stage: deploy
go_import_path: github.com/golang/dep
install: skip
......@@ -66,10 +66,22 @@ jobs:
- release/dep-linux-amd64.sha256
- release/dep-darwin-amd64
- release/dep-darwin-amd64.sha256
- release/dep-windows-amd64
- release/dep-windows-amd64.sha256
- release/dep-freebsd-amd64
- release/dep-freebsd-amd64.sha256
- release/dep-windows-amd64.exe
- release/dep-windows-amd64.exe.sha256
- release/dep-linux-386
- release/dep-linux-386.sha256
- release/dep-darwin-386
- release/dep-darwin-386.sha256
- release/dep-freebsd-386
- release/dep-freebsd-386.sha256
- release/dep-windows-386.exe
- release/dep-windows-386.exe.sha256
skip_cleanup: true
on:
repo: golang/dep
branch: master
tags: true
addons:
ssh_known_hosts: github.com
This diff is collapsed.
......@@ -10,6 +10,10 @@ Keep an eye on the [Roadmap](https://github.com/golang/dep/wiki/Roadmap) for a s
Please check the existing issues and [FAQ](docs/FAQ.md) to see if your feedback has already been reported.
General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) or the [Gophers Slack #vendor channel](https://gophers.slack.com/messages/C0M5YP9LN/) instead of the issue tracker.
The gophers there will answer or ask you to file an issue if you've tripped over a bug.
For an invite to the Slack channel, [fill out this form](https://invite.slack.golangbridge.org/).
When [filing an issue](https://github.com/golang/dep/issues/new), make sure to answer these five questions:
1. What version of Go (`go version`) and `dep` (`git describe --tags`) are you using??
......@@ -17,9 +21,6 @@ When [filing an issue](https://github.com/golang/dep/issues/new), make sure to a
4. What did you expect to see?
5. What did you see instead?
General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker.
The gophers there will answer or ask you to file an issue if you've tripped over a bug.
## Contributing code
Let us know if you are interested in working on an issue by leaving a comment
......@@ -43,12 +44,24 @@ use GitHub pull requests for this purpose. Consult [GitHub Help] for more
information on using pull requests.
We check `dep`'s own `vendor` directory into git. For any PR to `dep` where you're
updating `Gopkg.toml`, make sure to run `dep ensure` and
([for now](https://github.com/golang/dep/issues/944)) `dep prune` and commit all
changes to `vendor`.
updating `Gopkg.toml`, make sure to run `dep ensure` and commit all changes to `vendor`.
[GitHub Help]: https://help.github.com/articles/about-pull-requests/
## Contributing to the Documentation
All the docs reside in the [`docs/`](docs/) directory. For any relatively small
change - like fixing a typo or rewording something - the easiest way to
contribute is directly on Github, using their web code editor.
For relatively big change - changes in the design, links or adding a new page -
the docs site can be run locally. We use [docusaurus](http://docusaurus.io/) to
generate the docs site. [`website/`](website/) directory contains all the
docusaurus configurations. To run the site locally, `cd` into `website/`
directory and run `npm i --only=dev` to install all the dev dependencies. Then
run `npm start` to start serving the site. By default, the site would be served
at http://localhost:3000.
## Contributor License Agreement
Contributions to this project must be accompanied by a Contributor License
......@@ -67,7 +80,7 @@ again.
### General guidelines
* _Be kind, respectful, and inclusive_. Really live [that CoC](https://github.com/golang/dep/blob/master/CODE_OF_CONDUCT.md). We've developed a reputation as one of the most welcoming and supportive project environments in the Go community, and we want to keep that up!
* _Be kind, respectful, and inclusive_. Really live that [CoC](https://github.com/golang/dep/blob/master/CODE_OF_CONDUCT.md). We've developed a reputation as one of the most welcoming and supportive project environments in the Go community, and we want to keep that up!
* The lines of responsibility between maintainership areas can be fuzzy. Get to know your fellow maintainers - it's important to work _with_ them when an issue falls in this grey area.
* Remember, the long-term goal of `dep` is to disappear into the `go` toolchain. That's going to be a challenging process, no matter what. Minimizing that eventual difficulty should be a guiding light for all your decisions today.
* Try to match the toolchain's assumptions as closely as possible ([example](https://github.com/golang/dep/issues/564#issuecomment-300994599)), and avoid introducing new rules the toolchain would later have to incorporate.
......@@ -87,7 +100,7 @@ again.
* Marking dependencies/blockers is also quite useful where appropriate; please do that.
* We use epics and milestones in roughly the same way (because OSS projects don't have real sprints). Epics should be duplicated as milestones; if there's a main epic issue, it should contain a checklist of the relevant issues to complete it.
* The `area:` labels correspond to maintainership areas. Apply yours to any issues or PRs that fall under your purview. It's to be expected that multiple `area:` labels may be applied to a single issue.
* The [`help-wanted`](https://github.com/golang/dep/issues?q=is%3Aissue+is%3Aopen+label%3Ahelp-wanted) and [`good-first-pr`](https://github.com/golang/dep/issues?q=is%3Aissue+is%3Aopen+label%3Agood-first-pr) labels are two of our most important tools for making the project accessible to newcomers - a key goal for our community. Here's how to use them well.
* The [`help wanted`](https://github.com/golang/dep/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) and [`good first issue`](https://github.com/golang/dep/labels/good%20first%20issue) labels are two of our most important tools for making the project accessible to newcomers - a key goal for our community. Here's how to use them well.
* `good-first-pr` should be applied when there's a very straightforward, self-contained task that is very unlikely to have any hidden complexity. The real purpose of these is to provide a "chink in the armor", providing newcomers a lens through which to start understanding the project.
* `help-wanted` should be applied to issues where there's a clear, stated goal, there is at most one significant question that needs answering, and it looks like the implementation won't be inordinately difficult, or disruptive to other parts of the system.
* `help-wanted` should also be applied to all `good-first-pr` issues - it's duplicative, but not doing so seems unfriendly.
......
......@@ -2,99 +2,133 @@
[[projects]]
branch = "parse-constraints-with-dash-in-pre"
branch = "2.x"
digest = "1:ee2887fecb4d923fa90f8dd9cf33e876bf9260fed62f2ca5a5c3f41b4eb07683"
name = "github.com/Masterminds/semver"
packages = ["."]
revision = "a93e51b5a57ef416dac8bb02d11407b6f55d8929"
source = "https://github.com/carolynvs/semver.git"
pruneopts = "NUT"
revision = "24642bd0573145a5ee04f9be773641695289be46"
[[projects]]
digest = "1:442020d26d1f891d5014cae4353b6ff589562c2b303504627de3660adf3fb217"
name = "github.com/Masterminds/vcs"
packages = ["."]
pruneopts = "NUT"
revision = "3084677c2c188840777bff30054f2b553729d329"
version = "v1.11.1"
[[projects]]
branch = "master"
digest = "1:60861e762bdbe39c4c7bf292c291329b731c9925388fd41125888f5c1c595feb"
name = "github.com/armon/go-radix"
packages = ["."]
pruneopts = "NUT"
revision = "4239b77079c7b5d1243b7b4736304ce8ddb6f0f2"
[[projects]]
digest = "1:a12d94258c5298ead75e142e8001224bf029f302fed9e96cd39c0eaf90f3954d"
name = "github.com/boltdb/bolt"
packages = ["."]
pruneopts = "NUT"
revision = "2f1ce7a837dcb8da3ec595b1dac9d0632f0f99e8"
version = "v1.3.1"
[[projects]]
branch = "v2"
name = "github.com/go-yaml/yaml"
packages = ["."]
revision = "cd8b52f8269e0feb286dfeef29f8fe4d5b397e0b"
[[projects]]
branch = "master"
digest = "1:9f35c1344b56e5868d511d231f215edd0650aa572664f856444affdd256e43e4"
name = "github.com/golang/protobuf"
packages = ["proto"]
revision = "5afd06f9d81a86d6e3bb7dc702d6bd148ea3ff23"
pruneopts = "NUT"
revision = "925541529c1fa6821df4e44ce2723319eb2be768"
version = "v1.0.0"
[[projects]]
digest = "1:f5169729244becc423886eae4d72547e28ac3f13f861bed8a9d749bc7238a1c3"
name = "github.com/jmank88/nuts"
packages = ["."]
revision = "a1e02c788669d022c325a8ee674f15360d7104f4"
version = "v0.2.0"
pruneopts = "NUT"
revision = "8b28145dffc87104e66d074f62ea8080edfad7c8"
version = "v0.3.0"
[[projects]]
branch = "master"
digest = "1:01af3a6abe28784782680e1f75ef8767cfc5d4b230dc156ff7eb8db395cbbfd2"
name = "github.com/nightlyone/lockfile"
packages = ["."]
pruneopts = "NUT"
revision = "e83dc5e7bba095e8d32fb2124714bf41f2a30cb5"
[[projects]]
name = "github.com/pelletier/go-buffruneio"
packages = ["."]
revision = "c37440a7cf42ac63b919c752ca73a85067e05992"
version = "v0.2.0"
[[projects]]
branch = "master"
digest = "1:51ea800cff51752ff68e12e04106f5887b4daec6f9356721238c28019f0b42db"
name = "github.com/pelletier/go-toml"
packages = ["."]
revision = "fe206efb84b2bc8e8cfafe6b4c1826622be969e3"
pruneopts = "NUT"
revision = "c01d1270ff3e442a8a57cddc1c92dc1138598194"
version = "v1.2.0"
[[projects]]
digest = "1:5cf3f025cbee5951a4ee961de067c8a89fc95a5adabead774f82822efabab121"
name = "github.com/pkg/errors"
packages = ["."]
pruneopts = "NUT"
revision = "645ef00459ed84a119197bfb8d8205042c6df63d"
version = "v0.8.0"
[[projects]]
branch = "master"
digest = "1:abb4b60c28323cde32c193ce6083bb600fac462d1780cf83461b4c23ed5ce904"
name = "github.com/sdboyer/constext"
packages = ["."]
pruneopts = "NUT"
revision = "836a144573533ea4da4e6929c235fd348aed1c80"
[[projects]]
branch = "master"
digest = "1:6ad2104db8f34b8656382ef0a7297b9a5cc42e7bdce95d968e02b92fc97470d1"
name = "golang.org/x/net"
packages = ["context"]
pruneopts = "NUT"
revision = "66aacef3dd8a676686c7ae3716979581e8b03c47"
[[projects]]
branch = "master"
digest = "1:39ebcc2b11457b703ae9ee2e8cca0f68df21969c6102cb3b705f76cca0ea0239"
name = "golang.org/x/sync"
packages = ["errgroup"]
pruneopts = "NUT"
revision = "f52d1811a62927559de87708c8913c1650ce4f26"
[[projects]]
branch = "master"
digest = "1:51912e607c5e28a89fdc7e41d3377b92086ab7f76ded236765dbf98d0a704c5d"
name = "golang.org/x/sys"
packages = ["unix"]
pruneopts = "NUT"
revision = "bb24a47a89eac6c1227fbcb2ae37a8b9ed323366"
[[projects]]
branch = "v2"
digest = "1:13e704c08924325be00f96e47e7efe0bfddf0913cdfc237423c83f9b183ff590"
name = "gopkg.in/yaml.v2"
packages = ["."]
pruneopts = "NUT"
revision = "d670f9405373e636a5a2765eea47fac0c9bc91a4"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
inputs-digest = "05c1cd69be2c917c0cc4b32942830c2acfa044d8200fdc94716aae48a8083702"
input-imports = [
"github.com/Masterminds/semver",
"github.com/Masterminds/vcs",
"github.com/armon/go-radix",
"github.com/boltdb/bolt",
"github.com/golang/protobuf/proto",
"github.com/jmank88/nuts",
"github.com/nightlyone/lockfile",
"github.com/pelletier/go-toml",
"github.com/pkg/errors",
"github.com/sdboyer/constext",
"golang.org/x/sync/errgroup",
"gopkg.in/yaml.v2",
]
solver-name = "gps-cdcl"
solver-version = 1
[[constraint]]
branch = "parse-constraints-with-dash-in-pre"
name = "github.com/Masterminds/semver"
source = "https://github.com/carolynvs/semver.git"
branch = "2.x"
[[constraint]]
name = "github.com/Masterminds/vcs"
version = "1.11.0"
[[constraint]]
branch = "v2"
name = "github.com/go-yaml/yaml"
[[constraint]]
branch = "master"
name = "github.com/pelletier/go-toml"
version = "1.1.0"
[[constraint]]
name = "github.com/pkg/errors"
......@@ -25,8 +20,9 @@
[[constraint]]
name = "github.com/jmank88/nuts"
version = "0.2.0"
version = "0.3.0"
[[constraint]]
name = "github.com/golang/protobuf"
branch = "master"
[prune]
non-go = true
go-tests = true
unused-packages = true
......@@ -9,9 +9,9 @@ General maintainers:
* testing harness: (vacant)
* gps
* solver: (vacant)
* source manager: (vacant)
* source manager: (@jmank88)
* root deduction: (vacant)
* source/vcs interaction: (vacant)
* source/vcs interaction: (@jmank88)
* caching: Jordan Krage (@jmank88)
* pkgtree: (vacant)
* versions and constraints: (vacant)
* versions and constraints: (@jmank88)
SHELL := /bin/bash
PLATFORM := $(shell go env GOOS)
ARCH := $(shell go env GOARCH)
GOPATH := $(shell go env GOPATH)
GOBIN := $(GOPATH)/bin
default: build validate test
get-deps:
go get -u golang.org/x/lint/golint honnef.co/go/tools/cmd/megacheck
build:
go fmt ./...
DEP_BUILD_PLATFORMS=$(PLATFORM) DEP_BUILD_ARCHS=$(ARCH) ./hack/build-all.bash
cp ./release/dep-$(PLATFORM)-$(ARCH) dep
licenseok:
go build -o licenseok ./hack/licenseok/main.go
validate: build licenseok
./dep check
./hack/lint.bash
./hack/validate-licence.bash
test: build
./hack/test.bash
install: build
cp ./dep $(GOBIN)
docusaurus:
docker run --rm -it -v `pwd`:/dep -p 3000:3000 \
-w /dep/website node \
bash -c "npm i --only=dev && npm start"
.PHONY: build validate test install docusaurus
This diff is collapsed.
......@@ -8,8 +8,8 @@ import (
"os"
"path/filepath"
"github.com/golang/dep/gps"
"github.com/golang/dep/internal/fs"
"github.com/golang/dep/internal/gps"
)
// Analyzer implements gps.ProjectAnalyzer.
......
......@@ -38,7 +38,7 @@ func TestAnalyzerDeriveManifestAndLock(t *testing.T) {
t.Fatal(err)
}
} else {
t.Fatalf("expected %s\n got %s", want, string(got))
t.Fatalf("(WNT):\n%s\n(GOT):\n%s", want, string(got))
}
}
......
version: "{build}"
# Source Config
clone_folder: c:\gopath\src\github.com\golang\dep
# Build host
......@@ -8,7 +9,7 @@ clone_folder: c:\gopath\src\github.com\golang\dep
environment:
GOPATH: c:\gopath
DEPTESTBYPASS501: 1
GOVERSION: 1.8
GOVERSION: 1.9
init:
- git config --global core.autocrlf input
......@@ -30,4 +31,4 @@ deploy: false
test_script:
- go build github.com/golang/dep/cmd/dep
- for /f "" %%G in ('go list github.com/golang/dep/... ^| find /i /v "/vendor/"') do ( go test %%G & IF ERRORLEVEL == 1 EXIT 1)
- for /f "" %%G in ('go list github.com/golang/dep/...') do ( go test %%G & IF ERRORLEVEL == 1 EXIT 1)
// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"bytes"
"flag"
"fmt"
"io/ioutil"
"log"
"os"
"path/filepath"
"sort"
"strings"
"github.com/golang/dep"
"github.com/golang/dep/gps"
"github.com/golang/dep/gps/verify"
"github.com/pkg/errors"
)
const checkShortHelp = `Check if imports, Gopkg.toml, and Gopkg.lock are in sync`
const checkLongHelp = `
Check determines if your project is in a good state. If problems are found, it
prints a description of each issue, then exits 1. Passing -q suppresses output.
Flags control which specific checks will be run. By default, dep check verifies
that Gopkg.lock is in sync with Gopkg.toml and the imports in your project's .go
files, and that the vendor directory is in sync with Gopkg.lock. These checks
can be disabled with -skip-lock and -skip-vendor, respectively.
(See https://golang.github.io/dep/docs/ensure-mechanics.html#staying-in-sync for
more information on what it means to be "in sync.")
If your workflow necessitates that you modify the contents of vendor, you can
force check to ignore hash mismatches on a per-project basis by naming
project roots in Gopkg.toml's "noverify" list.
`
type checkCommand struct {
quiet bool
skiplock, skipvendor bool
}
func (cmd *checkCommand) Name() string { return "check" }
func (cmd *checkCommand) Args() string {
return "[-q] [-skip-lock] [-skip-vendor]"
}
func (cmd