Re: [RFC PATCH 4/6] contrib/cgit-rs: add repo initialization and config access

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2024-08-07 at 23:14:43, Josh Steadmon wrote:
> Semi-relatedly, I was wondering if you might be able to answer a cargo /
> crates.io question: for a crate such as cgit-rs, which is not located in
> the root of its VCS repo, will cargo balk at downloading the full
> git.git worktree? Our build.rs expects the full Git source to be
> available at "../.." relative to the crate root. We've currently only
> tested consuming cgit-rs in JJ via a local path rather than through
> crates.io.

The documentation[0] says this:

  Cargo fetches the git repository at that location and traverses the
  file tree to find Cargo.toml file for the requested crate anywhere
  inside the git repository. For example, regex-lite and regex-syntax
  are members of rust-lang/regex repo and can be referred to by the
  repo’s root URL (https://github.com/rust-lang/regex.git) regardless of
  where in the file tree they reside.

If you want to test, you should be able to push it to a repository
somewhere, even if that's a local path, and specify like so to test:

----
[dependencies]
cgit-rs = { version = "0.1.0", git = "file:///path/to/git.git", branch = "cgit-rs" }
----

and see if it finds it.

[0] https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html
-- 
brian m. carlson (they/them or he/him)
Toronto, Ontario, CA

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux