Skip to content
This repository was archived by the owner on Apr 15, 2026. It is now read-only.
This repository was archived by the owner on Apr 15, 2026. It is now read-only.

bug: changing repo URL does not do fresh clone #65

Open

Description

@149segolte

When testing different rust-gpu builds by setting spirv_builder_source to different repo URLs the cli fails with error:

[2025-04-09T17:48:43Z ERROR cargo_gpu] running spirv cli

    Caused by:
        0: get_rust_gpu_deps_from_shader
        1: couldn't checkout revision 'ffa710b8623a3fd2bd439757df77f2e8150c4955' of `rust-gpu` at /home/one49segolte/.cache/rust-gpu/rust-gpu-repo/https___github_com_LegNeato_rust-gpu+ffa710b8623a3fd2bd439757df77f2e8150c4955
Error: running spirv cli

Initially I was using spirv_builder_source = "https://github.com/Rust-GPU/rust-gpu" then I switched to spirv_builder_source = "https://github.com/LegNeato/rust-gpu" but it tried to duplicate the previous repo's folder and failed to find the revision ffa710b8623a3fd2bd439757df77f2e8150c4955 which exists at the new URL not the previous one.

Activity

  1. tombh commented on Apr 9, 2025

    @tombh
    Collaborator

    I wonder if the "force" arg helps here? Eg: cargo gpu --force-spirv-cli-rebuild. And maybe a cargo clean just for luck?

  2. 149segolte commented on Apr 10, 2025

    @149segolte
    Author

    Tried cargo gpu build --force-spirv-cli-rebuild but got the same error.
    cargo clean did say Removed 384 files, 301.7MiB total but running cargo gpu build still gave the same error.

    Also it is not limited to changing repo URL. Rust-GPU/rust-gpu pushed an update to main branch. I updated my revision but cargo gpu did not do git pull or something similar.

    Revision ac0c7035d53ae0bf87fbff12cc8ad4e6f6628834 is the current HEAD of rust-gpu.

    one49segolte@steam ~/t/v/t/shader (main)> cargo gpu build --force-spirv-cli-rebuild
    [2025-04-09T23:53:26Z ERROR cargo_gpu] running spirv cli
    
        Caused by:
            0: get_rust_gpu_deps_from_shader
            1: couldnt checkout revision 'ac0c7035d53ae0bf87fbff12cc8ad4e6f6628834' of `rust-gpu` at /home/one49segolte/.cache/rust-gpu/rust-gpu-repo/https___github_com_Rust-GPU_rust-gpu+ac0c7035d53ae0bf87fbff12cc8ad4e6f6628834
    Error: running spirv cli
    one49segolte@steam ~/t/v/t/shader (main) [1]> cargo clean
         Removed 384 files, 301.7MiB total
    one49segolte@steam ~/t/v/t/shader (main)>cargo gpu build
    [2025-04-09T23:54:13Z ERROR cargo_gpu] running spirv cli
    
        Caused by:
            0: get_rust_gpu_deps_from_shader
            1: couldnt checkout revision 'ac0c7035d53ae0bf87fbff12cc8ad4e6f6628834' of `rust-gpu` at /home/one49segolte/.cache/rust-gpu/rust-gpu-repo/https___github_com_Rust-GPU_rust-gpu+ac0c7035d53ae0bf87fbff12cc8ad4e6f6628834
    Error: running spirv cli
    one49segolte@steam ~/t/v/t/shader (main)>

    Edit:
    Manually deleting /home/one49segolte/.cache/rust-gpu/rust-gpu-repo/ triggers a new clone with the latest revisions.

  3. tombh commented on Apr 10, 2025

    @tombh
    Collaborator

    Ohh, this is ringing a bell now. I've worked in some of the code around this and I do remember thinking something like, "we need to test changing the repo URL". My instinct says I thought that because we use the spirv-std definition in the shader's Cargo.lock. A quick and crude check to see if that's the problem is: just remove the shader's entire Cargo.lock file. Or perhaps more elegantly: cargo rm spirv-std?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions