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

Update gps to v0.15.0 #361

Merged
merged 4 commits into from
Apr 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"os"
"path/filepath"

"github.com/Masterminds/semver"
"github.com/sdboyer/gps"
)

Expand Down Expand Up @@ -37,7 +36,6 @@ func (a analyzer) DeriveManifestAndLock(path string, n gps.ProjectRoot) (gps.Man
return m, nil, nil
}

func (a analyzer) Info() (string, *semver.Version) {
v, _ := semver.NewVersion("v0.0.1")
return "dep", v
func (a analyzer) Info() (string, int) {
return "dep", 1
}
3 changes: 2 additions & 1 deletion cmd/dep/ensure.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/golang/dep"
"github.com/pkg/errors"
"github.com/sdboyer/gps"
"github.com/sdboyer/gps/pkgtree"
)

const ensureShortHelp = `Ensure a dependency is safely vendored in the project`
Expand Down Expand Up @@ -123,7 +124,7 @@ func (cmd *ensureCommand) Run(ctx *dep.Ctx, args []string) error {
params.Trace = true
params.TraceLogger = log.New(os.Stderr, "", 0)
}
params.RootPackageTree, err = gps.ListPackages(p.AbsRoot, string(p.ImportRoot))
params.RootPackageTree, err = pkgtree.ListPackages(p.AbsRoot, string(p.ImportRoot))
if err != nil {
return errors.Wrap(err, "ensure ListPackage for project")
}
Expand Down
3 changes: 2 additions & 1 deletion cmd/dep/hash_in.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/golang/dep"
"github.com/pkg/errors"
"github.com/sdboyer/gps"
"github.com/sdboyer/gps/pkgtree"
)

func (cmd *hashinCommand) Name() string { return "hash-inputs" }
Expand Down Expand Up @@ -42,7 +43,7 @@ func (hashinCommand) Run(ctx *dep.Ctx, args []string) error {
return errors.Wrap(err, "determineProjectRoot")
}

params.RootPackageTree, err = gps.ListPackages(p.AbsRoot, cpr)
params.RootPackageTree, err = pkgtree.ListPackages(p.AbsRoot, cpr)
if err != nil {
return errors.Wrap(err, "gps.ListPackages")
}
Expand Down
9 changes: 5 additions & 4 deletions cmd/dep/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"github.com/golang/dep"
"github.com/pkg/errors"
"github.com/sdboyer/gps"
"github.com/sdboyer/gps/pkgtree"
)

const initShortHelp = `Initialize a new project with manifest and lock files`
Expand Down Expand Up @@ -89,7 +90,7 @@ func (cmd *initCommand) Run(ctx *dep.Ctx, args []string) error {
return errors.Wrap(err, "determineProjectRoot")
}
vlogf("Finding dependencies for %q...", cpr)
pkgT, err := gps.ListPackages(root, cpr)
pkgT, err := pkgtree.ListPackages(root, cpr)
if err != nil {
return errors.Wrap(err, "gps.ListPackages")
}
Expand Down Expand Up @@ -214,7 +215,7 @@ type projectData struct {
ondisk map[gps.ProjectRoot]gps.Version // projects that were found on disk
}

func getProjectData(ctx *dep.Ctx, pkgT gps.PackageTree, cpr string, sm *gps.SourceMgr) (projectData, error) {
func getProjectData(ctx *dep.Ctx, pkgT pkgtree.PackageTree, cpr string, sm *gps.SourceMgr) (projectData, error) {
constraints := make(gps.ProjectConstraints)
dependencies := make(map[gps.ProjectRoot][]string)
packages := make(map[string]bool)
Expand Down Expand Up @@ -285,7 +286,7 @@ func getProjectData(ctx *dep.Ctx, pkgT gps.PackageTree, cpr string, sm *gps.Sour
)

// cache of PackageTrees, so we don't parse projects more than once
ptrees := make(map[gps.ProjectRoot]gps.PackageTree)
ptrees := make(map[gps.ProjectRoot]pkgtree.PackageTree)

// depth-first traverser
var dft func(string) error
Expand Down Expand Up @@ -339,7 +340,7 @@ func getProjectData(ctx *dep.Ctx, pkgT gps.PackageTree, cpr string, sm *gps.Sour
ondisk[pr] = v
}

ptree, err = gps.ListPackages(r, string(pr))
ptree, err = pkgtree.ListPackages(r, string(pr))
if err != nil {
// Any error here other than an a nonexistent dir (which
// can't happen because we covered that case above) is
Expand Down
3 changes: 2 additions & 1 deletion cmd/dep/remove.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/golang/dep"
"github.com/pkg/errors"
"github.com/sdboyer/gps"
"github.com/sdboyer/gps/pkgtree"
)

const removeShortHelp = `Remove a dependency from the project`
Expand Down Expand Up @@ -61,7 +62,7 @@ func (cmd *removeCommand) Run(ctx *dep.Ctx, args []string) error {
return errors.Wrap(err, "determineProjectRoot")
}

pkgT, err := gps.ListPackages(p.AbsRoot, cpr)
pkgT, err := pkgtree.ListPackages(p.AbsRoot, cpr)
if err != nil {
return errors.Wrap(err, "gps.ListPackages")
}
Expand Down
5 changes: 3 additions & 2 deletions cmd/dep/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (

"github.com/golang/dep"
"github.com/sdboyer/gps"
"github.com/sdboyer/gps/pkgtree"
)

const statusShortHelp = `Report the status of the project's dependencies`
Expand Down Expand Up @@ -203,7 +204,7 @@ func runStatusAll(out outputter, p *dep.Project, sm *gps.SourceMgr) error {

// While the network churns on ListVersions() requests, statically analyze
// code from the current project.
ptree, err := gps.ListPackages(p.AbsRoot, string(p.ImportRoot))
ptree, err := pkgtree.ListPackages(p.AbsRoot, string(p.ImportRoot))
if err != nil {
return fmt.Errorf("analysis of local packages failed: %v", err)
}
Expand Down Expand Up @@ -368,7 +369,7 @@ func formatVersion(v gps.Version) string {
return v.String()
}

func collectConstraints(ptree gps.PackageTree, p *dep.Project, sm *gps.SourceMgr) map[string][]gps.Constraint {
func collectConstraints(ptree pkgtree.PackageTree, p *dep.Project, sm *gps.SourceMgr) map[string][]gps.Constraint {
// TODO
return map[string][]gps.Constraint{}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"memo": "63510efb9632ec69c1164ce396d7ebea4ad3884b4fa508373da17226d5a39739",
"memo": "4b36ae008ef4be09dee7e2ae00606d44fd75f4310fd0d0ef6e744690290569de",
"projects": [
{
"name": "github.com/sdboyer/deptest",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"memo": "1a99b419931283cb086167ddfb2e8322df12e2648e139eb27a42904360e962ad",
"memo": "e7725ea56516a42a641aaaf5d48754258d9f3c59949cb8a0e8a21b1ab6e07179",
"projects": [
{
"name": "github.com/sdboyer/deptest",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"memo": "70b47774699956441e395f458714b8e5800b54bebc73b046678245b9e1cfdc3b",
"memo": "8bca9526e654e56e05d9075d1f33fa5b649bf6d58aa7d71ca39e7fbea8468e07",
"projects": [
{
"name": "github.com/sdboyer/deptest",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"memo": "3ee7126505b016d4b9140dc3521b931380fd9d61fd1d1e6612d6b5b56b21baad",
"memo": "1b381263a360eafafe3ef7f9be626672668d17250a3c9a8debd169d1b5e2eebb",
"projects": [
{
"name": "github.com/sdboyer/deptest",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"commands": [
["init"],
["ensure", "-n", "-update", "github.com/sdboyer/deptest"]
]
],
"vendor-final": []
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"memo": "1792d407a795640a2b821b350f481bc48852535ed17c98cae2cbe2912a9c3e36",
"memo": "88d2718cda70cce45158f953d2c6ead79c1db38e67e9704aff72be8fddb096e7",
"projects": [
{
"name": "github.com/sdboyer/deptest",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"memo": "63510efb9632ec69c1164ce396d7ebea4ad3884b4fa508373da17226d5a39739",
"memo": "4b36ae008ef4be09dee7e2ae00606d44fd75f4310fd0d0ef6e744690290569de",
"projects": [
{
"name": "github.com/sdboyer/deptest",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"memo": "1792d407a795640a2b821b350f481bc48852535ed17c98cae2cbe2912a9c3e36",
"memo": "88d2718cda70cce45158f953d2c6ead79c1db38e67e9704aff72be8fddb096e7",
"projects": [
{
"name": "github.com/sdboyer/deptest",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"memo": "1a90a1bc14e6c5302e5c936186412f7e61e380a3b82afc54ea387f3a237843f8",
"memo": "d414dbf5fc668c1085effa68372d02e54b23d058cc66f9fd19ba094c6a946d9b",
"projects": [
{
"name": "github.com/sdboyer/deptest",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"memo": "ffb96eabfbb48ff1ae4f1ad2145a9e765f1e6aef7a3fbfd36a84ad875fcb3585",
"memo": "38d8431865759ee3bf28fbdfc464f98ee8b56319394ec717df45e9969544cfca",
"projects": [
{
"name": "github.com/sdboyer/deptest",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"memo": "1a90a1bc14e6c5302e5c936186412f7e61e380a3b82afc54ea387f3a237843f8",
"memo": "d414dbf5fc668c1085effa68372d02e54b23d058cc66f9fd19ba094c6a946d9b",
"projects": [
{
"name": "github.com/sdboyer/deptest",
Expand Down
15 changes: 9 additions & 6 deletions lock.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"memo": "fc012dfb266db9deec4121dd38069e2556ba66a5514939662da94fac1251996e",
"memo": "31a7162c06758e4619ed89b91e1f48bf94ad14f394bbee79299ed0bb5150e409",
"projects": [
{
"name": "github.com/Masterminds/semver",
Expand All @@ -11,8 +11,8 @@
},
{
"name": "github.com/Masterminds/vcs",
"version": "v1.8.0",
"revision": "fbe9fb6ad5b5f35b3e82a7c21123cfc526cbf895",
"version": "v1.11.0",
"revision": "795e20f901c3d561de52811fb3488a2cb2c8588b",
"packages": [
"."
]
Expand All @@ -35,10 +35,13 @@
},
{
"name": "github.com/sdboyer/gps",
"version": "v0.14.1",
"revision": "287edec9f4ca516577cc3ac9744068a34c4c7b08",
"version": "v0.15.0",
"revision": "b0f646b744e74543c094023d05339ffb82458e35",
"packages": [
"."
".",
"internal",
"internal/fs",
"pkgtree"
]
}
]
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"version": ">=0.8.0, <1.0.0"
},
"github.com/sdboyer/gps": {
"version": ">=0.14.0, <1.0.0"
"version": ">=0.15.0, <1.0.0"
}
}
}
9 changes: 6 additions & 3 deletions vendor/github.com/Masterminds/vcs/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 40 additions & 0 deletions vendor/github.com/Masterminds/vcs/CHANGELOG.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 41 additions & 0 deletions vendor/github.com/Masterminds/vcs/Makefile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions vendor/github.com/Masterminds/vcs/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading