From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id CKv6AWBFNmWFcwAAauVa8A:P1 (envelope-from ) for ; Mon, 23 Oct 2023 12:05:20 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id CKv6AWBFNmWFcwAAauVa8A (envelope-from ) for ; Mon, 23 Oct 2023 12:05:20 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 806605D319 for ; Mon, 23 Oct 2023 12:05:19 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=mqO9Z0ot; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1698055519; a=rsa-sha256; cv=none; b=ChSZACZAh5i6Vk9YXJporL/DW4HiZCv3MN6Ga7cK8MxitKNwycR6bu11vmb/Ts2Ju1EQBS DfevDaCxRxY9lUSupYmDKqyjy6r+6dIPpP54MMTSDeTkYAyJDGFSoAhfTZZJyep7XHOjbY mteMcJeulgkyK5X+0EUxV3d7AFvQa8/Ix2PZ5P3/P4vAVFhYJRrtviCVo2Aquqx697F/l2 436Bb5AEOJc9ooWEPzBt2jI+79ByM44r/Z2gRw+jxJ2yBZP5YQXotOi/Iq8kXx1s7BsIFL +ZBn6MgnyRafrHmsLnwm/vWzDjlh+vBt6OxmgSuj1KQza+EWUWNflRqNqIdt5w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=mqO9Z0ot; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1698055519; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Hiedu8zQPgmoI6LxJXSKzYsp6NkWsz5oLwC7BVS8W1g=; b=T1GGKNVm9xWn1qSDD6ZKzDt1nJg6kwylevfGVDm/2amd/q33eYQmfRGVPzp7qWutVnD3FA miP0HKdm/72juMOAQ76ueXSgm2dDFxIVrcgu1/NMRPATKBWG9n4/BPBHIKuJPUnyYmbv7k Mr9Vhjga8f79k0Aqc5AuN5Pd/Qr9veW9FcXYqxQvu0QMPnCH1v1zaycJ8M8fSfSzDL7ASv 9GFosEqLJIV4tdSigscHbal1dQo/5klo2hNWipcgroDgouTRIFYmtD7M0H8FURna75Pvjh XZFn77GsKl9dPKWfP5oMN4KgAecDDGZ13QaNzpvPdCpV7yAetgUTFixuzMOy4w== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qurnd-0001fq-GF; Mon, 23 Oct 2023 06:04:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qurnb-0001bP-2f for guix-devel@gnu.org; Mon, 23 Oct 2023 06:04:39 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qurnY-0002s7-M6; Mon, 23 Oct 2023 06:04:38 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-408382da7f0so25778415e9.0; Mon, 23 Oct 2023 03:04:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698055473; x=1698660273; darn=gnu.org; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender:from:to :cc:subject:date:message-id:reply-to; bh=Hiedu8zQPgmoI6LxJXSKzYsp6NkWsz5oLwC7BVS8W1g=; b=mqO9Z0otiiJu+DRG+kO+KgtnEhMHp+hqHWfm+k12nKGnO9XtsmxVkJpxtBXfGsC9v0 4U9w25D3RQYXrinzfTJMMDBu6L2lSrBtgl//jlui+Bonss4fH5LdZT6ZxYc0L0y6o+IV 6GnqZ1oNqmVY5IrPnOauSzougWUnNQ4AioadAsZiEXZ0DEUQX2327nnMoOU7khTyrMZc RiTyQ382kEtZVUUwzNYHuoRuTmkoBOYgkIBEYF+x0rk3s0f8Zu+4xPnVGtMwU7J8lyn0 +EhXqv4SCSIzQGMKsjG6eWoG+oItteMyzNq/UYfNNrmK0sRbD2ERoqfWxFV2poPI3p3d Ie+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698055473; x=1698660273; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Hiedu8zQPgmoI6LxJXSKzYsp6NkWsz5oLwC7BVS8W1g=; b=KctXFcz+SSS/OgKcNEyO8deb+ToGczeuN0Ipf3K1sKnN9HHt4HcWjJP0gwscOF2qNu zjDnC45vOc0CLxpzwOEtODILZSE0nN8w/yeHHVrGb5utPqNfg3bFqUMCdCA8Z4BYEdxe V3jm76Ucx+MWDVpDaiaoVLiJrwqyo48cNvJJhBJa2pjRZRO+/3uNoZlo+ctTKlJ8L1i2 4sGyFYOWAsQfcK6UHvVgIEusmbOH/2OCPq7Ahm/BsIySF6kvJXK8izyzMEtcBT6HYZFu Z6YaXra7g9x9P8NZibpZeA/Dd6Ue5Gv4v718/srDBVJUetmsGKLplXKgrqJO6zFTLpQe feAA== X-Gm-Message-State: AOJu0YwpqJm5gqVQQXoff1vdRIJNHlZgqd5kBl41gGmGLvqxnTjgXMsw 3g5qBumziEa0qZ8DXrjlCX2Z2SIFy7LOOg== X-Google-Smtp-Source: AGHT+IHzR84WKg6ENbZa3jW1Y12vG/LZZtbrF5InUud3uZnxeBOIeAGCyXXtDFnRXQ8qnUi9XLhkZA== X-Received: by 2002:a05:6000:1815:b0:317:3f70:9dc4 with SMTP id m21-20020a056000181500b003173f709dc4mr5753092wrh.31.1698055473333; Mon, 23 Oct 2023 03:04:33 -0700 (PDT) Received: from localhost ([31.210.180.106]) by smtp.gmail.com with ESMTPSA id o3-20020a5d6843000000b003143c9beeaesm7424256wrw.44.2023.10.23.03.04.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 03:04:32 -0700 (PDT) Date: Mon, 23 Oct 2023 13:04:31 +0300 From: Efraim Flashner To: Maxim Cournoyer Cc: guix-devel@gnu.org, Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [RFC]: Skipping rust crate tests by default Message-ID: Mail-Followup-To: Maxim Cournoyer , guix-devel@gnu.org, Ludovic =?utf-8?Q?Court=C3=A8s?= References: <87sf67sr8e.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hsULjW2LG2fFMHgS" Content-Disposition: inline In-Reply-To: <87sf67sr8e.fsf@gmail.com> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=efraim.flashner@gmail.com; helo=mail-wm1-x32f.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: -0.73 X-Spam-Score: -0.73 X-Migadu-Queue-Id: 806605D319 X-TUID: xYKTkWQyuBCz --hsULjW2LG2fFMHgS Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 18, 2023 at 02:46:57PM -0400, Maxim Cournoyer wrote: > Hi Efraim, >=20 > Efraim Flashner writes: >=20 > [...] >=20 > >> This sounds good except I don't understand how disabling the tests by > >> default help to "make sure that the packages have the correct inputs" ? > > > > When the tests are disabled, if a package shows red on the CI it means > > that either: > > A) there was a bundled shared/static library in the sources which need > > to be removed > > B) The inputs weren't correct and need to be fixed. > > What we're skipping is C) the test suite failed. > > > > When we get to the 'build phase of the cargo-build-system, cargo first > > checks that it has all of the crates listed in the Cargo.toml file, and > > that all of those crates have all of their (cargo-input) dependencies, > > and so on. If any of them are missing then the build will fail. This is > > also why we need to set #:skip-build? #t when we don't include the > > desired cargo-development-inputs. > > > > The change is mainly a quality of life improvement; it decreases the > > time that guix people and CI spend building these crates, and it makes > > it easier to see which, if any, rust packages need to be checked for > > brokenness (with the assumption that a broken or bit-rotted test suite > > isn't a problem). >=20 > I understand that maintaining the large fleet of cargo crates packaged > in Guix is a lot of work, but I think we can try some things before > #:tests? #f; I gathered some idea below. >=20 > > My premise is that the test suite of crates doesn't necessarily pass > > when built and run with a newer rust and that we shouldn't be concerned > > about it. > > > >> You've explained the rationale here: > >> , > >> saying we sometimes use a newer Rust than the package tests are > >> expecting; how does it work in the Rust world? Don't they always build > >> even older versions against the most recent compiler? What about the > >> test suites then? Are these not typically run by users/distributions? > > > > In general, since rust expects all of the crates to be in source form, > > the tests are only run by developers when the crate is being developed. > > If someone comes along and uses that crate as a dependency for their > > project then they don't run the tests. If they continue using that crate > > (at that version) for several years then the developer using that older > > crate as a dependency still only compiles the part of the crate they > > need for their project and they only run the tests for their project, > > not for the crates which they've used as dependencies. >=20 > OK. >=20 > > As far as distributions, I can talk for Debian that they only provide > > the crates as -dev packages, that is, as the source crates. They make > > sure that they compile (and probably that they pass the test suite) at > > the time that they are packaged, but no one is distributing pre-compiled > > crates as packages to be used as inputs for further packages. >=20 > I believe that's the more useful comparison for our discussion; I gather > that even -dev crates are built and have their test suite run when > submitted, but since source packages are not rebuilt (they are a static > archive, right?) then there's no checking that the test suite continues > working in time. The source packages are effectively repackaged tarballs. They've made sure there's no issues with the DFSG, maybe applied some patches, built and tested the crates, and then repackaged the tarballs. > > > > For an example of a failing doc-test, from the rust-nalgebra-0.21 crate: > > > > > > Doc-tests nalgebra > > error: unnecessary parentheses around index expression > > --> /tmp/guix-build-rust-nalgebra-0.21.1.drv-0/nalgebra-0.21.1/src/li= nalg/convolution.rs:45:47 > > | > > 45 | conv[i] +=3D self[u_i] * kernel[(i - u_i)]; > > | ^ ^ > > | > > note: the lint level is defined here > > --> /tmp/guix-build-rust-nalgebra-0.21.1.drv-0/nalgebra-0.21.1/src/li= b.rs:78:9 > > | > > 78 | #![deny(unused_parens)] > > | ^^^^^^^^^^^^^ > > help: remove these parentheses > > | > > 45 - conv[i] +=3D self[u_i] * kernel[(i - u_i)]; > > 45 + conv[i] +=3D self[u_i] * kernel[i - u_i]; > > | > > > > error: unnecessary parentheses around index expression > > --> /tmp/guix-build-rust-nalgebra-0.21.1.drv-0/nalgebra-0.21.1/src/li= nalg/convolution.rs:49:53 > > | > > 49 | conv[i] +=3D self[u] * kernel[(i - u)]; > > | ^ ^ > > | > > help: remove these parentheses > > | > > 49 - conv[i] +=3D self[u] * kernel[(i - u)]; > > 49 + conv[i] +=3D self[u] * kernel[i - u]; > > | > > > > error: aborting due to 2 previous errors > > > > error: doctest failed, to rerun pass `--doc` > > > > > > crates.io lists this version as being released more than 3 years ago and > > targeting the 2018 edition of rust. When built with our current > > rust-1.68.2 the doc test passes but not with 1.70.0. The current > > upstream version of nalgebra is 0.32.3, so it's unlikely that they'd > > release a new version with the doc tests fixed, but I haven't contacted > > them about it. >=20 > OK. Asking in ##rust on libera chat (unofficial channel), I got as sugge= stion > to call 'carge test' with the '--cap-lints=3Dallow' option documented > here [0], which should effectively disable just the lint checks, which > is better than disabling the full test suite. >=20 > [0] https://doc.rust-lang.org/rustc/lints/levels.html I checked the cargo-build-system and we do actually use --cap-lints=3Dallow for building and for testing. > >> For one thing the 'guix lint' command would need to be told that > >> cargo-build-system has #:tests? set to #f by default to not warn witho= ut > >> reasons that '#:tests? #t' is unnecessary. > > > > Instead of #:tests? #t I used (not (%current-target-system)), but I > > hadn't tested it with guix lint to see if that would need to be changed. >=20 > That means tests are disabled only when cross-compiling, right? Do we > support cross-compiling rust crates? For those packages, yes. For all the others they would've been disabled for native and for cross builds. I'm currently working on cross-building rust packages but have been running into some problems with llvm or with rustc/cargo itself. I hope to have it working relatively soon. --=20 Efraim Flashner =D7=A8=D7=A0=D7=A9=D7=9C=D7=A4 = =D7=9D=D7=99=D7=A8=D7=A4=D7=90 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --hsULjW2LG2fFMHgS Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmU2RSsACgkQQarn3Mo9 g1FKHg//cigPg5K4ciC6tNYE8PuJW5fOR8KIfJgFWAYyfcU/tiZvZaZ38goo0OOk ze2DtYKoFPOS37rAvce8LA3cyHfWwrklWv7IPAMxKqSKqIiV0AsKk+bt96kGHRH9 Zu0gY0BwCxMOF7F5/Tp9xW5+eeAChr3favy9WrzUBmqmO9OpJfluC6YhXOA6OUkq k1T3pdHEBDdPpX+odWQdHmsR/8Dv/CoPhg2TUViuAY9S+psKmSz2T2z/RfCuYjpg 3Gt5WLsna351NhD4yjQjEcNa4TZe1G4m2NPnhEzYsTwcI742Cy92jvUqDoszvATx V43kxZayxQIyPpxTBsBqVjeK8eDXtMWEAvVidk5WZfMD5WPF5WP2QBW91Ao+ZHSs lqVDpLliFAA34DdkAtUlnGUqP8rR/vkrbjc7suIz6Om7tI+sFvOc8FRWSp/jxHZn Z2oDzGwPbV0lYDKnhQerLBCG58VEg55rt2qF+PLI1Nm4vZjMwxZqqfj4PytfOQtA u9GKnMj2bxaI1M85y3TOth3ab2ZDbABMDt37aJdIh2sS7rfqPfUpSjg4WGQaMgF5 vJNKn37WR+N12xSNRfw6JZ87ISRzhEXEN51ZA45rfPt8U7nOoTEfIfm6lCF2XxBK NtX9GDUtq/C0LiM/+/X2Ohbo9RbDPZ3nB7f/GTo6jdHI84hL750= =PR29 -----END PGP SIGNATURE----- --hsULjW2LG2fFMHgS--