From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:44303) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hmirw-0002vO-3D for guix-patches@gnu.org; Sun, 14 Jul 2019 14:05:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hmirt-00044f-Ve for guix-patches@gnu.org; Sun, 14 Jul 2019 14:05:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37067) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hmirt-00044V-SB for guix-patches@gnu.org; Sun, 14 Jul 2019 14:05:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hmirt-0006u6-MP for guix-patches@gnu.org; Sun, 14 Jul 2019 14:05:01 -0400 Subject: [bug#35790] [PATCH 1/2] lint: Move the linting code to a different module. Resent-Message-ID: References: <87a7dyoryh.fsf@gnu.org> <20190702192542.16179-1-mail@cbaines.net> <87pnmfgw03.fsf@gnu.org> From: Christopher Baines In-reply-to: <87pnmfgw03.fsf@gnu.org> Date: Sun, 14 Jul 2019 19:03:59 +0100 Message-ID: <87wogkh4s0.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 35790@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Christopher Baines skribis: > >> To try and move towards making programatic access to the linting code ea= sier, >> this commit separates out the linting script, from the linting functiona= lity >> that it uses. > > For the final version, please write a change log. Sure, any suggestions about how to write it? I wasn't sure whether to list everything that had been moved from (guix scripts lint) to (guix lint), or say that the file has moved, and list the things that have been moved back. >> +(define-module (guix lint) >> + #:use-module ((guix store) #:hide (close-connection)) >> + #:use-module (guix base32) >> + #:use-module (guix download) >> + #:use-module (guix ftp-client) >> + #:use-module (guix http-client) >> + #:use-module (guix packages) >> + #:use-module (guix licenses) >> + #:use-module (guix records) >> + #:use-module (guix grafts) >> + #:use-module (guix ui) > > The principle that=E2=80=99s mostly followed for Guix modules is that the= y are > UI-independent: they might throw =E2=80=98&message=E2=80=99 error conditi= ons, they might > even use (guix i18n), but they usually don=E2=80=99t depend on (guix ui). > > The idea is separation of concerns: the actual UI implementation details > (TUI, GUI, etc.) remain separate from the API. > > At first sight (guix ui) is not necessary here, and it=E2=80=99s enough t= o use > (guix i18n), isn=E2=80=99t it? I do remember looking at this, but I think I got stuck. I've just had another look though, and I think if I import (guix diagnostics) and (guix i18n) modules, then (guix ui) isn't required. > Last thing: please add this new file to po/guix/POTFILES.in. > > Thanks for working on it! No problem, thanks for taking a look :) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl0rbo9fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9XdhORAAluYMBY+/GzHOVk3F3AUPzEQbkzAE3qXXAgVL7nZq3AZpRqcI4dgIlkXZ vycXTblVLIN2y5kRNu1ADQFs93cn93l1ap8fcr2jeUbaO9srpeN7J9OJvNvvR9RD vX3DlB7OJ/4BDiRZA9fDYoyafF8QBHNwfAyTUWRfS1lQZsvxmpJxqUCMKcOEvpLS /LiyxCmTfDezMufLoBtD7WHGmXxN+WINlQyq8qKcXHGngifcL9WBXTWNjFwueKbV pCtuQX2mNDTiRuSmDURS6ke0zM+EC5qfMgZ0du+Eb8SRmq/yqmD7OIQt+Y3q5kXp 6LMxdnw7QCmTAt3ubDY8yar076sR50J4+XVD1vKJLVPRcYG6MA8SGKaTC/mhZYMS mF4GX81D/qubU9px/32foeggH5s5tmYIqxiSTKN+jdO/ap/fQrUDBHzG8BFJNm19 FEAQxDwQZA1k8jkMJYzPhVsKb7q1rujpSocya5Zx+xzlA0RAin1vvVfZY/DUV4gJ jlY49zG3BZNncRFuAJu/+Vryj7bg1H4XlPGECm8LBk6iQX4utQI/LVoJfg5JWP26 tA/LL5TBOLaXNMdc2b1zkJLOALIOdUx4KxQlLc8uufMzEUdtPT+kcR26KqeCASUh hEUTW9tDLd9EP3rr7afG+dl2+9tVD7/gnLOW+ZDT2sPHj/oCFp0= =j6e4 -----END PGP SIGNATURE----- --=-=-=--