Message ID | zL3FF0tz70-22vGCL_3QsD8r6KPwAi71ftRNQ_HtEXsimU_tWYrKu6F9nqaPDRmsUj7LplbVD8SPLk8NJjnV2x4ie2F_UHYFqbIT8XZtBjM=@jeandudey.tech |
---|---|
Headers | show |
Series | gnu: crates-io: Allow build of various rust packages. | expand |
On 10-08-2022 13:48, Jean Pierre De Jesus DIAZ wrote: > This patch series allows cargo-build-system to fully build and test > some of these packages. These are small rust packages though. > > Probably were added without verifying if the crate could get built or > not. So these patches are mostly one liners removing `#:skip-build? #t'. > [...] > Maxime I've CCed you as this could relate to antioxidant (as it > requires crates to build, am I right?). We currently skip-build? #t to reduce build time with the inefficient cargo-build-system. To avoid wasting energy, I recommend delaying such patches until we have a matching _efficient_ build system. In antioxidant, I've noticed there are often missing dependencies (test-only or otherwise), I have a list '%extra-inputs' that contains the required information for adding them Small sample: ;; TODO: add these (upstream) or teach "guix style" to add them. ;; Keep it sorted to find things in it easily! (define %extra-inputs `(("alacritty" ; forgot the reason for adding the dependency (("rust-structopt" ,(p rust-structopt-0.3)))) ("castor" ;; TODO: add them in upstream Guix (("rust-gio" ,(@ (gnu packages crates-gtk) rust-gio-0.14)) [...])) [...])) Currently, 95% of the rust packages compile (and test successfully, except for tests I've manually disabled), according to the antiox jobset at ci.guix.gnu.org. As such, you are kind of duplicating work already done. If you want to help with fixing the build inputs, I recommend using the information (currently 1498 lines) I've already gathered in antioxidant-packages.scm (%extra-inputs), by teaching "guix style" to automatically add dependencies listed in %extra-inputs. Also keep %removed-dependencies and %disable-tests in mind, sometimes crates must _not_ be added, to avoid cycles (those cycles are resolved in cargo-build-system, but cannot be in antioxidant). Greetings, Maxime.
>We currently skip-build? #t to reduce build time with the inefficient >cargo-build-system. To avoid wasting energy, I recommend delaying such >patches until we have a matching _efficient_ build system. This should be written somewhere IMHO if not done already, thought of removing the `#:skip-build?` for the crates I could find to solve build and dependency issues where possible as that's the intention of the (guix)Rust Crates section of the manual: https://guix.gnu.org/manual/en/html_node/Rust-Crates.html — Jean-Pierre De Jesus DIAZ Senior Software Engineer ------- Original Message ------- On Wednesday, August 10th, 2022 at 8:32 PM, Maxime Devos <maximedevos@telenet.be> wrote: > > On 10-08-2022 13:48, Jean Pierre De Jesus DIAZ wrote: > > > This patch series allows cargo-build-system to fully build and test > > some of these packages. These are small rust packages though. > > > > Probably were added without verifying if the crate could get built or > > not. So these patches are mostly one liners removing `#:skip-build? #t'. > > [...] > > Maxime I've CCed you as this could relate to antioxidant (as it > > requires crates to build, am I right?). > > > We currently skip-build? #t to reduce build time with the inefficient > cargo-build-system. To avoid wasting energy, I recommend delaying such > patches until we have a matching efficient build system. > > In antioxidant, I've noticed there are often missing dependencies > (test-only or otherwise), I have a list '%extra-inputs' that contains > the required information for adding them Small sample: > > ;; TODO: add these (upstream) or teach "guix style" to add them. > ;; Keep it sorted to find things in it easily! > (define %extra-inputs > `(("alacritty" ; forgot the reason for adding the dependency > (("rust-structopt" ,(p rust-structopt-0.3)))) > ("castor" ;; TODO: add them in upstream Guix > (("rust-gio" ,(@ (gnu packages crates-gtk) rust-gio-0.14)) > [...])) > [...])) > > Currently, 95% of the rust packages compile (and test successfully, > except for tests I've manually disabled), according to the antiox jobset > at ci.guix.gnu.org. > > As such, you are kind of duplicating work already done. > > If you want to help with fixing the build inputs, I recommend using the > information (currently 1498 lines) I've already gathered in > antioxidant-packages.scm (%extra-inputs), by teaching "guix style" to > automatically add dependencies listed in %extra-inputs. Also keep > %removed-dependencies and %disable-tests in mind, sometimes crates must > not be added, to avoid cycles (those cycles are resolved in > cargo-build-system, but cannot be in antioxidant). > > Greetings, > Maxime.
On Wed, Aug 10, 2022 at 11:48:16AM +0000, Jean Pierre De Jesus DIAZ via Guix-patches via wrote: > This patch series allows cargo-build-system to fully build and test > some of these packages. These are small rust packages though. > > Probably were added without verifying if the crate could get built or > not. So these patches are mostly one liners removing `#:skip-build? #t'. > > I did a quick pass over the crates to find the simpler ones, there are > more for sure but don't want to send hundreds of patches. I'll tackle > these easy ones first and then I'll proceed with most complex ones > on further patches that require adding new packages and modifying > existing ones. > > I've tested all of these crates on x86_64 and they build without > problems. > > Maxime I've CCed you as this could relate to antioxidant (as it > requires crates to build, am I right?). > > — > Jean-Pierre De Jesus DIAZ Better late than never, 23 of the patches applied cleanly, the rest either were changed to build or were removed. Patches applied to the rust-team branch.