gentoo / cargo-ebuild

[MIRROR] cargo extension that can generate ebuilds using the in-tree eclasses
https://gitweb.gentoo.org/proj/cargo-ebuild.git
Apache License 2.0
33 stars 10 forks source link

Fill in `DEPEND=">=virtual/rust-x.y.x"` using `rust-version` from `Cargo.toml` #34

Open vincentdephily opened 1 year ago

vincentdephily commented 1 year ago

This is just a paper cut, but I imagine the fix is easy enough.

gyakovlev commented 1 year ago

it's BDEPEND also note that eclass specifies it's minimal rust version due to reliance on cargo features in particular release. as even if upstream specifies minimum 1.57.0, if eclass uses 1.65.0 features - we should never go below eclass constraint. https://github.com/gentoo/gentoo/blob/master/eclass/cargo.eclass#L37 this is current version it will be bumped to 1.59.0

gyakovlev commented 1 year ago

https://github.com/gyakovlev/gentoo/blob/cad363d50fcbe1f7f84d78660d61a196e61d9b93/eclass/cargo.eclass#L33 this is new eclass version that will land soon

gyakovlev commented 1 year ago

so if it somehow could read eclass's RUST_DEPEND and only set minimum version only if it's above RUST_DEPEND

vincentdephily commented 1 year ago

Good catch re BDEPEND.

We could probably just concatenate the crate and eclass MSRV together, and let portage sort out the resulting minimum.

On that note, when does the eclass evaluate BDEPEND="${RUST_DEPEND}" ? Shouldn't it evaluate BDEPEND="${BDEPEND} ${RUST_DEPEND}" to avoid overwrites ?