From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id OOpJID3dv1/lLwAA0tVLHw (envelope-from ) for ; Thu, 26 Nov 2020 16:52:13 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id eMAFHD3dv19+ewAAbx9fmQ (envelope-from ) for ; Thu, 26 Nov 2020 16:52:13 +0000 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 418289403CA for ; Thu, 26 Nov 2020 16:52:13 +0000 (UTC) Received: from localhost ([::1]:53076 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kiKVA-0001Yb-8X for larch@yhetil.org; Thu, 26 Nov 2020 11:52:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54560) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kiKV0-0001YT-Lm for guix-patches@gnu.org; Thu, 26 Nov 2020 11:52:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:59359) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kiKV0-0007Vp-ER for guix-patches@gnu.org; Thu, 26 Nov 2020 11:52:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kiKV0-0006Ez-DQ for guix-patches@gnu.org; Thu, 26 Nov 2020 11:52:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#42295] [PATCH] gnu: rust-1.44: Add rustfmt output. Resent-From: John Soo Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 26 Nov 2020 16:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42295 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Matthew Kraai Cc: 42295@debbugs.gnu.org Received: via spool by 42295-submit@debbugs.gnu.org id=B42295.160640949223953 (code B ref 42295); Thu, 26 Nov 2020 16:52:02 +0000 Received: (at 42295) by debbugs.gnu.org; 26 Nov 2020 16:51:32 +0000 Received: from localhost ([127.0.0.1]:42672 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kiKUW-0006EH-6i for submit@debbugs.gnu.org; Thu, 26 Nov 2020 11:51:32 -0500 Received: from mail-pf1-f179.google.com ([209.85.210.179]:42584) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kiKUU-0006E2-1d for 42295@debbugs.gnu.org; Thu, 26 Nov 2020 11:51:31 -0500 Received: by mail-pf1-f179.google.com with SMTP id 131so2086770pfb.9 for <42295@debbugs.gnu.org>; Thu, 26 Nov 2020 08:51:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=asu-edu.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=zZtHa6vvwsjysa606sFKwscsxKjCgcOYm4NFWdDi+ls=; b=fZAMibCKHRjszLd8pjlZ8w/VJC4yo7D7eE0ozywxX+MPc+Qo+eUXb03ZSgtR7PQ6RE 5e8/RO+o00IQ+t39N29XRQjjMaTBZnV9NoaIEcOzfJhz88XnUWoNCCDLU2aB//8jrCAc Nwbnd4/m8wlKATqpmPxTY3r74so7wXcdyDFPFjnQUxIpH2Kf6Edb/JxWtERjyi2CH931 s/N8BO2YqAgYQs0STN4MNZDHdJx5UbNT4ZG5q1U1VKiR8jQ4WK2D4KCYKij/CrxhV1Vh TcEtwgrigEuGRAJi0qnBQQ6XmEpSTSTT2cIUY3MUyfcFFJ7LDCXjPpdJKI6ECwglBUVg 8vDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=zZtHa6vvwsjysa606sFKwscsxKjCgcOYm4NFWdDi+ls=; b=J3qaT5fNAC/t/Cm+8dNl6nhag6YveyyfQ3zgoyIIFRFZdwBiv6Uf3dSAblEuZ+Brtb qBppgLu+zSWdmmhre/i0xiR78XF/Vs0MGVK+zNTuiIwb4zpJ+y5SxBACOj7QiT5Uz99C neX8l+pdiUWt8u6cOrBOG3Aje6ddY/nHZCbZanQ4BORLrYY1JGDDqBrXzWbWihLGRTS+ H2ZB2ve0P1fJs3mlHVHHWCEjHi0zmK8C1+WsXPk5pNM7crfMyEbG7esit2CWAOUCSM0H 85ku45+twHk8hTBAHqQspOEvcdbhIz/5c5gKrXlrLen1eOSWTx+vlziFhfQhoX3QLx94 Qxpg== X-Gm-Message-State: AOAM5313+jCvSoydrtlpKEVkLNdSM0p86jLFKJMvMiXPdQzHZkMFGks3 szVsPHpryOl9jSXxkyVw+xb5D/55lI2XsQ== X-Google-Smtp-Source: ABdhPJy58fP4Bywt0nPDcjOkc4Kx2gjXsrorBnaFPkwrvCMRmBr/52Hpy3R56nl7TYGw85yUpeIsng== X-Received: by 2002:a17:90a:d249:: with SMTP id o9mr4782602pjw.158.1606409483730; Thu, 26 Nov 2020 08:51:23 -0800 (PST) Received: from ecenter ([2600:1700:83b0:8bd0::7a8]) by smtp.gmail.com with ESMTPSA id e128sm5177942pfe.154.2020.11.26.08.51.22 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 26 Nov 2020 08:51:22 -0800 (PST) From: John Soo References: <20200709123256.7690-1-kraai@ftbfs.org> <87blfltrxp.fsf@asu.edu> <5407eb2f-b499-2520-e0e5-48ca7171e6bd@ftbfs.org> Date: Thu, 26 Nov 2020 08:51:21 -0800 In-Reply-To: <5407eb2f-b499-2520-e0e5-48ca7171e6bd@ftbfs.org> (Matthew Kraai's message of "Thu, 26 Nov 2020 05:25:48 -0800") Message-ID: <871rggt62e.fsf@asu.edu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: inc X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=asu-edu.20150623.gappssmtp.com header.s=20150623 header.b=fZAMibCK; dmarc=fail reason="SPF not aligned (relaxed)" header.from=asu.edu (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 1.59 X-TUID: sCST/cJy63Zp --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Matthew, Matthew Kraai writes: >> Perhaps we should make anything that can be installed as a rustup >> component an output (provided the source is in the rust tree). I think >> rls can be added immediately in the same fashion. > Is rls deprecated in favor of rust-analyzer? Yes but I think it should be included until it is not supported at all anymore. > According to https://github.com/rust-lang/rustfmt, rustfmt was made a > component in 1.24.0.=C2=A0 Would it be better to add this support to the > rust-1.24 package instead?=C2=A0 I've attached the patch I'm currently te= sting. Keep it on rust@1.44. Even though guix refresh --list-dependent will report not many dependents, changing a current rust version would trigger many rebuilds. There would be enough rebuilds to require it to be applied to staging. I've also attached a work in progress patch to add rls as an output, too. I would love if all the "extended" tools can be included. Some tools like clippy and the rust-src component would be very helpful. One other thing: > + (outputs '("out" "doc" "cargo" "rustfmt")) should probably be: (cons "rustfmt" (package-outputs base-rust)) to be more resistant to changes to older packages. Best regards, John --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-Add-rls-as-an-output-of-rust-1.44.patch >From 7e26e4c61a609e93199acdff608272e3cbc38c76 Mon Sep 17 00:00:00 2001 From: John Soo Date: Wed, 25 Nov 2020 06:30:02 -0800 Subject: [PATCH] gnu: Add rls as an output of rust@1.44. * gnu/packages/rust.scm (rust-1.44):[arguments] Build rls, [outputs] add rls. --- gnu/packages/rust.scm | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index 23837ee5bf..ae23d98b98 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -1284,16 +1284,24 @@ move around." "0ww4z2v3gxgn3zddqzwqya1gln04p91ykbrflnpdbmcd575n8bky"))) (package (inherit base-rust) - (outputs (cons "rustfmt" (package-outputs base-rust))) + (outputs (append '("rustfmt" "rls") (package-outputs base-rust))) (arguments (substitute-keyword-arguments (package-arguments base-rust) ((#:phases phases) `(modify-phases ,phases (replace 'build (lambda* _ + (substitute* "config.toml" + ;; replace prefix to specific output + (("\\[build\\]" all) + (string-append all " +extended = true +tools = [\"cargo\", \"rls\", \"clippy\", \"rustfmt\", \"analysis\", \"src\"] +"))) (invoke "./x.py" "build") (invoke "./x.py" "build" "src/tools/cargo") - (invoke "./x.py" "build" "src/tools/rustfmt"))) + (invoke "./x.py" "build" "src/tools/rustfmt") + (invoke "./x.py" "build" "src/tools/rls"))) (replace 'check (lambda* _ ;; Enable parallel execution. @@ -1305,7 +1313,12 @@ move around." (invoke "./x.py" parallel-job-spec "test" "src/tools/cargo") (invoke "./x.py" parallel-job-spec "test" - "src/tools/rustfmt")))) + "src/tools/rustfmt") + (substitute* "src/tools/rls/tests/client.rs" + (("fn client_dependency_typo_and_fix" all) + (string-append "#[ignore]\n" all))) + (invoke "./x.py" parallel-job-spec "test" + "src/tools/rls")))) (replace 'mkdir-prefix-paths (lambda* (#:key outputs #:allow-other-keys) ;; As result of https://github.com/rust-lang/rust/issues/36989 @@ -1313,6 +1326,7 @@ move around." (mkdir-p (assoc-ref outputs "out")) (mkdir-p (assoc-ref outputs "cargo")) (mkdir-p (assoc-ref outputs "rustfmt")) + (mkdir-p (assoc-ref outputs "rls")) #t)) (replace 'install (lambda* (#:key outputs #:allow-other-keys) @@ -1326,7 +1340,18 @@ move around." ;; replace prefix to specific output (("prefix = \"[^\"]*\"") (string-append "prefix = \"" (assoc-ref outputs "rustfmt") "\""))) - (invoke "./x.py" "install" "rustfmt")))))))))) + (invoke "./x.py" "install" "rustfmt") + (substitute* "config.toml" + ;; replace prefix to specific output + (("prefix = \"[^\"]*\"") + (string-append "prefix = \"" (assoc-ref outputs "rls") "\""))) + (invoke "./x.py" "install" "rls"))) + (replace 'validate-runpath + (lambda* (#:key outputs #:allow-other-keys #:rest rest) + (apply (assoc-ref %standard-phases 'validate-runpath) + ;; rls has references to "out" + #:outputs (alist-delete "rls" outputs) + rest)))))))))) (define-public rust-1.45 (let ((base-rust -- 2.29.2 --=-=-=--