Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't compile error: failed to select a version for the requirement fbinit = "^0.1.2"`` #982

Open
BlackLotus opened this issue Nov 13, 2024 · 2 comments

Comments

@BlackLotus
Copy link

BlackLotus commented Nov 13, 2024

First the error message

    Updating git repository `https://github.com/markbt/abomonation`
    Updating crates.io index
    Updating git repository `https://github.com/facebookexperimental/rust-shed.git`
    Updating git repository `https://github.com/facebook/watchman.git`
    Updating git repository `https://github.com/facebook/fb303.git`
    Updating git repository `https://github.com/facebook/fbthrift.git`
error: failed to select a version for the requirement `fbinit = "^0.1.2"`
candidate versions found which didn't match: 0.2.0
location searched: Git repository https://github.com/facebookexperimental/rust-shed.git?branch=main
required by package `revisionstore v0.1.0 (/home/thomas/pkgbuilds/sapling-scm/src/sapling-0.2.20240718-145624-f4e9df48/eden/scm/lib/revisionstore)`
error: compilation of Rust target 'hgmain' failed
make: *** [Makefile:96: local] Error 1

Ok I'm not really used to the rust ecosystem so I hope I'm not doing anything terribly wrong, but from what I can tell:
./src/sapling-0.2.20240718-145624-f4e9df48/eden/mononoke/Cargo.toml specifies

fbinit = { version = "0.1.2", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" }

And when I look at https://github.com/facebookexperimental/rust-shed/blob/main/shed/fbinit/Cargo.toml
I see

[package]
name = "fbinit"
version = "0.2.0"

So my best guess is that instead of defining

fbinit = "0.1.2"

you define it with a source that does not provide 0.1.2, but only the newest version 0.2.0 which raises a conflict.
So either we need to define a source that has the required version of the lib or make the code work with the newer version.
Oh yeah I'm trying to compile it from the newest source tarball using something like

SAPLING_VERSION="$version" make PREFIX=/usr DESTDIR="tmp/" install-oss

on arch. cargo version 1.77 if it matters...

@BlackLotus
Copy link
Author

BlackLotus commented Nov 13, 2024

Ok using git instead of the release works. (kind of... at least better than the release)
Should the release be working or did I do something wrong? I'm not sure if I should close the issue because this is a faulty release or if I should leave it open in case I did something wrong.

@BlackLotus
Copy link
Author

Ok 861e6e3 solved the problem.
Is it intended that releases can't compile after a while? Is there an official release archive outside of github that contains all the necessary dependencies? How am I supposed to package a more or less stable version of sapling if I can't compile a specific tag? Is there anything I'm missing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant