Coder Social home page Coder Social logo

Comments (19)

nabijaczleweli avatar nabijaczleweli commented on July 23, 2024

Hmmm, I guess we could basically do the same thing as we do now but through the git2 layer rather than raw FS.

4026 landed in nightly 5 days ago, so it'll land in stable like 4 weeks from that, or does cargo release on a different cycle than rustc?

from cargo-update.

ishitatsuyuki avatar ishitatsuyuki commented on July 23, 2024

It should land as 0.20.0, so 1 or 2 months. I think keeping the code in master until it hits stable is a good idea.

from cargo-update.

nabijaczleweli avatar nabijaczleweli commented on July 23, 2024

Eh, the difference between non-bare and bare is only the location of the repo itself (and IIRC git2 is smart enough to follow .git), so one can implement git2-based searching w/o breaking the current cargo.

from cargo-update.

pravic avatar pravic commented on July 23, 2024

nabijaczleweli closed this in 1ec0f2f 32 minutes ago

Doesn't work though:

cargo install-update -al
    Updating registry `https://github.com/rust-lang/crates.io-index`

Failed read master branch of registry repositry at
 $CARGO_HOME/registry/index/github.com-1ecc6299db9ec823.

from cargo-update.

nabijaczleweli avatar nabijaczleweli commented on July 23, 2024

Can you check that that directory is actually a git repository? It works for me, but

from cargo-update.

pravic avatar pravic commented on July 23, 2024
>ls $CARGO_HOME/registry/index/github.com-1ecc6299db9ec823
config  description  FETCH_HEAD  HEAD  hooks  info  objects  refs

from cargo-update.

nabijaczleweli avatar nabijaczleweli commented on July 23, 2024

Interesting, a manually-cloned bare repo works for me. Try replacing master with HEAD at main.rs#L57, maybe? Otherwise printing that error would work as well 🤔

from cargo-update.

pravic avatar pravic commented on July 23, 2024

error: Error { code: -3, klass: 4, message: "Revspec 'HEAD' not found." }.

from cargo-update.

nabijaczleweli avatar nabijaczleweli commented on July 23, 2024

And it's the same with master, I presume?

from cargo-update.

pravic avatar pravic commented on July 23, 2024

Yep

from cargo-update.

nabijaczleweli avatar nabijaczleweli commented on July 23, 2024

That's definitely interesting, but I can't see how I can do anything else than read master or HEAD (but probably `master)?

from cargo-update.

pravic avatar pravic commented on July 23, 2024

https://libgit2.github.com/libgit2/#HEAD/group/revparse
https://git-scm.com/docs/git-rev-parse.html#_specifying_revisions

You have to use an origin/master, I guess. Because it isn't a working copy and we have no master branch in it.
Works for me.

from cargo-update.

nabijaczleweli avatar nabijaczleweli commented on July 23, 2024

If that's the last thing then I'm gonna release it, if y'all have no objections?

from cargo-update.

pravic avatar pravic commented on July 23, 2024

I don't know. It seems, it works on nightly now, so I have no objections.
Have you checked on stable Rust?

from cargo-update.

nabijaczleweli avatar nabijaczleweli commented on July 23, 2024

I only use stable so yes.

from cargo-update.

nabijaczleweli avatar nabijaczleweli commented on July 23, 2024

Released in v1.0.0

from cargo-update.

durka avatar durka commented on July 23, 2024

I'm seeing this issue in v1.3.1.

durska:piston-image alex$ rustc -vV
rustc 1.22.0-beta.3 (cc6ed0640 2017-11-13)
binary: rustc
commit-hash: cc6ed0640fbcd2dff95b4532fd12aa0d6c545f28
commit-date: 2017-11-13
host: x86_64-apple-darwin
release: 1.22.0-beta.3
LLVM version: 4.0
durska:piston-image alex$ cargo -vV
cargo 0.23.0-beta (cee38cd30 2017-11-12)
release: 0.23.0
commit-hash: cee38cd30d16b343b13721ec813dc89eb1c1642d
commit-date: 2017-11-12
durska:piston-image alex$ cargo install-update -V
cargo-install-update 1.3.1
durska:piston-image alex$ cargo install-update -al
    Updating registry `https://github.com/rust-lang/crates.io-index`

Failed read master branch of registry repositry at /Users/alex/.cargo/registry/index/github.com-88ac128001ac3a9a.
durska:piston-image alex$ ls -al /Users/alex/.cargo/registry/index/github.com-88ac128001ac3a9a
total 0
drwxr-xr-x  3 alex  staff  102 Sep 20 00:15 .
drwxr-xr-x  4 alex  staff  136 Sep 20 00:15 ..
drwxr-xr-x  9 alex  staff  306 Oct 17 12:38 .git
durska:piston-image alex$ ls -al /Users/alex/.cargo/registry/index/github.com-88ac128001ac3a9a/.git
total 24
drwxr-xr-x  9 alex  staff  306 Oct 17 12:38 .
drwxr-xr-x  3 alex  staff  102 Sep 20 00:15 ..
-rw-r--r--  1 alex  staff   23 Sep 20 00:15 HEAD
-rw-r--r--  1 alex  staff  144 Sep 20 00:15 config
-rw-r--r--  1 alex  staff   73 Sep 20 00:15 description
drwxr-xr-x  3 alex  staff  102 Sep 20 00:15 hooks
drwxr-xr-x  3 alex  staff  102 Sep 20 00:15 info
drwxr-xr-x  4 alex  staff  136 Sep 20 00:15 objects
drwxr-xr-x  4 alex  staff  136 Sep 20 00:15 refs

from cargo-update.

durka avatar durka commented on July 23, 2024

The refs/heads directory is empty. This could be a problem.

from cargo-update.

durka avatar durka commented on July 23, 2024

The problem seems to be that it's reading the wrong index. github.com-88ac128001ac3a9a has a later modified date on the directory, but github.com-1ecc6299db9ec823 has newer files in it.

from cargo-update.

Related Issues (20)

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.