Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

--skip-updates flag to new #482

Closed
glycerine opened this issue Jun 22, 2017 · 2 comments
Closed

--skip-updates flag to new #482

glycerine opened this issue Jun 22, 2017 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@glycerine
Copy link

glycerine commented Jun 22, 2017

reference https://groups.google.com/forum/#!topic/golang-nuts/bCBCsSEQVCI

Suggestion: buffalo new may benefit from a --skip-updates flag -- if this error in fetching golang.org/x/tools turns out to be common. For the life of me, I can't figure out how to make buffalo new work on a friend's mac laptop. There's some kind of weird git misconfig going on that is causing buffalo new to fail during go get:

  $ buffalo new -v deal
Buffalo version v0.9.0

--> go get -u golang.org/x/tools/cmd/goimports
# cd /Users/jaten/go/src/golang.org/x/tools; git pull --ff-only
fatal: remote error: 


Invalid authentication credentials.

Please generate a new identifier:
  https://go.googlesource.com/new-password


package golang.org/x/tools/cmd/goimports: exit status 1
--> goimports -w .
Usage:
  buffalo new [name] [flags]

Flags:
      --api                  skip all front-end code and configure for an API server
      --ci-provider string   specify the type of ci file you would like buffalo to generate [none, travis, gitlab-ci] (default "none")
      --db-type string       specify the type of database you want to use [postgres, mysql, sqlite3] (default "postgres")
      --docker string        specify the type of Docker file to generate [none, multi, standard] (default "multi")
  -f, --force                delete and remake if the app already exists
  -h, --help                 help for new
      --skip-dep             skips adding github.com/golang/dep to your app
      --skip-pop             skips adding pop/soda to your app
      --skip-webpack         skips adding Webpack to your app
  -v, --verbose              verbosely print out the go get/install commands
      --with-yarn            allows the use of yarn instead of npm as dependency manager

Error: exit status 1

$ go get -u golang.org/x/tools/cmd/goimports
# cd /Users/jaten/go/src/golang.org/x/tools; git pull --ff-only
fatal: remote error: 


Invalid authentication credentials.

Please generate a new identifier:
  https://go.googlesource.com/new-password


package golang.org/x/tools/cmd/goimports: exit status 1
  $ 

There's a nice --skip-dep flag already, and as I already have golang.org/x/tools manually installed, I could get unstuck if I had a --skip-updates flag too, to avoid applying the -u during go get.

Update: there was a ~/.gitcookies file, referenced from ~/.gitconfig, that was messing things up. Still it would be nice not to force a go get -u on pinned packages.

@glycerine glycerine changed the title --skip-tools flag to new --skip-updates flag to new Jun 22, 2017
@glycerine
Copy link
Author

Add on thought: in order to be vendored-package friendly, it may be preferred that --skip-updates is actually the default. Doing a go get -u is rarely friendly to library that is pegged to a particular version for vendoring and compatibility reasons.

@stanislas-m stanislas-m added the enhancement New feature or request label Apr 19, 2018
@stanislas-m stanislas-m self-assigned this Aug 16, 2018
stanislas-m added a commit that referenced this issue Aug 17, 2018
* Install needed packages if necessary, but don't update them.
* When using dep, skip go get pop and its dependencies, use dep instead.

Fixes #482
stanislas-m added a commit that referenced this issue Aug 21, 2018
* Install needed packages if necessary, but don't update them.
* When using dep, skip go get pop and its dependencies, use dep instead.

Fixes #482
@stanislas-m
Copy link
Member

Fixed with #1236.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants