Coder Social home page Coder Social logo

gogpm's People

Contributors

joho avatar mtibben avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gogpm's Issues

Add tests

We should aim for 100% test coverage

Doesn't show usage for badly provided flags

Attempted to get version using;
gogpm --version (bad command)
Output was:

flag provided but not defined: -adsljkfhaskld
Usage of gogpm:

Note no actual usage was printed.

Expected output (similar to gogpm alskjdlas):

gogpm is a tool for managing package dependency versions

gogpm leverages the power of the go get command and the underlying version
control systems used by it to set your Go dependencies to desired versions,
thus allowing easily reproducible builds in your Go projects.

A Godeps file in the root of your Go application is expected containing
the import paths of your packages and a specific tag or commit hash
from its version control system, an example Godeps file looks like this:

    $ cat Godeps
    # This is a comment
    github.com/nu7hatch/gotrail         v0.0.2
    github.com/replicon/fast-archiver   v1.02   #This is another comment!
    github.com/nu7hatch/gotrail         2eb79d1f03ab24bacbc32b15b75769880629a865


Usage:

    $ gogpm bootstrap [packages]    # Downloads all top-level packages required by the listed
                                    # import paths and generates a Godeps file with their
                                    # latest tags or revisions.
                                    # For more about specifying packages, see 'go help packages'.

    $ gogpm install                 # Parses the Godeps file, installs dependencies and sets
                                    # them to the appropriate version.

    $ gogpm version                 # Outputs version information

    $ gogpm help                    # Prints this message

`gogpm install` should be faster when no action is required

gogpm install is slow because it needs to discover the VCS of each listed package by making HTTP requests.

gogpm is currently using the the VCS discovery logic from go get which leads to this issue.

But could we determine the VCS without needing to touch the network?

gpm "guesses" the VCS by looking for .git .hg directories. But this is not technically correct because for example a git repo might actually have a .hg directory. Of course that is an edge-case, but it points to the fact that guessing could lead to unintended side effects.

I wonder if we should embed the VCS metadata in the Godeps file. For example something like:

bitbucket.org/liamstask/goose           hg:bb8240b815dff5719b11b1ef10b8f4430d3d6a05
code.google.com/p/go.text               hg:e4132d00dbd1
github.com/abh/geoip                    git:da130741c8ed2052f5f455d56e552f2e997e1ce9

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.