oxequa / realize

Realize is the #1 Golang Task Runner which enhance your workflow by automating the most common tasks and using the best performing Golang live reloading.
GNU General Public License v3.0
4.46k stars 232 forks source link

Change import path of cli package #261

Closed yyh-gl closed 4 years ago

yyh-gl commented 4 years ago

Overview

Issue is here.

Modifications

I changed import path of urfave/cli like below and fixed it.

Before: "gopkg.in/urfave/cli.v2" After: "github.com/urfave/cli/v2"

Test result

$ go test ./...
ok      github.com/yyh-gl/realize   (cached)
ok      github.com/yyh-gl/realize/realize   0.385s
endam commented 4 years ago

I also have same problem.

yyh-gl commented 4 years ago

This PR is merged to my forked project.

https://github.com/yyh-gl/realize

yyh-gl commented 4 years ago

@stanxing ↑

stanxing commented 4 years ago

➜ GO111MODULE="on" go get github.com/yyh-gl/realize@master
go: finding github.com/yyh-gl master
go: finding github.com/yyh-gl/realize master
go: finding github.com master
go: downloading github.com/yyh-gl/realize v2.0.3-0.20191210132048-e71a699d8784+incompatible
go: extracting github.com/yyh-gl/realize v2.0.3-0.20191210132048-e71a699d8784+incompatible
go: finding github.com/oxequa/realize v2.0.2+incompatible
go: finding github.com/urfave/cli v1.22.2
go: finding github.com/urfave/cli/v2 v2.0.0
go: finding github.com/oxequa/interact latest
go: downloading github.com/oxequa/realize v2.0.2+incompatible
go: downloading github.com/urfave/cli v1.22.2
go: downloading github.com/urfave/cli/v2 v2.0.0
go: downloading github.com/oxequa/interact v0.0.0-20171114182912-f8fb5795b5d7
go: extracting github.com/urfave/cli v1.22.2
go: extracting github.com/urfave/cli/v2 v2.0.0
go: extracting github.com/oxequa/interact v0.0.0-20171114182912-f8fb5795b5d7
go: extracting github.com/oxequa/realize v2.0.2+incompatible
go: finding github.com/fsnotify/fsnotify v1.4.7
go: downloading github.com/fsnotify/fsnotify v1.4.7
go: downloading github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d
go: downloading gopkg.in/yaml.v2 v2.2.2
go: finding github.com/go-siris/siris v7.4.0+incompatible
go: finding golang.org/x/net latest
go: finding github.com/labstack/echo v3.3.10+incompatible
go: finding github.com/fatih/color v1.7.0
go: extracting github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d
go: extracting gopkg.in/yaml.v2 v2.2.2
go: downloading github.com/russross/blackfriday/v2 v2.0.1
go: finding github.com/sirupsen/logrus v1.4.2
go: downloading github.com/labstack/echo v3.3.10+incompatible
go: extracting github.com/fsnotify/fsnotify v1.4.7
go: downloading github.com/go-siris/siris v7.4.0+incompatible
go: downloading github.com/fatih/color v1.7.0
go: downloading github.com/sirupsen/logrus v1.4.2
go: extracting github.com/russross/blackfriday/v2 v2.0.1
go: downloading github.com/shurcooL/sanitized_anchor_name v1.0.0
go: downloading golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553
go: extracting github.com/shurcooL/sanitized_anchor_name v1.0.0
go: extracting github.com/fatih/color v1.7.0
go: extracting github.com/sirupsen/logrus v1.4.2
go: extracting github.com/labstack/echo v3.3.10+incompatible
go: extracting github.com/go-siris/siris v7.4.0+incompatible
go: extracting golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553
go: finding gopkg.in/urfave/cli.v2 v2.0.0
go: downloading golang.org/x/sys v0.0.0-20190422165155-953cdadca894
go: downloading github.com/konsorten/go-windows-terminal-sequences v1.0.1
go: downloading golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
go: finding github.com/satori/go.uuid v1.2.0
go: extracting github.com/konsorten/go-windows-terminal-sequences v1.0.1
go: finding github.com/mattn/go-colorable v0.1.4
go: finding github.com/labstack/gommon v0.3.0
go: finding github.com/mattn/go-isatty v0.0.10
go: finding github.com/valyala/fasttemplate v1.1.0
go: finding github.com/dgrijalva/jwt-go v3.2.0+incompatible
go: downloading github.com/satori/go.uuid v1.2.0
go: downloading github.com/labstack/gommon v0.3.0
go: downloading github.com/dgrijalva/jwt-go v3.2.0+incompatible
go: downloading github.com/mattn/go-colorable v0.1.4
go: downloading github.com/valyala/fasttemplate v1.1.0
go: downloading github.com/mattn/go-isatty v0.0.10
go: extracting github.com/satori/go.uuid v1.2.0
go: extracting github.com/dgrijalva/jwt-go v3.2.0+incompatible
go: extracting github.com/mattn/go-colorable v0.1.4
go: extracting github.com/labstack/gommon v0.3.0
go: extracting github.com/mattn/go-isatty v0.0.10
go: extracting github.com/valyala/fasttemplate v1.1.0
go: extracting golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
go: extracting golang.org/x/sys v0.0.0-20190422165155-953cdadca894
go: downloading github.com/valyala/bytebufferpool v1.0.0
go: downloading golang.org/x/sys v0.0.0-20191008105621-543471e840be
go: extracting github.com/valyala/bytebufferpool v1.0.0
go: extracting golang.org/x/sys v0.0.0-20191008105621-543471e840be
go: finding github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d
go: finding github.com/russross/blackfriday/v2 v2.0.1
go: finding golang.org/x/sys v0.0.0-20191008105621-543471e840be
go: finding gopkg.in/yaml.v2 v2.2.2
go: finding github.com/shurcooL/sanitized_anchor_name v1.0.0
go: finding golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
go: finding github.com/valyala/bytebufferpool v1.0.0
build github.com/yyh-gl/realize: cannot load gopkg.in/urfave/cli.v2: cannot find module providing package gopkg.in/urfave/cli.v2

Still don't work...

my go version is go1.13.4
yyh-gl commented 4 years ago

@stanxing Is Your branch latest one? If you use latest branch, import path is github.com/urfave/cli/v2 not gopkg.in/urfave/cli.v2.

Please check your branch :)

stanxing commented 4 years ago

@stanxing Is Your branch latest one? If you use latest branch, import path is github.com/urfave/cli/v2 not gopkg.in/urfave/cli.v2.

Please check your branch :)

Look at the output above, GO111MODULE="on" go get github.com/yyh-gl/realize@master , I specified the master version in go get command

anything wrong with me?

yyh-gl commented 4 years ago

@stanxing

Sorry, I found a my mistake. And already I fix it. Please try again. → ~https://github.com/yyh-gl/realize/pull/2~ https://github.com/yyh-gl/realize/pull/6

igtm commented 4 years ago

Looks good to me. Any plan to merge this??

yyh-gl commented 4 years ago

I think this project is not updated recently. So, this PR will probably not be merged.

I'm using forked project now. https://github.com/yyh-gl/realize

My repository (master branch) contains this PR already.

yyh-gl commented 4 years ago

This PR has an issue below.

dep ensure is not work good.

$ dep ensure
The following issues were found in Gopkg.toml:

  ✗ the name for "github.com/urfave/cli/v2" should be changed to "github.com/urfave/cli"

ProjectRoot name validation failed

I change the name from "github.com/urfave/cli/v2" to "github.com/urfave/cli". This does not work too.

Does anyone know the solution?

yyh-gl commented 4 years ago

I understand. https://github.com/oxequa/realize/pull/231

mingrammer commented 4 years ago

Same here

inductor commented 4 years ago

@Asoseil Please have a look at this

yyh-gl commented 4 years ago

I submitted new PR https://github.com/oxequa/realize/pull/265.

I think new one is a better fix than this PR. So, I close this PR.