Skip to content

Commit

Permalink
Changes from code review
Browse files Browse the repository at this point in the history
Revert a handful of substitutions
Remove gps/CONTRIBUTING.md (Can port/replace later)
Remove gps/README.md (Can port/replace later)

Original code review: golang#410 (review)
  • Loading branch information
krisnova committed Apr 21, 2017
1 parent 9c8c70c commit 94ba649
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 247 deletions.
6 changes: 0 additions & 6 deletions Gopkg.lock

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

4 changes: 0 additions & 4 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,3 @@
[[dependencies]]
name = "github.com/pkg/errors"
version = ">=0.8.0, <1.0.0"

[[dependencies]]
name = "github.com/golang/dep/gps"
version = ">=0.16.0, <1.0.0"
2 changes: 1 addition & 1 deletion analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (a Analyzer) DeriveManifestAndLock(path string, n gps.ProjectRoot) (gps.Man
return nil, nil, err
}
// TODO: No need to return lock til we decide about preferred versions, see
// https://github.com/golang/dep/gps/wiki/gps-for-Implementors#preferred-versions.
// https://github.com/sdboyer/gps/wiki/gps-for-Implementors#preferred-versions.
return m, nil, nil
}

Expand Down
67 changes: 0 additions & 67 deletions gps/CONTRIBUTING.md

This file was deleted.

115 changes: 0 additions & 115 deletions gps/README.md

This file was deleted.

76 changes: 38 additions & 38 deletions gps/deduce_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,51 +31,51 @@ func mkurl(s string) (u *url.URL) {
var pathDeductionFixtures = map[string][]pathDeductionFixture{
"github": []pathDeductionFixture{
{
in: "github.com/golang/dep/gps",
root: "github.com/golang/dep/gps",
in: "github.com/sdboyer/gps",
root: "github.com/sdboyer/gps",
mb: maybeSources{
maybeGitSource{url: mkurl("https://github.com/golang/dep/gps")},
maybeGitSource{url: mkurl("ssh://git@github.com/golang/dep/gps")},
maybeGitSource{url: mkurl("git://github.com/golang/dep/gps")},
maybeGitSource{url: mkurl("http://github.com/golang/dep/gps")},
maybeGitSource{url: mkurl("https://github.com/sdboyer/gps")},
maybeGitSource{url: mkurl("ssh://git@github.com/sdboyer/gps")},
maybeGitSource{url: mkurl("git://github.com/sdboyer/gps")},
maybeGitSource{url: mkurl("http://github.com/sdboyer/gps")},
},
},
{
in: "github.com/golang/dep/gps/foo",
root: "github.com/golang/dep/gps",
in: "github.com/sdboyer/gps/foo",
root: "github.com/sdboyer/gps",
mb: maybeSources{
maybeGitSource{url: mkurl("https://github.com/golang/dep/gps")},
maybeGitSource{url: mkurl("ssh://git@github.com/golang/dep/gps")},
maybeGitSource{url: mkurl("git://github.com/golang/dep/gps")},
maybeGitSource{url: mkurl("http://github.com/golang/dep/gps")},
maybeGitSource{url: mkurl("https://github.com/sdboyer/gps")},
maybeGitSource{url: mkurl("ssh://git@github.com/sdboyer/gps")},
maybeGitSource{url: mkurl("git://github.com/sdboyer/gps")},
maybeGitSource{url: mkurl("http://github.com/sdboyer/gps")},
},
},
{
// TODO(sdboyer) is this a problem for enforcing uniqueness? do we
// need to collapse these extensions?
in: "github.com/golang/dep/gps.git/foo",
root: "github.com/golang/dep/gps.git",
in: "github.com/sdboyer/gps.git/foo",
root: "github.com/sdboyer/gps.git",
mb: maybeSources{
maybeGitSource{url: mkurl("https://github.com/golang/dep/gps.git")},
maybeGitSource{url: mkurl("ssh://git@github.com/golang/dep/gps.git")},
maybeGitSource{url: mkurl("git://github.com/golang/dep/gps.git")},
maybeGitSource{url: mkurl("http://github.com/golang/dep/gps.git")},
maybeGitSource{url: mkurl("https://github.com/sdboyer/gps.git")},
maybeGitSource{url: mkurl("ssh://git@github.com/sdboyer/gps.git")},
maybeGitSource{url: mkurl("git://github.com/sdboyer/gps.git")},
maybeGitSource{url: mkurl("http://github.com/sdboyer/gps.git")},
},
},
{
in: "git@github.com:sdboyer/gps",
root: "github.com/golang/dep/gps",
mb: maybeGitSource{url: mkurl("ssh://git@github.com/golang/dep/gps")},
root: "github.com/sdboyer/gps",
mb: maybeGitSource{url: mkurl("ssh://git@github.com/sdboyer/gps")},
},
{
in: "https://github.com/golang/dep/gps",
root: "github.com/golang/dep/gps",
mb: maybeGitSource{url: mkurl("https://github.com/golang/dep/gps")},
in: "https://github.com/sdboyer/gps",
root: "github.com/sdboyer/gps",
mb: maybeGitSource{url: mkurl("https://github.com/sdboyer/gps")},
},
{
in: "https://github.com/golang/dep/gps/foo/bar",
root: "github.com/golang/dep/gps",
mb: maybeGitSource{url: mkurl("https://github.com/golang/dep/gps")},
in: "https://github.com/sdboyer/gps/foo/bar",
root: "github.com/sdboyer/gps",
mb: maybeGitSource{url: mkurl("https://github.com/sdboyer/gps")},
},
{
in: "github.com/sdboyer-/gps/foo",
Expand Down Expand Up @@ -127,30 +127,30 @@ var pathDeductionFixtures = map[string][]pathDeductionFixture{
in: "gopkg.in/sdboyer/gps.v0",
root: "gopkg.in/sdboyer/gps.v0",
mb: maybeSources{
maybeGopkginSource{opath: "gopkg.in/sdboyer/gps.v0", url: mkurl("https://github.com/golang/dep/gps"), major: 0},
maybeGopkginSource{opath: "gopkg.in/sdboyer/gps.v0", url: mkurl("ssh://git@github.com/golang/dep/gps"), major: 0},
maybeGopkginSource{opath: "gopkg.in/sdboyer/gps.v0", url: mkurl("git://github.com/golang/dep/gps"), major: 0},
maybeGopkginSource{opath: "gopkg.in/sdboyer/gps.v0", url: mkurl("http://github.com/golang/dep/gps"), major: 0},
maybeGopkginSource{opath: "gopkg.in/sdboyer/gps.v0", url: mkurl("https://github.com/sdboyer/gps"), major: 0},
maybeGopkginSource{opath: "gopkg.in/sdboyer/gps.v0", url: mkurl("ssh://git@github.com/sdboyer/gps"), major: 0},
maybeGopkginSource{opath: "gopkg.in/sdboyer/gps.v0", url: mkurl("git://github.com/sdboyer/gps"), major: 0},
maybeGopkginSource{opath: "gopkg.in/sdboyer/gps.v0", url: mkurl("http://github.com/sdboyer/gps"), major: 0},
},
},
{
in: "gopkg.in/sdboyer/gps.v0/foo",
root: "gopkg.in/sdboyer/gps.v0",
mb: maybeSources{
maybeGopkginSource{opath: "gopkg.in/sdboyer/gps.v0", url: mkurl("https://github.com/golang/dep/gps"), major: 0},
maybeGopkginSource{opath: "gopkg.in/sdboyer/gps.v0", url: mkurl("ssh://git@github.com/golang/dep/gps"), major: 0},
maybeGopkginSource{opath: "gopkg.in/sdboyer/gps.v0", url: mkurl("git://github.com/golang/dep/gps"), major: 0},
maybeGopkginSource{opath: "gopkg.in/sdboyer/gps.v0", url: mkurl("http://github.com/golang/dep/gps"), major: 0},
maybeGopkginSource{opath: "gopkg.in/sdboyer/gps.v0", url: mkurl("https://github.com/sdboyer/gps"), major: 0},
maybeGopkginSource{opath: "gopkg.in/sdboyer/gps.v0", url: mkurl("ssh://git@github.com/sdboyer/gps"), major: 0},
maybeGopkginSource{opath: "gopkg.in/sdboyer/gps.v0", url: mkurl("git://github.com/sdboyer/gps"), major: 0},
maybeGopkginSource{opath: "gopkg.in/sdboyer/gps.v0", url: mkurl("http://github.com/sdboyer/gps"), major: 0},
},
},
{
in: "gopkg.in/sdboyer/gps.v1/foo/bar",
root: "gopkg.in/sdboyer/gps.v1",
mb: maybeSources{
maybeGopkginSource{opath: "gopkg.in/sdboyer/gps.v1", url: mkurl("https://github.com/golang/dep/gps"), major: 1},
maybeGopkginSource{opath: "gopkg.in/sdboyer/gps.v1", url: mkurl("ssh://git@github.com/golang/dep/gps"), major: 1},
maybeGopkginSource{opath: "gopkg.in/sdboyer/gps.v1", url: mkurl("git://github.com/golang/dep/gps"), major: 1},
maybeGopkginSource{opath: "gopkg.in/sdboyer/gps.v1", url: mkurl("http://github.com/golang/dep/gps"), major: 1},
maybeGopkginSource{opath: "gopkg.in/sdboyer/gps.v1", url: mkurl("https://github.com/sdboyer/gps"), major: 1},
maybeGopkginSource{opath: "gopkg.in/sdboyer/gps.v1", url: mkurl("ssh://git@github.com/sdboyer/gps"), major: 1},
maybeGopkginSource{opath: "gopkg.in/sdboyer/gps.v1", url: mkurl("git://github.com/sdboyer/gps"), major: 1},
maybeGopkginSource{opath: "gopkg.in/sdboyer/gps.v1", url: mkurl("http://github.com/sdboyer/gps"), major: 1},
},
},
{
Expand Down
12 changes: 6 additions & 6 deletions gps/identifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ import (
// management domain has lots of different path-ish strings floating around:
//
// actual directories:
// /home/sdboyer/go/src/github.com/golang/dep/gps/example
// /home/sdboyer/go/src/github.com/sdboyer/gps/example
// URLs:
// https://github.com/golang/dep/gps
// https://github.com/sdboyer/gps
// import paths:
// github.com/golang/dep/gps/example
// github.com/sdboyer/gps/example
// portions of import paths that refer to a package:
// example
// portions that could not possibly refer to anything sane:
// github.com/sdboyer
// portions that correspond to a repository root:
// github.com/golang/dep/gps
// github.com/sdboyer/gps
//
// While not a panacea, having ProjectRoot allows gps to clearly indicate via
// the type system when a path-ish string must have particular semantics.
Expand All @@ -49,10 +49,10 @@ type ProjectRoot string
// These can be either a full URL, including protocol, or plain import paths.
// So, these are all valid data for Source:
//
// github.com/golang/dep/gps
// github.com/sdboyer/gps
// github.com/fork/gps
// git@github.com:sdboyer/gps
// https://github.com/golang/dep/gps
// https://github.com/sdboyer/gps
//
// With plain import paths, network addresses are derived purely through an
// algorithm. By having an explicit network name, it becomes possible to, for
Expand Down
Loading

0 comments on commit 94ba649

Please sign in to comment.