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

Support for git-installed packages #51

Closed
vorner opened this issue Sep 28, 2017 · 7 comments
Closed

Support for git-installed packages #51

vorner opened this issue Sep 28, 2017 · 7 comments

Comments

@vorner
Copy link

vorner commented Sep 28, 2017

Hello

Sometimes, I want to install a binary that is not on crates.io, or I want to keep on the very bleeding edge, so I install it with:

cargo install --git https://github.com/whatever/program

Now, it would be great if cargo update could also keep this thing up to date, by checking the installed hash or something and reinstall if master or other relevant branch moves forward.

However, I don't know if it is at all possible (eg. if the git hash is stored somewhere during the installation, for example).

@nabijaczleweli
Copy link
Owner

Do you have an example of a program that works for you, because error: failed to parse crate metadata is the only thing that happens when installing from git because :software:?

@vorner
Copy link
Author

vorner commented Sep 28, 2017

For example I just reinstalled alacritty this way:

cargo install -f --git https://github.com/jwilm/alacritty

What I would like now is that cargo install-update --all would update it whenever there are new commits in the repository.

@nabijaczleweli
Copy link
Owner

Righty-ho' cargo keeps having issues with parsing metadata for some reason :v

Can you provide (i.e. post) your ~/.cargo/.crates.toml, then?

@vorner
Copy link
Author

vorner commented Sep 29, 2017

Yes, of course, here it is:

[v1]
"alacritty 0.1.0 (git+https://github.com/jwilm/alacritty#5f7885749c4d7e48869b1fc0be4d430601cdbbfa)" = ["alacritty"]
"cargo-bundle 0.1.0 (git+https://github.com/burtonageo/cargo-bundle#e69b33ee00ba64a8efe36d2fb99418486d3bc16f)" = ["cargo-bundle"]
"cargo-check 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = ["cargo-check"]
"cargo-expand 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = ["cargo-expand"]
"cargo-outdated 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = ["cargo-outdated"]
"cargo-update 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = ["cargo-install-update", "cargo-install-update-config"]
"cargo-watch 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = ["cargo-watch"]
"clippy 0.0.165 (registry+https://github.com/rust-lang/crates.io-index)" = ["cargo-clippy"]
"compile-commands-post 0.1.0 (git+https://github.com/vorner/jsonrpc-param-ord#c9be6ebb397c473643f508a2be4fb325c6db6ed8)" = ["compile-commands-post"]
"jsonrpc-param-ord 0.1.0 (path+file:///home/vorner/prog/jsonrpc-param-ord/jsonrpc-param-ord)" = ["jsonrpc-param-ord"]
"pgz 0.1.0 (git+https://github.com/vorner/pgz#f7ea6361ad6afb7eb2abb9b9b7abcc04bc3ad171)" = ["pgz"]
"racer 2.0.10 (registry+https://github.com/rust-lang/crates.io-index)" = ["racer"]
"ripgrep 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = ["rg"]
"runner 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = ["runner"]
"rustfmt 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = ["cargo-fmt", "rustfmt"]
"svgbob_cli 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = ["svgbob"]
"xargo 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = ["xargo"]

@nabijaczleweli
Copy link
Owner

Can you try current master with 5065b28?

@vorner
Copy link
Author

vorner commented Sep 30, 2017

Thanks a lot, it seems to be doing something sane :-). I'll keep watching it just in case.

@nabijaczleweli
Copy link
Owner

Released in v1.3.0

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

No branches or pull requests

2 participants