From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ivan Petkov Subject: Re: Rust development tools Date: Thu, 18 Apr 2019 19:40:05 -0700 Message-ID: <9F318D2E-8B1E-4BAD-B93D-F5121C12F8CA@gmail.com> References: <6947C782-9FDD-421B-A80F-CB3D96AC0CB9@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_AF03E04B-A7A4-4107-B292-F0550E29251B" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:52370) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHJRl-0001q9-9A for help-guix@gnu.org; Thu, 18 Apr 2019 22:40:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hHJRk-0005w0-4p for help-guix@gnu.org; Thu, 18 Apr 2019 22:40:13 -0400 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]:36839) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hHJRj-0005vR-Qx for help-guix@gnu.org; Thu, 18 Apr 2019 22:40:12 -0400 Received: by mail-pl1-x636.google.com with SMTP id ck15so2013994plb.3 for ; Thu, 18 Apr 2019 19:40:11 -0700 (PDT) In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: mikadoZero Cc: help-guix --Apple-Mail=_AF03E04B-A7A4-4107-B292-F0550E29251B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Apr 18, 2019, at 1:23 PM, mikadoZero wrote: >=20 > I think I would consider attempting clippy. Would exposing it be > similar to cargo? Searching through `rust.scm` cargo is all over the > place. Would exposing clippy be as far reaching and extensive? >=20 > I am new to packaging for Guix. I just had my first patch for a = package > committed just the other day. I have not yet learned Guile. Would > adding clippy as an output be overly ambitious? Should I learn Guile > first? Knowing Guile isn=E2=80=99t a must if you=E2=80=99re just hacking on = some existing package definitions, though a quick primer wouldn=E2=80=99t hurt! Exposing clippy or rls via the existing rust package definition = shouldn=E2=80=99t be too hard (the definitions look pretty messy due to bootstrapping and = inheriting from each other). Here are the general steps you=E2=80=99d need to take: * Add a new output to the package definition for clippy * Add a new build-clippy phase which would invoke the rust build system = to build the tool (e.g. invoking `./x.py build src/tools/clippy`) * Add a new check-clippy phase which invokes the tests for the tool * Add a new install-clippy phase which will copy the tool artifacts to = the specific output directory I would recommend making changes on the latest version of rust. If you touch any of the earlier versions, you may be stuck building for a = looooong time. Happy hacking, and feel free to reach out if you get stuck! =E2=80=94Ivan= --Apple-Mail=_AF03E04B-A7A4-4107-B292-F0550E29251B Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
On = Apr 18, 2019, at 1:23 PM, mikadoZero <mikadozero@yandex.com> wrote:

I think I would consider = attempting clippy.  Would exposing it be
similar to cargo? =  Searching through `rust.scm` cargo is all over the
place.  Would exposing = clippy be as far reaching and extensive?

I am new to packaging for Guix.  I just had my first = patch for a package
committed just the other day.  I have not yet learned = Guile.  Would
adding clippy as an output be overly ambitious?  Should = I learn Guile
first?

Knowing Guile isn=E2=80=99t a must if = you=E2=80=99re just hacking on some existing package
definitions, though a quick primer wouldn=E2=80=99t = hurt!

Exposing = clippy or rls via the existing rust package definition shouldn=E2=80=99t = be
too hard (the definitions look pretty messy due = to bootstrapping and inheriting
from each = other).

Here = are the general steps you=E2=80=99d need to take:
* Add a new output to the package = definition for clippy
* Add a new build-clippy = phase which would invoke the rust build system to build
the tool (e.g. invoking `./x.py build = src/tools/clippy`)
* Add a new check-clippy phase = which invokes the tests for the tool
* Add a new = install-clippy phase which will copy the tool artifacts to the = specific
output directory

I would recommend making changes on the = latest version of rust. If you
touch any of the = earlier versions, you may be stuck building for a looooong = time.

Happy = hacking, and feel free to reach out if you get stuck!

=E2=80=94Ivan
= --Apple-Mail=_AF03E04B-A7A4-4107-B292-F0550E29251B--