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

Commit ee81dce

Browse files
adgjessfraz
authored andcommitted
rename 'hoard' to 'nest'
1 parent f939e06 commit ee81dce

File tree

14 files changed

+66
-66
lines changed

14 files changed

+66
-66
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Hoard
1+
# Nest
22

3-
Linux & OSX: [![Build Status](https://travis-ci.com/golang/hoard.svg?token=PbNwH1E9VppQaM7yAzpw&branch=master)](https://travis-ci.com/golang/hoard) | Windows: [![Build Status](https://ci.appveyor.com/api/projects/status/jbfsybf98lfrxccy?svg=true)](https://ci.appveyor.com/project/jessfraz/hoard)
3+
Linux & OSX: [![Build Status](https://travis-ci.com/golang/nest.svg?token=PbNwH1E9VppQaM7yAzpw&branch=master)](https://travis-ci.com/golang/hoard) | Windows: [![Build Status](https://ci.appveyor.com/api/projects/status/jbfsybf98lfrxccy?svg=true)](https://ci.appveyor.com/project/jessfraz/hoard)
44

5-
Hoard is a prototype dependency management tool.
5+
Nest is a prototype dependency management tool.
66

77
## Current status
88

@@ -25,20 +25,20 @@ Please see below for feedback and contribution guidelines.
2525
Get the tool via
2626

2727
```sh
28-
$ go get github.com/golang/hoard
28+
$ go get github.com/golang/nest
2929
```
3030

3131
Typical usage on a new repo might be
3232

3333
```sh
34-
$ hoard init
35-
$ hoard ensure -update
34+
$ nest init
35+
$ nest ensure -update
3636
```
3737

3838
To update a dependency to a new version, you might run
3939

4040
```sh
41-
$ hoard ensure github.com/pkg/errors@^0.8.0
41+
$ nest ensure github.com/pkg/errors@^0.8.0
4242
```
4343

4444
See the help text for much more detailed usage instructions.

analyzer_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
)
1313

1414
func TestDeriveManifestAndLock(t *testing.T) {
15-
dir, err := ioutil.TempDir("", "hoard")
15+
dir, err := ioutil.TempDir("", "nest")
1616
if err != nil {
1717
t.Fatal(err)
1818
}
@@ -56,7 +56,7 @@ func TestDeriveManifestAndLock(t *testing.T) {
5656
}
5757

5858
func TestDeriveManifestAndLockDoesNotExist(t *testing.T) {
59-
dir, err := ioutil.TempDir("", "hoard")
59+
dir, err := ioutil.TempDir("", "nest")
6060
if err != nil {
6161
t.Fatal(err)
6262
}

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: "{build}"
22

33
# Source Config
4-
clone_folder: c:\gopath\src\github.com\golang\hoard
4+
clone_folder: c:\gopath\src\github.com\golang\nest
55

66
# Build host
77

context.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func newContext() (*ctx, error) {
3636
}
3737

3838
func (c *ctx) sourceManager() (*gps.SourceMgr, error) {
39-
return gps.NewSourceManager(analyzer{}, filepath.Join(c.GOPATH, "pkg", "hoard"))
39+
return gps.NewSourceManager(analyzer{}, filepath.Join(c.GOPATH, "pkg", "nest"))
4040
}
4141

4242
// loadProject searches for a project root from the provided path, then loads
@@ -69,7 +69,7 @@ func (c *ctx) loadProject(path string) (*project, error) {
6969
mf, err := os.Open(mp)
7070
if err != nil {
7171
if os.IsNotExist(err) {
72-
// TODO: list possible solutions? (hoard init, cd $project)
72+
// TODO: list possible solutions? (nest init, cd $project)
7373
return nil, fmt.Errorf("no %v found in project root %v", manifestName, p.absroot)
7474
}
7575
// Unable to read the manifest file

context_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ func TestSplitAbsoluteProjectRoot(t *testing.T) {
3030

3131
tg.tempDir("src")
3232
tg.setenv("GOPATH", tg.path("."))
33-
hoardCtx := &ctx{GOPATH: tg.path(".")}
33+
nestCtx := &ctx{GOPATH: tg.path(".")}
3434

3535
importPaths := []string{
3636
"github.com/pkg/errors",
3737
"my/silly/thing",
3838
}
3939

4040
for _, ip := range importPaths {
41-
fullpath := filepath.Join(hoardCtx.GOPATH, "src", ip)
42-
pr, err := hoardCtx.splitAbsoluteProjectRoot(fullpath)
41+
fullpath := filepath.Join(nestCtx.GOPATH, "src", ip)
42+
pr, err := nestCtx.splitAbsoluteProjectRoot(fullpath)
4343
if err != nil {
4444
t.Fatal(err)
4545
}
@@ -49,7 +49,7 @@ func TestSplitAbsoluteProjectRoot(t *testing.T) {
4949
}
5050

5151
// test where it should return error
52-
pr, err := hoardCtx.splitAbsoluteProjectRoot("tra/la/la/la")
52+
pr, err := nestCtx.splitAbsoluteProjectRoot("tra/la/la/la")
5353
if err == nil {
5454
t.Fatalf("should have gotten error but did not for tra/la/la/la: %s", pr)
5555
}
@@ -61,7 +61,7 @@ func TestAbsoluteProjectRoot(t *testing.T) {
6161

6262
tg.tempDir("src")
6363
tg.setenv("GOPATH", tg.path("."))
64-
hoardCtx := &ctx{GOPATH: tg.path(".")}
64+
nestCtx := &ctx{GOPATH: tg.path(".")}
6565

6666
importPaths := map[string]bool{
6767
"github.com/pkg/errors": true,
@@ -75,7 +75,7 @@ func TestAbsoluteProjectRoot(t *testing.T) {
7575
}
7676

7777
for i, ok := range importPaths {
78-
pr, err := hoardCtx.absoluteProjectRoot(i)
78+
pr, err := nestCtx.absoluteProjectRoot(i)
7979
if ok {
8080
tg.must(err)
8181
expected := tg.path(filepath.Join("src", i))
@@ -92,7 +92,7 @@ func TestAbsoluteProjectRoot(t *testing.T) {
9292

9393
// test that a file fails
9494
tg.tempFile("src/thing/thing.go", "hello world")
95-
_, err := hoardCtx.absoluteProjectRoot("thing/thing.go")
95+
_, err := nestCtx.absoluteProjectRoot("thing/thing.go")
9696
if err == nil {
9797
t.Fatal("error should not be nil for a file found")
9898
}
@@ -107,7 +107,7 @@ func TestVersionInWorkspace(t *testing.T) {
107107

108108
tg.tempDir("src")
109109
tg.setenv("GOPATH", tg.path("."))
110-
hoardCtx := &ctx{GOPATH: tg.path(".")}
110+
nestCtx := &ctx{GOPATH: tg.path(".")}
111111

112112
importPaths := map[string]struct {
113113
rev gps.Version
@@ -134,7 +134,7 @@ func TestVersionInWorkspace(t *testing.T) {
134134
tg.runGit(repoDir, "checkout", info.rev.String())
135135
}
136136

137-
v, err := hoardCtx.versionInWorkspace(gps.ProjectRoot(ip))
137+
v, err := nestCtx.versionInWorkspace(gps.ProjectRoot(ip))
138138
tg.must(err)
139139

140140
if v != info.rev {

ensure.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,41 +35,41 @@ Package spec:
3535
3636
Examples:
3737
38-
hoard ensure Populate vendor from existing manifest and lock
39-
hoard ensure github.com/pkg/foo@^1.0.1 Update a specific dependency to a specific version
38+
nest ensure Populate vendor from existing manifest and lock
39+
nest ensure github.com/pkg/foo@^1.0.1 Update a specific dependency to a specific version
4040
41-
For more detailed usage examples, see hoard ensure -examples.
41+
For more detailed usage examples, see nest ensure -examples.
4242
`
4343
const ensureExamples = `
44-
hoard ensure
44+
nest ensure
4545
4646
Solve the project's dependency graph, and place all dependencies in the
4747
vendor folder. If a dependency is in the lock file, use the version
4848
specified there. Otherwise, use the most recent version that can satisfy the
4949
constraints in the manifest file.
5050
51-
hoard ensure -update
51+
nest ensure -update
5252
5353
Update all dependencies to the latest versions allowed by the manifest, ignoring
5454
any versions specified in the lock file. Update the lock file with any
5555
changes.
5656
57-
hoard ensure github.com/pkg/foo@^1.0.1
57+
nest ensure github.com/pkg/foo@^1.0.1
5858
5959
Constrain pkg/foo to the latest release matching >= 1.0.1, < 2.0.0, and
6060
place that release in the vendor folder. If a constraint was previously set
6161
in the manifest, this resets it. This form of constraint strikes a good
6262
balance of safety and flexibility, and should be preferred for libraries.
6363
64-
hoard ensure github.com/pkg/foo@~1.0.1
64+
nest ensure github.com/pkg/foo@~1.0.1
6565
6666
Same as above, but choose any release matching 1.0.x, preferring latest.
6767
68-
hoard ensure github.com/pkg/foo:git.internal.com/alt/foo
68+
nest ensure github.com/pkg/foo:git.internal.com/alt/foo
6969
7070
Fetch the dependency from a different location.
7171
72-
hoard ensure -override github.com/pkg/foo@^1.0.1
72+
nest ensure -override github.com/pkg/foo@^1.0.1
7373
7474
Forcefully and transitively override any constraint for this dependency.
7575
Overrides are powerful, but harmful in the long term. They should be used
@@ -105,12 +105,12 @@ func (cmd *ensureCommand) Run(args []string) error {
105105
return errors.New("Cannot pass -update and itemized project list (for now)")
106106
}
107107

108-
p, err := hoardContext.loadProject("")
108+
p, err := nestContext.loadProject("")
109109
if err != nil {
110110
return err
111111
}
112112

113-
sm, err := hoardContext.sourceManager()
113+
sm, err := nestContext.sourceManager()
114114
if err != nil {
115115
return err
116116
}

ensure_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func TestDeduceConstraint(t *testing.T) {
117117
}
118118

119119
func TestCopyFolder(t *testing.T) {
120-
dir, err := ioutil.TempDir("", "hoard")
120+
dir, err := ioutil.TempDir("", "nest")
121121
if err != nil {
122122
t.Fatal(err)
123123
}
@@ -178,7 +178,7 @@ func TestCopyFolder(t *testing.T) {
178178
}
179179

180180
func TestCopyFile(t *testing.T) {
181-
dir, err := ioutil.TempDir("", "hoard")
181+
dir, err := ioutil.TempDir("", "nest")
182182
if err != nil {
183183
t.Fatal(err)
184184
}

hoard_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ func init() {
2525
}
2626
}
2727

28-
// The TestMain function creates a hoard command for testing purposes and
28+
// The TestMain function creates a nest command for testing purposes and
2929
// deletes it after the tests have been run.
3030
// Most of this is taken from https://github.com/golang/go/blob/master/src/cmd/go/go_test.go and reused here.
3131
func TestMain(m *testing.M) {
32-
args := []string{"build", "-o", "testhoard" + exeSuffix}
32+
args := []string{"build", "-o", "testnest" + exeSuffix}
3333
out, err := exec.Command("go", args...).CombinedOutput()
3434
if err != nil {
35-
fmt.Fprintf(os.Stderr, "building testhoard failed: %v\n%s", err, out)
35+
fmt.Fprintf(os.Stderr, "building testnest failed: %v\n%s", err, out)
3636
os.Exit(2)
3737
}
3838

@@ -45,11 +45,11 @@ func TestMain(m *testing.M) {
4545
// those systems. Set CCACHE_DIR to cope. Issue 17668.
4646
os.Setenv("CCACHE_DIR", filepath.Join(home, ".ccache"))
4747
}
48-
os.Setenv("HOME", "/test-hoard-home-does-not-exist")
48+
os.Setenv("HOME", "/test-nest-home-does-not-exist")
4949

5050
r := m.Run()
5151

52-
os.Remove("testhoard" + exeSuffix)
52+
os.Remove("testnest" + exeSuffix)
5353

5454
os.Exit(r)
5555
}
@@ -164,12 +164,12 @@ func (tg *testgoData) doRun(args []string) error {
164164
}
165165
}
166166
}
167-
tg.t.Logf("running testhoard %v", args)
167+
tg.t.Logf("running testnest %v", args)
168168
var prog string
169169
if tg.wd == "" {
170-
prog = "./testhoard" + exeSuffix
170+
prog = "./testnest" + exeSuffix
171171
} else {
172-
prog = filepath.Join(tg.wd, "testhoard"+exeSuffix)
172+
prog = filepath.Join(tg.wd, "testnest"+exeSuffix)
173173
}
174174
args = append(args[:1], append([]string{"-v"}, args[1:]...)...)
175175
cmd := exec.Command(prog, args...)
@@ -504,7 +504,7 @@ func (tg *testgoData) readLock() string {
504504
}
505505

506506
func (tg *testgoData) getCommit(repo string) string {
507-
repoPath := tg.path("pkg/hoard/sources/https---" + strings.Replace(repo, "/", "-", -1))
507+
repoPath := tg.path("pkg/nest/sources/https---" + strings.Replace(repo, "/", "-", -1))
508508
cmd := exec.Command("git", "rev-parse", "HEAD")
509509
cmd.Dir = repoPath
510510
out, err := cmd.CombinedOutput()

init.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ but it will be solved-for, and will appear in the lock.
2828
2929
Note: init may use the network to solve the dependency graph.
3030
31-
Note: init does NOT vendor dependencies at the moment. See hoard ensure.
31+
Note: init does NOT vendor dependencies at the moment. See nest ensure.
3232
`
3333

3434
func (cmd *initCommand) Name() string { return "init" }
@@ -76,7 +76,7 @@ func (cmd *initCommand) Run(args []string) error {
7676
return fmt.Errorf("Invalid state: manifest %q does not exist, but lock %q does.", mf, lf)
7777
}
7878

79-
cpr, err := hoardContext.splitAbsoluteProjectRoot(root)
79+
cpr, err := nestContext.splitAbsoluteProjectRoot(root)
8080
if err != nil {
8181
return errors.Wrap(err, "determineProjectRoot")
8282
}
@@ -86,7 +86,7 @@ func (cmd *initCommand) Run(args []string) error {
8686
return errors.Wrap(err, "gps.ListPackages")
8787
}
8888
vlogf("Found %d dependencies.", len(pkgT.Packages))
89-
sm, err := hoardContext.sourceManager()
89+
sm, err := nestContext.sourceManager()
9090
if err != nil {
9191
return errors.Wrap(err, "getSourceManager")
9292
}
@@ -296,7 +296,7 @@ func getProjectData(pkgT gps.PackageTree, cpr string, sm *gps.SourceMgr) (projec
296296
vlogf("Package %q has import %q, analyzing...", v.P.ImportPath, ip)
297297

298298
dependencies[pr] = []string{ip}
299-
v, err := hoardContext.versionInWorkspace(pr)
299+
v, err := nestContext.versionInWorkspace(pr)
300300
if err != nil {
301301
notondisk[pr] = true
302302
vlogf("Could not determine version for %q, omitting from generated manifest", pr)
@@ -357,7 +357,7 @@ func getProjectData(pkgT gps.PackageTree, cpr string, sm *gps.SourceMgr) (projec
357357
// It's fine if the root does not exist - it indicates that this
358358
// project is not present in the workspace, and so we need to
359359
// solve to deal with this dep.
360-
r := filepath.Join(hoardContext.GOPATH, "src", string(pr))
360+
r := filepath.Join(nestContext.GOPATH, "src", string(pr))
361361
_, err := os.Lstat(r)
362362
if os.IsNotExist(err) {
363363
colors[pkg] = black
@@ -396,7 +396,7 @@ func getProjectData(pkgT gps.PackageTree, cpr string, sm *gps.SourceMgr) (projec
396396
// whether we're first seeing it here, in the transitive
397397
// exploration, or if it arose in the direct dep parts
398398
if _, in := ondisk[pr]; !in {
399-
v, err := hoardContext.versionInWorkspace(pr)
399+
v, err := nestContext.versionInWorkspace(pr)
400400
if err != nil {
401401
colors[pkg] = black
402402
notondisk[pr] = true

lock.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,14 @@ func (l *lock) MarshalJSON() ([]byte, error) {
134134
return buf.Bytes(), err
135135
}
136136

137-
// lockFromInterface converts an arbitrary gps.Lock to hoard's representation of a
138-
// lock. If the input is already hoard's *lock, the input is returned directly.
137+
// lockFromInterface converts an arbitrary gps.Lock to nest's representation of a
138+
// lock. If the input is already nest's *lock, the input is returned directly.
139139
//
140140
// Data is defensively copied wherever necessary to ensure the resulting *lock
141141
// shares no memory with the original lock.
142142
//
143143
// As gps.Solution is a superset of gps.Lock, this can also be used to convert
144-
// solutions to hoard's lock format.
144+
// solutions to nest's lock format.
145145
func lockFromInterface(in gps.Lock) *lock {
146146
if in == nil {
147147
return nil

0 commit comments

Comments
 (0)