From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 26 11:51:32 2020 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 To: Matthew Kraai Subject: Re: [bug#42295] [PATCH] gnu: rust-1.44: Add rustfmt output. 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-Debbugs-Envelope-To: 42295 Cc: 42295@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= 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 --=-=-=--