Skip to content
Snippets Groups Projects
Commit 42cde9f8 authored by Oliver Herms's avatar Oliver Herms
Browse files

Dep

parent e840086f
Branches
Tags
No related merge requests found
Showing
with 841 additions and 0 deletions
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
exclude_paths:
- vendor/
- gps/_testdata
- cmd/dep/testdata
- testdata
- gps/internal/pb
# Prevent problems comparing golden files on Windows
**/testdata/** text eol=lf
# general
* @sdboyer
# init
/cmd/dep/init* @carolynvs
/cmd/dep/gopath_scanner* @carolynvs
/cmd/dep/root_analyzer* @carolynvs
/cmd/dep/testdata/init @carolynvs
/cmd/dep/testdata/harness_tests/init @carolynvs
/internal/importers @carolynvs
/analyzer* @carolynvs
/testdata/analyzer @carolynvs
/internal/feedback @carolynvs
# ensure
/cmd/dep/ensure* @ibrasho
/cmd/dep/testdata/harness_tests/ensure** @ibrasho
# status
/cmd/dep/status* @darkowlzz
/cmd/dep/testdata/harness_tests/status** @darkowlzz
/cmd/dep/graphviz* @darkowlzz
# gps caching
/gps/source_cache* @jmank88
<!--
Thanks for filing an issue! If this is a question or feature request, just delete
everything here and write out the request, providing as much context as you can.
-->
### What version of `dep` are you using (`dep version`)?
<!--
If you installed `dep` via `go get`, report the version instead with
`cd $GOPATH/src/github.com/golang/dep && git describe --tags`
-->
### What `dep` command did you run?
<!--
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?
### What did you see instead?
<!--
Work-in-progress PRs are welcome as a way to get early feedback - just prefix
the title with [WIP].
Add the change in the changelog (except for test changes and docs updates).
Please edit CHANGELOG.md and add the change under the appropriate category (NEW
FEATURES, IMPROVEMENTS & BUG FIXES) along with the PR number.
-->
### What does this do / why do we need it?
### What should your reviewer look out for in this PR?
### Do you need help or clarification on anything?
### Which issue(s) does this PR fix?
<!--
fixes #
fixes #
-->
# dep project generated files to ignore
# if you want to ignore files created by your editor/tools,
# please consider a global .gitignore https://help.github.com/articles/ignoring-files
# please do not open a pull request to add something created by your editor or tools
/dep
/testdep
/dep.exe
/licenseok
/profile.out
/coverage.txt
language: go
sudo: false
notifications:
email: false
jobs:
include:
- stage: test
go_import_path: github.com/golang/dep
install:
- go get -u github.com/golang/lint/golint honnef.co/go/tools/cmd/megacheck
- npm install -g codeclimate-test-reporter
env:
- DEPTESTBYPASS501=1
os: linux
go: 1.9.x
script:
- go test -i ./...
- ./hack/lint.bash
- ./hack/validate-vendor.bash
- ./hack/validate-licence.bash
- ./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
stage: test
go_import_path: github.com/golang/dep
install: skip
env:
- DEPTESTBYPASS501=1
script: go test -race $(go list ./... | grep -v vendor)
- <<: *simple-test
go: tip
- <<: *simple-test
os: osx
go: 1.9.x
install:
# brew takes horribly long to update itself despite the above caching
# attempt; only bzr install if it's not on the $PATH
- test $(which bzr) || brew install bzr
env:
- HOMEBREW_NO_AUTO_UPDATE=1
- DEPTESTBYPASS501=1
script:
# OSX as of El Capitan sets an exit trap that interacts poorly with how
# travis seems to spawn these shells; if set -e is set, then it can cause
# build failures. We're not doing that here, but retain the trap statement
# 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
stage: deploy
go_import_path: github.com/golang/dep
install: skip
script: skip
before_deploy:
- ./hack/build-all.bash
deploy:
- provider: releases
api_key:
secure: fL9GX11J3JLizEBTPZHN32wuAT91eAJsGl0kjlAdIc6Lb/9UCe1XZGgFnpQFN4qo/S+omhHBDbM6Ty1xhNy7xmjDecpQGDU8Rmap9Oll0TuxqMigG+njOuPp5VUYPofPP0PGKdxAcYg+KaFM7x0o2rK+qA046NHwo2gH1BbE+bn55TZglEajEfc8j9iX4jt96KC7zlu+WiKArLmfUtlrI8m8ZYgbYcvFmlYjeCiEqlNhvNL59ejug9Rl0PLtPbamqVXkGLafYtekgPCb4WSxBiCt8pq5Rb5svk9YcdXpiaWQhZjMPAuKN6BrmN2lw1PiXzADUG5fjvNc8eo2HY70GD2utU9cAsY8VIafhoH5n6uM1WI8MHwDfd7P1PiQA3ZGQ8CPwk4q/8HSfQU9ap7vZgSF63pTIbtlviyIG67orOJE9PWWncl9olYM946UylZu6m3hWI/rmJxOeJ1UJjym/3GNPMRfKubaGhV/TyRdM0bKX4M0cXHU6k/ESVFupGXdKRt4RpvkD4/1Km6b2OShW6PNI+ifFspnJr7obkI7dm7ubySdnNz4lMv9WWymxRpMVc8hUAhuoDvXeZJq7pSnkjBEWDxIRoTkA93CU3/Rf7MFYCJMnGSqjcxWUpIfCAk2/r4BqL9NQnqBvvVt+MYi64QaD5n7ZF3dVbr6HZ2zjSU=
file:
- release/dep-linux-amd64
- release/dep-linux-amd64.sha256
- release/dep-darwin-amd64
- release/dep-darwin-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 source code refers to The Go Authors for copyright purposes.
# The master list of authors is in the main Go distribution,
# visible at http://tip.golang.org/AUTHORS.
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"analyzer.go",
"context.go",
"doc.go",
"lock.go",
"manifest.go",
"project.go",
"txn_writer.go",
],
importmap = "vendor/github.com/golang/dep",
importpath = "github.com/golang/dep",
visibility = ["//visibility:public"],
deps = [
"//vendor/github.com/golang/dep/gps:go_default_library",
"//vendor/github.com/golang/dep/gps/paths:go_default_library",
"//vendor/github.com/golang/dep/gps/pkgtree:go_default_library",
"//vendor/github.com/golang/dep/internal/fs:go_default_library",
"//vendor/github.com/pelletier/go-toml:go_default_library",
"//vendor/github.com/pkg/errors:go_default_library",
],
)
# (next version)
NEW FEATURES:
BUG FIXES:
IMPROVEMENTS:
# v0.4.1
BUG FIXES:
* Fix per-project prune option handling ([#1570](https://github.com/golang/dep/pull/1570))
# v0.4.0
NEW FEATURES:
* Add support for importing from [glock](https://github.com/robfig/glock) based projects. ([#1422](https://github.com/golang/dep/pull/1422)
* Add support for importing from [govendor](https://github.com/kardianos/govendor) based projects. ([#815](https://github.com/golang/dep/pull/815)
* Allow override of cache directory location using environment variable `DEPCACHEDIR`. ([#1234](https://github.com/golang/dep/pull/1234))
* Add support for template output in `dep status`. ([#1389](https://github.com/golang/dep/pull/1389)
* Each element in a multi-item TOML array is output on its own line. ([#1461](https://github.com/golang/dep/pull/1461)
BUG FIXES:
* Releases targeting Windows now have a `.exe` suffix. ([#1291](https://github.com/golang/dep/pull/1291)
* Adaptively recover from dirty and corrupted git repositories in cache. ([#1279](https://github.com/golang/dep/pull/1279)
* Suppress git password prompts in more places. ([#1357](https://github.com/golang/dep/pull/1357)
* Fix `-no-vendor` flag for `ensure -update`. ([#1361](https://github.com/golang/dep/pull/1361)
* Validate `git ls-remote` output and ignore all malformed lines. ([#1379](https://github.com/golang/dep/pull/1379)
* Support [gopkg.in version zero](http://labix.org/gopkg.in#VersionZero). ([#1243](https://github.com/golang/dep/pull/1243)
* Fix how dep status print revision constraints. ([#1421](https://github.com/golang/dep/pull/1421)
* Add optional `-v` flag to ensure sub command's syntax. ([#1458](https://github.com/golang/dep/pull/1458)
* Allow URLs containing ports in `Gopkg.toml` `source` fields. ([#1509](https://github.com/golang/dep/pull/1509)
IMPROVEMENTS:
* Log as dependencies are pre-fetched during dep init. ([#1176](https://github.com/golang/dep/pull/1176))
* Make the gps package importable. ([#1349](https://github.com/golang/dep/pull/1349))
* Improve file copy performance by not forcing a file sync. ([#1408](https://github.com/golang/dep/pull/1408)
* Skip empty constraints during import. ([#1414](https://github.com/golang/dep/pull/1349))
* Handle errors when writing status output. ([#1420](https://github.com/golang/dep/pull/1420))
* Add constraint for locked projects in `dep status`. ([#962](https://github.com/golang/dep/pull/962)
* Make external config importers error tolerant. ([#1315](https://github.com/golang/dep/pull/1315))
* Show LATEST and VERSION as the same type in status. ([#1515](https://github.com/golang/dep/pull/1515)
* Warn when [[constraint]] rules that will have no effect. ([#1534](https://github.com/golang/dep/pull/1534))
# v0.3.2
NEW FEATURES:
* Add support for importing from [gvt](https://github.com/FiloSottile/gvt)
and [gb](https://godoc.org/github.com/constabulary/gb/cmd/gb-vendor).
(#1149)
* Wildcard ignore support. (#1156)
* Disable SourceManager lock by setting `DEPNOLOCK` environment variable.
(#1206)
* `dep ensure -no-vendor -dry-run` now exits with an error when changes would
have to be made to `Gopkg.lock`. This is useful for CI. (#1256)
BUG FIXES:
* gps: Fix case mismatch error with multiple dependers. (#1233)
* Skip broken `vendor` symlink rather than returning an error. (#1191)
* Fix `status` shows incorrect reason for lock mismatch when ignoring packages.
(#1216)
IMPROVEMENTS:
* Allow `dep ensure -add` and `-update` when lock is out-of-sync. (#1225)
* gps: vcs: Dedupe git version list (#1212)
* gps: Add prune functions to gps. (#1020)
* gps: Skip broken vendor symlinks. (#1191)
* `dep ensure -add` now concurrently fetches the source and adds the projects.
(#1218)
* File name case check is now performed on `Gopkg.toml` and `Gopkg.lock`.
(#1114)
* gps: gps now supports pruning. (#1020)
* `dep ensure -update` now concurrently validates the passed project arguments.
Improving performance when updating dependencies with `-update`. (#1175)
* `dep status` now concurrently fetches repo info. Improving status performance.
(#1135)
* gps: Add SourceURLsForPath() to SourceManager. (#1166)
* gps: Include output in error. (#1180)
WIP:
* gps: Process canonical import paths. (#1017)
* gps: Persistent cache. (#1127, #1215)
# v0.3.1
* gps: Add satisfiability check for case variants (#1079)
* Validate Project Roots in manifest (#1116)
* gps: Properly separate sources for different gopkg.in versions & github
(#1132)
* gps: Add persistent BoltDB cache (#1098)
* gps: Increase default subcommand timeout to 30s (#1087)
* Fix importer [issue](https://github.com/golang/dep/issues/939) where the
importer would drop the imported version of a project (#1100)
* Import analyzer now always uses the same name, fixing the lock mismatch
immediately after dep init issue (#1099)
* Add support for importing from [govend](https://github.com/govend/govend)
(#1040) and [LK4D4/vndr](https://github.com/LK4D4/vndr) (#978) based projects
* gps: gps no longer assumes that every git repo has a HEAD (#1053)
* `os.Chmod` failures on Windows due to long path length has been fixed (#925)
* Add `version` command (#996)
* Drop support for building with go1.7 (#714)
* gps: Parse abbreviated git revisions (#1027)
* gps: Parallelize writing dep tree (#1021)
* `status` now shows the progress in verbose mode (#1009, #1037)
* Fix empty `Constraint` and `Version` in `status` json output (#976)
* `status` table output now shows override constraints (#918)
* gps: Display warning message every 15 seconds when lockfile is busy (#958)
* gps: Hashing directory tree and tree verification (#959)
* `ensure` now has `-vendor-only` mode to populate vendor/ without updating
Gopkg.lock (#954)
* Use fork of Masterminds/semver until
Masterminds/semver [issue#59](https://github.com/Masterminds/semver/issues/59)
is fixed upstream (#938)
* gps: Ensure packages are deducible before attempting to solve (#697)
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of
experience, nationality, personal appearance, race, religion, or sexual identity
and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, or to ban temporarily or permanently any
contributor for other behaviors that they deem inappropriate, threatening,
offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at sam (at) samboyer.org. All complaints
will be reviewed and investigated and will result in a response that is deemed
necessary and appropriate to the circumstances. The project team is obligated to
maintain confidentiality with regard to the reporter of an incident. Further
details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
# Contributing to `dep`
`dep` is an open source project.
It is the work of hundreds of contributors. We appreciate your help!
Keep an eye on the [Roadmap](https://github.com/golang/dep/wiki/Roadmap) for a summary of where the project is, and where we're headed.
## Filing issues
Please check the existing issues and [FAQ](docs/FAQ.md) to see if your feedback has already been reported.
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??
3. What `dep` command did you run?
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
on the issue in GitHub. This helps avoid multiple people unknowingly
working on the same issue.
Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html)
before sending patches.
The
[help wanted](https://github.com/golang/dep/issues?q=is%3Aissue+is%3Aopen+label%3A%22help%20wanted%22)
label highlights issues that are well-suited for folks to jump in on. The
[good first issue](https://github.com/golang/dep/issues?q=is%3Aissue+is%3Aopen+label%3A%22good%20first%20issue%22)
label further identifies issues that are particularly well-sized for newcomers.
Unless otherwise noted, the `dep` source files are distributed under
the BSD-style license found in the LICENSE file.
All submissions, including submissions by project members, require review. We
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`.
[GitHub Help]: https://help.github.com/articles/about-pull-requests/
## Contributor License Agreement
Contributions to this project must be accompanied by a Contributor License
Agreement. You (or your employer) retain the copyright to your contribution,
this simply gives us permission to use and redistribute your contributions as
part of the project. Head over to <https://cla.developers.google.com/> to see
your current agreements on file or to sign a new one.
You generally only need to submit a CLA once, so if you've already submitted one
(even if it was for a different project), you probably don't need to do it
again.
## Maintainer's Guide
`dep` has subsystem maintainers; this guide is intended for them in performing their work as a maintainer.
### 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!
* 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.
* Every new flag or option in the metadata files is more exposed surface area that demands conversion later. Only add these with a clear design plan.
* `dep` is experimental, but increasingly only on a larger scale. Experiments need clear hypotheses and parameters for testing - nothing off-the-cuff.
* Being a maintainer doesn't mean you're always right. Admitting when you've made a mistake keeps the code flowing, the environment health, and the respect level up.
* It's fine if you need to step back from maintainership responsibilities - just, please, don't fade away! Let other maintainers know what's going on.
### Issue management
* We use [Zenhub](https://www.zenhub.com) to manage the queue, in addition to what we do with labels.
* You will need to install [ZenHub extension](https://www.zenhub.com/extension) to your browser to show the board.
* Pipelines, and [the board](https://github.com/golang/dep#boards) are one thing we try to utilize:
* **New Issues Pipeline**: When someone creates a new issue, it goes here first. Keep an eye out for issues that fall into your area. Add labels to them, and if it's something we should do, put it in the `Backlog` pipeline. If you aren't sure, throw it in the `Icebox`. It helps to sort this pipeline by date.
* **Icebox Pipeline**: Issues that we aren't immediately closing but aren't really ready to be prioritized and started on. It's not a wontfix bucket, but a "not sure if we should/can fix right now" bucket.
* **Backlog Pipeline**: Issues that we know we want to tackle. You can drag/drop up and down to prioritize issues.
* 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%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.
### Pull Requests
* Try to make, and encourage, smaller pull requests.
* [No is temporary. Yes is forever.](https://blog.jessfraz.com/post/the-art-of-closing/)
* Long-running feature branches should generally be avoided. Discuss it with other maintainers first.
* Unless it's trivial, don't merge your own PRs - ask another maintainer.
* Commit messages should follow [Tim Pope's rules](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
* Checklist for merging PRs:
* Does the PR pass [the code review comments](https://github.com/golang/go/wiki/CodeReviewComments)? (internalize these rules!)
* Are there tests to cover new or changed behavior? Prefer reliable tests > no tests > flaky tests.
* Does the first post in the PR contain "Fixes #..." text for any issues it resolves?
* Are any necessary follow-up issues _already_ posted, prior to merging?
* Does this change entail the updating of any docs?
* For docs kept in the repo, e.g. FAQ.md, docs changes _must_ be submitted as part of the same PR.
# This source code was written by the Go contributors.
# The master list of contributors is in the main Go distribution,
# visible at http://tip.golang.org/CONTRIBUTORS.
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[[projects]]
branch = "parse-constraints-with-dash-in-pre"
name = "github.com/Masterminds/semver"
packages = ["."]
revision = "a93e51b5a57ef416dac8bb02d11407b6f55d8929"
source = "https://github.com/carolynvs/semver.git"
[[projects]]
name = "github.com/Masterminds/vcs"
packages = ["."]
revision = "3084677c2c188840777bff30054f2b553729d329"
version = "v1.11.1"
[[projects]]
branch = "master"
name = "github.com/armon/go-radix"
packages = ["."]
revision = "4239b77079c7b5d1243b7b4736304ce8ddb6f0f2"
[[projects]]
name = "github.com/boltdb/bolt"
packages = ["."]
revision = "2f1ce7a837dcb8da3ec595b1dac9d0632f0f99e8"
version = "v1.3.1"
[[projects]]
branch = "v2"
name = "github.com/go-yaml/yaml"
packages = ["."]
revision = "cd8b52f8269e0feb286dfeef29f8fe4d5b397e0b"
[[projects]]
branch = "master"
name = "github.com/golang/protobuf"
packages = ["proto"]
revision = "5afd06f9d81a86d6e3bb7dc702d6bd148ea3ff23"
[[projects]]
name = "github.com/jmank88/nuts"
packages = ["."]
revision = "8b28145dffc87104e66d074f62ea8080edfad7c8"
version = "v0.3.0"
[[projects]]
branch = "master"
name = "github.com/nightlyone/lockfile"
packages = ["."]
revision = "e83dc5e7bba095e8d32fb2124714bf41f2a30cb5"
[[projects]]
branch = "master"
name = "github.com/pelletier/go-toml"
packages = ["."]
revision = "b8b5e7696574464b2f9bf303a7b37781bb52889f"
[[projects]]
name = "github.com/pkg/errors"
packages = ["."]
revision = "645ef00459ed84a119197bfb8d8205042c6df63d"
version = "v0.8.0"
[[projects]]
branch = "master"
name = "github.com/sdboyer/constext"
packages = ["."]
revision = "836a144573533ea4da4e6929c235fd348aed1c80"
[[projects]]
branch = "master"
name = "golang.org/x/net"
packages = ["context"]
revision = "66aacef3dd8a676686c7ae3716979581e8b03c47"
[[projects]]
branch = "master"
name = "golang.org/x/sync"
packages = ["errgroup"]
revision = "f52d1811a62927559de87708c8913c1650ce4f26"
[[projects]]
branch = "master"
name = "golang.org/x/sys"
packages = ["unix"]
revision = "bb24a47a89eac6c1227fbcb2ae37a8b9ed323366"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
inputs-digest = "e70d26b359aed7af66f3393fc9d4985bbcf499c0b5ed3b5661a5912b4c71a32e"
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"
[[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"
[[constraint]]
name = "github.com/pkg/errors"
version = "0.8.0"
[[constraint]]
name = "github.com/boltdb/bolt"
version = "1.0.0"
[[constraint]]
name = "github.com/jmank88/nuts"
version = "0.3.0"
[[constraint]]
name = "github.com/golang/protobuf"
branch = "master"
[prune]
non-go = true
go-tests = true
unused-packages = true
Copyright (c) 2014 The Go Authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
General maintainers:
sam boyer (@sdboyer)
* dep
* `init` command: Carolyn Van Slyck (@carolynvs)
* `ensure` command: Ibrahim AshShohail (@ibrasho)
* `status` command: Sunny (@darkowlzz)
* testing harness: (vacant)
* gps
* solver: (vacant)
* source manager: (vacant)
* root deduction: (vacant)
* source/vcs interaction: (vacant)
* caching: Jordan Krage (@jmank88)
* pkgtree: (vacant)
* versions and constraints: (vacant)
Additional IP Rights Grant (Patents)
"This implementation" means the copyrightable works distributed by
Google as part of the Go project.
Google hereby grants to You a perpetual, worldwide, non-exclusive,
no-charge, royalty-free, irrevocable (except as stated in this section)
patent license to make, have made, use, offer to sell, sell, import,
transfer and otherwise run, modify and propagate the contents of this
implementation of Go, where such license applies only to those patent
claims, both currently owned or controlled by Google and acquired in
the future, licensable by Google that are necessarily infringed by this
implementation of Go. This grant does not include claims that would be
infringed only as a consequence of further modification of this
implementation. If you or your agent or exclusive licensee institute or
order or agree to the institution of patent litigation against any
entity (including a cross-claim or counterclaim in a lawsuit) alleging
that this implementation of Go or any code incorporated within this
implementation of Go constitutes direct or contributory patent
infringement, or inducement of patent infringement, then any patent
rights granted to you under this License for this implementation of Go
shall terminate as of the date such litigation is filed.
<p align="center"><img src="docs/assets/DigbyShadows.png" width="360"></p>
<p align="center">
<a href="https://travis-ci.org/golang/dep"><img src="https://travis-ci.org/golang/dep.svg?branch=master" alt="Build Status"></img></a>
<a href="https://ci.appveyor.com/project/golang/dep"><img src="https://ci.appveyor.com/api/projects/status/github/golang/dep?svg=true&branch=master&passingText=Windows%20-%20OK&failingText=Windows%20-%20failed&pendingText=Windows%20-%20pending" alt="Windows Build Status"></a>
<a href="https://goreportcard.com/report/github.com/golang/dep"><img src="https://goreportcard.com/badge/github.com/golang/dep" /></a>
</p>
## Dep
`dep` is a prototype dependency management tool for Go. It requires Go 1.8 or newer to compile. **`dep` is safe for production use.**
`dep` is the official _experiment_, but not yet the official tool. Check out the [Roadmap](https://github.com/golang/dep/wiki/Roadmap) for more on what this means!
For guides and reference materials about `dep`, see [the documentation](https://golang.github.io/dep).
## Installation
It is strongly recommended that you use a released version. Release binaries are available on the [releases](https://github.com/golang/dep/releases) page.
On MacOS you can install or upgrade to the latest released version with Homebrew:
```sh
$ brew install dep
$ brew upgrade dep
```
If you're interested in hacking on `dep`, you can install via `go get`:
```sh
go get -u github.com/golang/dep/cmd/dep
```
## Feedback
Feedback is greatly appreciated.
At this stage, the maintainers are most interested in feedback centered on the user experience (UX) of the tool.
Do you have workflows that the tool supports well, or doesn't support at all?
Do any of the commands have surprising effects, output, or results?
If not, please file an issue, describing what you did or wanted to do, what you expected to happen, and what actually happened.
## Contributing
Contributions are greatly appreciated.
The maintainers actively manage the issues list, and try to highlight issues suitable for newcomers.
The project follows the typical GitHub pull request model.
See [CONTRIBUTING.md](CONTRIBUTING.md) for more details.
Before starting any work, please either comment on an existing issue, or file a new one.
// Copyright 2016 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 dep
import (
"os"
"path/filepath"
"github.com/golang/dep/gps"
"github.com/golang/dep/internal/fs"
)
// Analyzer implements gps.ProjectAnalyzer.
type Analyzer struct{}
// HasDepMetadata determines if a dep manifest exists at the specified path.
func (a Analyzer) HasDepMetadata(path string) bool {
mf := filepath.Join(path, ManifestName)
fileOK, err := fs.IsRegular(mf)
return err == nil && fileOK
}
// DeriveManifestAndLock reads and returns the manifest at path/ManifestName or nil if one is not found.
// The Lock is always nil for now.
func (a Analyzer) DeriveManifestAndLock(path string, n gps.ProjectRoot) (gps.Manifest, gps.Lock, error) {
if !a.HasDepMetadata(path) {
return nil, nil, nil
}
f, err := os.Open(filepath.Join(path, ManifestName))
if err != nil {
return nil, nil, err
}
defer f.Close()
// Ignore warnings irrelevant to user.
m, _, err := readManifest(f)
if err != nil {
return nil, nil, err
}
return m, nil, nil
}
// Info returns Analyzer's name and version info.
func (a Analyzer) Info() gps.ProjectAnalyzerInfo {
return gps.ProjectAnalyzerInfo{
Name: "dep",
Version: 1,
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment