Closed Bug 1629891 Opened 4 years ago Closed 4 years ago

mach vendor rust fails following spirv update

Categories

(Firefox Build System :: General, defect)

defect

Tracking

(firefox-esr68 unaffected, firefox75 unaffected, firefox76 unaffected, firefox77 fixed)

RESOLVED FIXED
mozilla77
Tracking Status
firefox-esr68 --- unaffected
firefox75 --- unaffected
firefox76 --- unaffected
firefox77 --- fixed

People

(Reporter: bbouvier, Assigned: kvark)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Bug 1624174 has broken mach vendor rust, which now causes the following error:

error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`

Caused by:
  failed to load source for a dependency on `spirv_cross`

Caused by:
  Unable to update https://github.com/kvark/spirv_cross?branch=wgpu2#f0c322e8

Caused by:
  failed to update submodule `spirv_cross/src/vendor/SPIRV-Cross`

Caused by:
  object not found - no match for id (1ee3a4eefb2d5716593eabb570762471d02da4b3); class=Odb (9); code=NotFound (-3)
Error running mach:

    ['vendor', 'rust']

The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.
You can invoke |./mach busted| to check if this issue is already on file. If it
isn't, please use |./mach busted file| to report it. If |./mach busted| is
misbehaving, you can also inspect the dependencies of bug 1543241.

If filing a bug, please include the full output of mach, including this error
message.

The details of the failure are as follows:

subprocess.CalledProcessError: Command '['/home/ben/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo', 'update', '-p', 'gkrust']' returned non-zero exit status 101.

  File "/home/ben/code/mozilla-inbound/python/mozbuild/mozbuild/mach_commands.py", line 1336, in vendor_rust
    vendor_command.vendor(**kwargs)
  File "/home/ben/code/mozilla-inbound/python/mozbuild/mozbuild/vendor_rust.py", line 364, in vendor
    subprocess.check_call([cargo, 'update', '-p', 'gkrust'], cwd=self.topsrcdir)
  File "/usr/lib/python3.7/subprocess.py", line 347, in check_call
    raise CalledProcessError(retcode, cmd)

It might be pointing to a stall commit.

Strangely, I was doing ./mach vendor rust yesterday without an issue. Will investigate.

Assignee: nobody → dmalyshau
Status: NEW → ASSIGNED

So, interestingly, I can still do ./mach vendor rust on m-c without issues. Could it be that Cargo is confused?
I wonder if you could remove the spirv-cross override, then do ./mach vendor rust, then re-add it and try it again?

Flags: needinfo?(bbouvier)

I wonder if you could remove the spirv-cross override, then do ./mach vendor rust, then re-add it and try it again?

No, I still reproduce the error after this, unfortunately.

Flags: needinfo?(bbouvier)

Fwiw, I still reproduce this issue with this patch. I have tried a few different things, like removing the branch specification in Cargo.toml and keeping only the rev (and conversely); upgrading cargo-vendor; upgrading the whole Rust toolchain; regenerating the Cargo.lock file. All of it with no success, so I'm a bit running out of ideas here...

Actually, this spirv crate references another git submodule, in this directory: https://github.com/kvark/spirv_cross/tree/wgpu2/spirv_cross/src/vendor

Could it be that mach vendor rust wouldn't init and update git submodules first, or not see the submodule? And maybe :kvark you did manually update it first, and this would explain why you can't reproduce this issue?

Benjamin, I updated the PR with a new revision and updated dependency code. It fixes it for me.

Pushed by dmalyshau@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2b1b331c56e6
Fix spirv-cross revision in root Cargo.toml overrides r=bbouvier
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: