Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to go module, fix cli package reference #53

Merged
merged 1 commit into from
Dec 16, 2019

Conversation

amake
Copy link
Contributor

@amake amake commented Dec 7, 2019

Pull requests #50 and #52 opened up a can of worms:

  1. You are now using github.com/urfave/cli v2.0.0 but this is not reflected in the glide files, so for instance I have a hard time updating the MacPorts port because it's no longer clear what your dependencies are pinned to

  2. Trying to update the glide files fails because, as best I can tell, some dependencies have moved to the modern go module system, and glide can't understand it:

    % glide cc
    [INFO]	Glide cache has been cleared.
    % glide up
    [INFO]	Downloading dependencies. Please wait...
    [INFO]	--> Fetching gopkg.in/yaml.v2
    [INFO]	--> Fetching github.com/codegangsta/cli
    [INFO]	--> Fetching github.com/mattn/go-sqlite3
    [INFO]	--> Fetching golang.org/x/net
    [INFO]	--> Fetching github.com/andybalholm/cascadia
    [INFO]	Resolving imports
    [INFO]	--> Fetching github.com/urfave/cli
    [INFO]	--> Fetching github.com/cpuguy83/go-md2man
    [ERROR]	Error scanning github.com/cpuguy83/go-md2man/v2/md2man: cannot find package "." in:
        /Users/amake/.glide/cache/src/https-github.com-cpuguy83-go-md2man/v2/md2man
    [ERROR]	Failed to retrieve a list of dependencies: Error resolving imports
    
  3. The only reasonable solution seems to be moving this project to go modules as well. In that case, the import for github.com/urfave/cli needs to be corrected to "github.com/urfave/cli/v2".

This PR moves to the go module system and fixes the import path. I did it by

  1. Running go mod init, which knows how to migrate from glide
  2. Fixing the import path
  3. Running go mod tidy

@iwittkau
Copy link

iwittkau commented Dec 14, 2019

This would also help fixing the homebrew formula.

@iwittkau iwittkau mentioned this pull request Dec 14, 2019
@beauhoyt
Copy link

Hi @technosophos can you let us know what you think about this pull request. It would greatly help resolve issues we're having merging golang-1.13.5 in homebrew (Homebrew/homebrew-core#47510). Thanks~ ^_^

@technosophos
Copy link
Owner

Thanks for fixing this. I'm not a fan of Go modules, nor of the way the Go team managed this. But they are clearly unavoidable at this point. So I will move forward with them.

@technosophos technosophos merged commit 172c69f into technosophos:master Dec 16, 2019
@beauhoyt
Copy link

@technosophos Thanks man :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants