This repository was archived by the owner on Sep 9, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1k
Use new gps capabilities during init's dep search #305
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
cmd/dep/testdata/harness_tests/init/skip-hidden/final/lock.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"memo": "63510efb9632ec69c1164ce396d7ebea4ad3884b4fa508373da17226d5a39739", | ||
"projects": [ | ||
{ | ||
"name": "github.com/sdboyer/deptest", | ||
"version": "v1.0.0", | ||
"revision": "ff2948a2ac8f538c4ecd55962e919d1e13e74baf", | ||
"packages": [ | ||
"." | ||
] | ||
} | ||
] | ||
} |
1 change: 1 addition & 0 deletions
1
cmd/dep/testdata/harness_tests/init/skip-hidden/final/manifest.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
19 changes: 19 additions & 0 deletions
19
cmd/dep/testdata/harness_tests/init/skip-hidden/initial/.foo/main.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright 2017 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 ( | ||
"fmt" | ||
|
||
"github.com/golang/notexist/foo" | ||
"github.com/sdboyer/deptestdos" | ||
) | ||
|
||
func main() { | ||
var x deptestdos.Bar | ||
y := foo.FooFunc() | ||
|
||
fmt.Println(x, y) | ||
} |
19 changes: 19 additions & 0 deletions
19
cmd/dep/testdata/harness_tests/init/skip-hidden/initial/_foo/main.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright 2017 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 ( | ||
"fmt" | ||
|
||
"github.com/golang/notexist/foo" | ||
"github.com/sdboyer/deptestdos" | ||
) | ||
|
||
func main() { | ||
var x deptestdos.Bar | ||
y := foo.FooFunc() | ||
|
||
fmt.Println(x, y) | ||
} |
13 changes: 13 additions & 0 deletions
13
cmd/dep/testdata/harness_tests/init/skip-hidden/initial/lib.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright 2017 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 foo | ||
|
||
import "github.com/sdboyer/deptest" | ||
|
||
func Foo() deptest.Foo { | ||
var y deptest.Foo | ||
|
||
return y | ||
} |
19 changes: 19 additions & 0 deletions
19
cmd/dep/testdata/harness_tests/init/skip-hidden/initial/testdata/main.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright 2017 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 ( | ||
"fmt" | ||
|
||
"github.com/golang/notexist/foo" | ||
"github.com/sdboyer/deptestdos" | ||
) | ||
|
||
func main() { | ||
var x deptestdos.Bar | ||
y := foo.FooFunc() | ||
|
||
fmt.Println(x, y) | ||
} |
8 changes: 8 additions & 0 deletions
8
cmd/dep/testdata/harness_tests/init/skip-hidden/testcase.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"commands": [ | ||
["init"] | ||
], | ||
"finalVendors": [ | ||
"github.com/sdboyer/deptest" | ||
] | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the change from Lstat to Stat?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because, unless I misunderstand how this all works, we could
Lstat
a symlink that exists, but its referent does not. In that case, the subsequent check ofos.IsNotExist()
would not have the desired effect - it would tell us the symlink exists, but what we really care about is the referent existing....At least, I think that's what I think we care about here. My latest explorations into symlinks, and what we should do/the toolchain currently does left me dizzy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good.