waycrate / xdg-desktop-portal-luminous

A xdg-desktop-portal for wlroots based compositors implementing zwlr_screencopy. Written by @decodetalkers
GNU General Public License v3.0
30 stars 5 forks source link

Build Error: Outdated `roxmltree` dependency in a nested dependency chain #17

Closed utkarshdagoat closed 5 months ago

utkarshdagoat commented 5 months ago

While I was trying to build xdg-desktop-portal-luminous for wayshot. I kept getting a cargo build error Following is the output of ninja -C build with CARGO_LOG=TRACE

  Downloaded roxmltree v0.18.1
   8.795794092s TRACE cargo::ops::cargo_read_manifest: read_package; path=/home/utkarsh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/roxmltree-0.18.1/Cargo.toml; source-id=registry `crates-io`
   8.795800868s TRACE cargo::util::toml: read_manifest; path=/home/utkarsh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/roxmltree-0.18.1/Cargo.toml; source-id=registry `crates-io`
   8.811647043s  WARN cargo::util::rustc: failed to update rustc info cache: failed to write `/home/utkarsh/xdg-desktop-portal-luminous/target/.rustc_info.json`
   8.811727403s DEBUG cargo: exit_with_error; err=CliError { error: Some(failed to download replaced source registry `crates-io`

Caused by:
    0: failed to read `/home/utkarsh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/roxmltree-0.18.1/Cargo.toml`
    1: No such file or directory (os error 2)), exit_code: 101 }
   8.811758534s DEBUG cargo: display_error; err=failed to download replaced source registry `crates-io`

Caused by:
    0: failed to read `/home/utkarsh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/roxmltree-0.18.1/Cargo.toml`
    1: No such file or directory (os error 2)
error: failed to download replaced source registry `crates-io`

Caused by:
  failed to read `/home/utkarsh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/roxmltree-0.18.1/Cargo.toml`

Caused by:
  No such file or directory (os error 2)
FAILED: xdg-desktop-portal-luminous 
/home/utkarsh/.cargo/bin/cargo build && cp /home/utkarsh/xdg-desktop-portal-luminous/target/debug/xdg-desktop-portal-luminous xdg-desktop-portal-luminous
ninja: build stopped: subcommand failed.

To check whether the root cause was roxmltree I created a brand new package with same version of roxmltree and could not also build the same.

This is ultimately caused by the following dependency tree:

screenshotdialog
└─ slint v 1.3.2
    ├── i-slint-backend-selector v 1.4.1
    │   ├── i-slint-backend-linuxkms v 1.4.1
    │       └── i-slint-common  v 1..4.1 
    │                  └── fontdb  v  0.16.2
    │                         └── fontconfig-parser  v  0.5.3
     |                                  └── roxmltree  v  0.18.1

Is there anyway around this or this can be only solved with a dependency update?

PS Tried upgrading slint straight away and didn't fixed it.

Decodetalkers commented 5 months ago

I think it maybe a network error. maybe clean the .cargo will fix it

utkarshdagoat commented 5 months ago

I don't think it's a network error as I installed the latest crate of roxmltree in a dummy project and it works fine but in the same project the lower version doesn't work i.e (v 0.18.1).

I have also tried deleting the registry cache which had no effect and the build fails at the same step.

A really stupid question but It can't be that my ip is banned for the lower versions upstream. Right?

Shinyzenith commented 5 months ago

A really stupid question but It can't be that my ip is banned for the lower versions upstream. Right?

I think that's highly unlikely.. Quite the odd situation

utkarshdagoat commented 5 months ago

So I got it to build by directly updating slint to the latest verison 0.4.1 and it works with wayshot.

I think it can be auto updated

Running cargo test in each project doesn't throw any error either.