qemu-devel
[Top][All Lists]
Advanced

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

Re: [RFC v3 13/32] rust: use vendored-sources


From: Marc-André Lureau
Subject: Re: [RFC v3 13/32] rust: use vendored-sources
Date: Wed, 8 Sep 2021 19:47:25 +0400

Hi

On Wed, Sep 8, 2021 at 7:40 PM Ian Jackson <iwj@xenproject.org> wrote:
marcandre.lureau@redhat.com writes ("[RFC v3 13/32] rust: use vendored-sources"):
> Most likely, QEMU will want tighter control over the sources, rather
> than relying on crates.io downloading, use a git submodule with all the
> dependencies. However, cargo --offline was added in 1.36.

Hi.

pm215 pointed me at this, as I have some background in Rust.
I definitely approve of having Rust in Qemu.  I don't have an opinion
about whether the sources should be vendored this way.

But, I tried to build this, and

    error: failed to select a version for the requirement `cc = "=1.0.70"`
    candidate versions found which didn't match: 1.0.69
    location searched: directory source `/volatile/rustcargo/Rustup/Qemu/qemu.pwt/rust/vendored` (which is replacing registry `crates-io`)
    required by package `nix v0.20.1`
        ... which is depended on by `qga v0.1.0 (/volatile/rustcargo/Rustup/Qemu/qemu.pwt/qga)`
    perhaps a crate was updated and forgotten to be re-vendored?
    As a reminder, you're using offline mode (--offline) which can sometimes cause surprising resolution failures, if this error is too confusing you may wish to retry without the offline flag.

I think the most important part here is to get the general APIs,
presented to general Rust code in Qemu, right.  So I wanted to review
those via the output from rustdoc.

I tried commenting out the `replace-with` in .cargo/config.toml
but evidently the systme isn't intended to be used that way.

Ian.


Hmm, I do "cargo vendor --versioned-dirs ../rust/vendored" to vendor crates.

It seems cc was updated, and I didn't update the submodule accordingly. For reference, this is the dependency tree that WFM:

$ cargo tree -p qga                            
qga v0.1.0 (/home/elmarco/src/qemu/qga)
├── common v0.1.0 (/home/elmarco/src/qemu/rust/common)
│   ├── libc v0.2.101
│   └── nix v0.20.1
│       ├── bitflags v1.2.1
│       ├── cfg-if v1.0.0
│       ├── libc v0.2.101
│       └── memoffset v0.6.4
│           [build-dependencies]
│           └── autocfg v1.0.1
├── hostname v0.3.1
│   ├── libc v0.2.101
│   └── match_cfg v0.1.0
└── nix v0.20.1 (*)


--
Marc-André Lureau

reply via email to

[Prev in Thread] Current Thread [Next in Thread]