Граф коммитов

3327 Коммитов

Автор SHA1 Сообщение Дата
Daniel Martí f13583b555 README: clarify deprecation and point to modules
See https://github.com/golang/go/issues/38158.
2020-09-05 14:34:46 +01:00
sam boyer 87f309484f
Update README to clarify project status
README: clarify current status of Go dependency management
2020-04-16 06:04:01 -04:00
Alberto Donizetti ac31146aa6
README: clarify current status of Go dependency management
This change amends the initial README section to make it clear that

- the Go project has officially adopted modules as the way to manage dependencies in Go;
- the Module System is no longer a prototype, and it's ready for production use.

Fixes  golang/go#35894
2020-02-03 14:45:02 +01:00
Sunny 5600de07d5
Merge pull request #2196 from anthonyfok/patch-1
Fix minor typo (caught by Lintian)
2019-08-16 21:46:09 +05:30
Anthony Fok 2cdb640ad1
Fix minor typo (caught by Lintian) 2019-08-07 04:52:37 -06:00
Kevin Burke 1f7c19e5f5
CHANGELOG: prepare for 0.5.4 release 2019-06-13 12:24:58 -07:00
Kevin Burke 753b47d20b
gps: pass correct arguments to "git clean"
Previously, the "-x" in

    git submodule foreach --recursive git clean -x

was being applied to the "git submodule" command not the "git clean"
command. git submodule foreach expects the inner command to be wrapped
in a single string, so pass git clean as a single string.

Verified this works as expected on the command line.

Originally submitted as #2164 by Daniele Rodina
<geaaru@sabayonlinux.org>, re-submitted by me to amend the commit and
merge immediately.

Fixes #2164.
Fixes #2168.
2019-06-13 11:27:55 -07:00
Kevin Burke 1a585d20a8
docs/Gopkg.toml.md: fix toml example
Previously the provided Gopkg.toml is not valid. Thanks @liurui-1 for
spotting the error.

Fixes #2174.
2019-06-13 09:53:49 -07:00
Kevin Burke 23b2e86204
hack,internal: fix staticcheck
The most recent version of staticcheck drops the "--ignore" flag in
favor of inline ignore directives, so we need to use those or fix on
the older version.

Good news is two of our ignore directives are now no longer needed.

Updates dominikh/go-tools#514.
Updates dominikh/go-tools#515.
Fixes #2178.
2019-06-13 09:16:50 -07:00
Kevin Burke 9fa5e4a5fc
README: fix link
Whoops! I think Github may rewrite relative links to be relative to
the project root.
2019-05-20 22:51:26 -07:00
Kevin Burke 821796cfc8
README: add note about seeking funding 2019-05-19 21:12:50 -07:00
Kevin Burke 192eb4499a
CHANGELOG: prepare for 0.5.3 release
Fixes #2160.
2019-05-13 08:32:58 -07:00
Kevin Burke 5025d70ef6
CHANGELOG: prepare for 0.5.2 release 2019-05-08 12:31:18 -07:00
Kevin Burke a6f1aa1bdb
gps: support loading credentials from a netrc file
This enables support for private gitlab files and other places where
the URL requires basic authentication.

Initial proposal and implementation came from Johnny
(github.com/wesgur).

Fixes #2061.
Fixes #1898.
2019-05-08 11:21:24 -07:00
Dmitri Shuralyov 21c40aae85
gps: ignore "mod" VCS type in parseMetaGoImports
Apply the same change as in golang.org/cl/175219 to this copy of the
parseMetaGoImports function, helping keep them in sync.

The "mod" type is not a real version control system (VCS), it applies
only when in module mode. Skip it and continue to consider only real
VCS types.

This resolves parseMetaGoImports returning a "multiple meta tags match
import path" error on packages that offer go-import meta tags with both
a true VCS and the "mod" type.

Reference: https://golang.org/cmd/go/#hdr-Remote_import_paths

Fixes #2151
2019-05-07 18:17:57 -04:00
Kevin Burke 66ec1e8481
README.md: update installation instructions
Fixes #2098.
Fixes #2086.
2019-04-09 22:32:38 -07:00
jmank88 15d9c449a0 upgrade toml import 2019-04-09 22:26:25 -07:00
Kevin Burke 1c9da2d3c1
travis.yml: Use correct filenames for arm (v6/7) release files
In January, #2102 was closed with 5ae9d8b to build ARMv6/7 binaries.
This seems to be working, but there are no release files uploaded to
Github for this architecture, because the wrong filenames are used in
.travis-ci. This PR fixes that.

It must be noted that the dep install script is already modified to
expect a ARMv6/7 binary in the Github releases, so it errors out on
404 instead of emitting a clear error message which it did before:

```
Fetching https://github.com/golang/dep/releases/download/v0.5.1/dep-linux-arm
Request failed with code 404
```

Originally submitted by Github user confiks as #2135.
2019-04-09 21:47:06 -07:00
Kevin Burke faa6189302
CHANGELOG: prepare for 0.5.1 release 2019-03-10 17:26:18 -07:00
Kevin Burke b1f5c9b3cd
docs: added missing word
Originally submitted by Matthew Cale as #2009. Submitting under my
commit to work around CLA issues. Matthew has signed the CLA.
2019-03-09 14:39:05 -08:00
Kevin Burke 9227ca6419
daily-dep.md: add missing quotes
Originally submitted by George Gabolaev <gabolaev98@gmail.com> as
PR #2017. George has signed the CLA.
2019-03-09 13:56:39 -08:00
Kevin Burke 11ef5ed67f
gps: replace redundant lambda wrapper with method value
Originally submitted by Iskander Sharipov, who has signed the CLA, as
https://github.com/golang/dep/pull/2029; submitting under my name to
get past the CLA bot.

Signed-off-by: Iskander Sharipov <quasilyte@gmail.com>
2019-03-09 12:13:28 -08:00
Cristhian Amaya 22bd06bb1f Add installation command for Fedora 2019-03-09 11:27:03 -08:00
Kevin Burke 5fc4cc89fc
gps: simplify `x = x <op> y` to `x <op>= y`
Simplify `x += 1` further to `x++`.

This was originally submitted by Iskander Sharipov, who's signed the
CLA, but the CLA bot is not letting me submit on his behalf, so I'm
submitting it.

Signed-off-by: Iskander Sharipov <quasilyte@gmail.com>
2019-03-09 10:37:49 -08:00
Kevin Burke da0cc0dba5
gps: better information for panic on nil version
Patch originally suggested by Denis Subbotin (denis@subbot.in),
submitting under my name to pass Go CLA bot checks.
2019-03-09 10:10:14 -08:00
Kevin Burke 8af3a37fb2
travis.yml: update to Go 1.12
Also fix the tests on tip, which broke because of the new Frames API
for error objects.
2019-03-04 10:00:38 -08:00
Oleg Schwann dfac376285 Added instruction for installing to Ubuntu by apt. 2019-03-04 09:23:57 -08:00
Xiang Dai 1066608457 delete all duplicate empty blanks
Signed-off-by: Xiang Dai <764524258@qq.com>
2019-03-03 18:08:20 -08:00
Tim Heckman e2709bef5f
Merge pull request #1979 from tariq1890/unit_tests
Adding Unit tests to increase coverage

Signed-off-by: Tim Heckman <t@heckman.io>
2019-02-28 10:03:58 -08:00
Iskander Sharipov 14bef7d1ca gps: simplify boolean expression
Signed-off-by: Iskander Sharipov <quasilyte@gmail.com>
2019-02-16 18:39:51 -08:00
tariqibrahim 3d0cccb0aa Merge branch 'master' into unit_tests 2019-02-09 13:15:16 -08:00
Karl Skewes 5ae9d8b3c2 feat(arm): Add build and install support for armv6 and arm64
On path to close #1807 on [oauth2_proxy arm support](https://github.com/pusher/oauth2_proxy/issues/16)

Tested:
- Building armv6 and arm64 binaries on amd64
- Running arm binaries
- Using armv6 binary on RPi 3B to build another project [oauth2_proxy](https://github.com/kskewes/oauth2_proxy/tree/build)
  (`dep ensure`)

Not verified:
- Install script completes as binaries not published, looks okay
though.
- `hack/test.bash` - must have missed something.

armv6 (RPi 3B):
```
karl@pi1:~/go/src/github.com/pusher/oauth2_proxy $ dep version
dep:
 version     : v0.5.0-31-g73b3afef-dirty
 build date  : 2019-02-01
 git hash    : 73b3afef
 go version  : go1.11.5
 go compiler : gc
 platform    : linux/arm
 features    : ImportDuringSolve=false

karl@pi1:~/go/src/github.com/pusher/oauth2_proxy $ make dep
dep ensure --vendor-only

karl@pi1:~/go/src/github.com/pusher/oauth2_proxy $ uname -m
armv7l

karl@pi1:~ $ ./install.sh
ARCH = arm
OS = linux
Will install into /home/karl/go/bin
Fetching https://github.com/golang/dep/releases/latest..
Release Tag = v0.5.0
Fetching https://github.com/golang/dep/releases/tag/v0.5.0..
Fetching https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-arm..
Request failed with code 404

karl@pi1:~ $ ./test.bash
go test: -race is only supported on linux/amd64, linux/ppc64le, freebsd/amd64, netbsd/amd64, darwin/amd64 and windows/amd64
```

arm64 (Rock64):
```
rock64@k8s-w-01:~$ ./dep-linux-arm64 version
dep:
 version     : v0.5.0-31-g73b3afef-dirty
 build date  : 2019-02-01
 git hash    : 73b3afef
 go version  : go1.11.5
 go compiler : gc
 platform    : linux/arm64
 features    : ImportDuringSolve=false

rock64@k8s-w-01:~$ uname -m
aarch64

rock64@k8s-w-01:~$ ./install.sh
ARCH = arm64
OS = linux
Will install into /home/rock64/go/bin
Fetching https://github.com/golang/dep/releases/latest..
Release Tag = v0.5.0
Fetching https://github.com/golang/dep/releases/tag/v0.5.0..
Fetching https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-arm64..
Request failed with code 404
```
2019-02-01 08:17:45 +13:00
Tim Heckman 73b3afefe4
Merge pull request #2070 from kevinburke/s390x-releases
install.sh: add s390x to the install script
2019-01-25 08:19:25 -08:00
Kevin Burke 5494240994
gps: kill entire child process group on failure
Previously, if dep tried to clone a repository over ssh that contained
zero padded file modes, dep would fail to clone and then hang. You can
reproduce this failure with the following .gitconfig:

    [url "git@github.com:"]
        insteadOf = https://github.com/

    [transfer]
        fsckobjects = true

    [fetch]
        fsckobjects = true

    [receive]
        fsckobjects = true

and the following Gopkg.toml. (It is not my intention to single out
this project - I searched Github for Go projects with zero padded file
mode errors, and found this one.)

    [[constraint]]
      name = "github.com/remogatto/gospeccy"
      branch = "master"

`dep ensure` hangs because the git clone operation spins up an `ssh`
process as a child process. `cmd.Process.Kill` kills the parent `git`
operation, but not the child `ssh` operation, so it's orphaned and we
don't return properly from the function. (It's unclear to me at this
point why the ssh operation did not return when it completed.)

By sending the negative Pgrp value to the Kill() function we can kill
the entire child process group, not just the "parent child." See
https://medium.com/@felixge/killing-a-child-process-and-all-of-its-children-in-go-54079af94773
for more information.

Updates #1257.
2019-01-23 15:07:46 -08:00
Kevin Burke 0f643b33ed
install.sh: build s390x and include it in releases list
Updates #2062.
2019-01-23 11:01:03 -08:00
Kevin Burke d3c1e41043
travis.yml, hack: fix tests on tip
The tip tests were failing due to the lack of a GOCACHE environment
variable, and bad defaults in tests where home directories did not
exist. Fix these by setting the GOCACHE to a place we know exists.

This and the Xenial fix combined allow us to re-enable the test suite,
e.g. to permit failures in the test suite to actually fail the build.

(We may still want to address the GOCACHE tests locally for users that
do not have a GOCACHE environment variable set; as it stands, they
still fail.)
2019-01-23 09:52:14 -08:00
Kevin Burke 38e4408a90
travis.yml: upgrade to Xenial
Older Ubuntus cause Mercurial connections to fail with this error:

Error on cloning hg repo: unable to get repository: warning:
connecting to bitbucket.org using legacy security technology (TLS
1.0); see https://mercurial-scm.org/wiki/SecureConnections for more
info
(using CA certificates from /etc/ssl/certs/ca-certificates.crt; if you
see this message, your Mercurial install is not properly configured;
see https://mercurial-scm.org/wiki/SecureConnections for how to
configure Mercurial to avoid this message)

Per
https://travis-ci.community/t/travis-ci-linux-build-environments-cant-clone-from-bitbucket-anymore-mercurial/1182/3,
the recommendation is to upgrade to Xenial, which has either a newer
Mercurial, a newer Python, a newer OpenSSL or some combination of
those.
2019-01-22 21:48:18 -08:00
Kevin Burke 88441ff72a
codeclimate.yml: disable go fmt check
The go fmt recommendation from Code Climate does not line up with the
go fmt recommendation on tip. Ignore it.
2019-01-22 20:56:47 -08:00
Kevin Burke 2b76d6ac87
Run latest gofmt on project
Gofmt in Go 1.11 beta 2 handles struct alignment differently, as
demonstrated in this diff. Running "make test" makes these same
whitespace changes to the files in question.
2019-01-22 09:43:34 -08:00
Matthew Cale eed36df857 Grammar and missing word fixes
Note: I also inserted the word "be" in another PR please note that this is a new instance of an omission of the same word
2019-01-22 09:34:17 -08:00
Benjamin Wuethrich d9e66f78e0 Fix two typos, s/dependences/dependencies/ 2019-01-22 08:55:57 -08:00
Kevin Burke b8c2189dd4
.travis.yml: only one YAML declaration
Previously we declared &simple-test twice, instead declare it once and
load it multiple times.
2019-01-21 22:40:58 -08:00
Kevin Burke a05c953e55
travis.yml: add bitbucket.org ssh keys to known_hosts
Otherwise some Mercurial functions hang with "Are you sure you want
to connect (y/n)" since we don't actually have a connection.

Updates #2089.
2019-01-21 21:59:19 -08:00
Kevin Burke 20a4f08a7a
gps/pkgtree: fix linter for +build declaration
Previously it would error with the following message:

gps/pkgtree/pkgtree.go:258:30: +build comment must appear before package clause and be followed by a blank line

The Go builder has no problem ignoring this declaration, but surround
it in quotes to be perfectly safe.
2019-01-21 21:59:19 -08:00
Kevin Burke 952f9d19c3
cmd/dep: disable GOCACHE=off env var
Setting GOCACHE=off causes an error in Go 1.12.
2019-01-21 21:59:19 -08:00
Kevin Burke a5440af88c
all: fix errors reported by lint 2019-01-21 21:59:19 -08:00
Kevin Burke f668d9d8df
travis.yml: update to Go 1.11.x
Previously, we would run Go 1.10.x.
2019-01-21 21:59:19 -08:00
Kevin Burke 1fdc37bfb9
hack: ignore Travis failures
When running the test runner or the test coverage runner, ignore
failures in a CI environment.

We need to fix the tests, too, but first we need to get the build back
to green so we can merge changes.

Updates #2089.
2019-01-21 21:59:19 -08:00
Iskander (Alex) Sharipov 22125cfaa6 cmd/dep: replace `len(x)<=0` with `len(x)==0` (#2031)
Length never returns negative values.

Signed-off-by: Iskander Sharipov <quasilyte@gmail.com>
2018-10-03 14:14:21 -05:00
sam boyer 3c04147ed4
Merge pull request #2002 from sdboyer/noverify-preserve-files
dep: Make noverify preserve excess vendor paths
2018-09-06 10:08:02 -04:00