From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 6L3JA5EdWGA1TwAA0tVLHw (envelope-from ) for ; Mon, 22 Mar 2021 04:31:13 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id yJVDO5AdWGA1dgAA1q6Kng (envelope-from ) for ; Mon, 22 Mar 2021 04:31:12 +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 7061D10C80 for ; Mon, 22 Mar 2021 05:31:12 +0100 (CET) Received: from localhost ([::1]:50904 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lOCDf-0006lS-G0 for larch@yhetil.org; Mon, 22 Mar 2021 00:31:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48002) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lOC0w-00043Q-QG for guix-patches@gnu.org; Mon, 22 Mar 2021 00:18:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:44269) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lOC0w-0007nf-Iu for guix-patches@gnu.org; Mon, 22 Mar 2021 00:18:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lOC0w-0005nm-Bi for guix-patches@gnu.org; Mon, 22 Mar 2021 00:18:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47310] [PATCH 0/4] Improve parsing of synopsis and description, add pinned versions mode Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 22 Mar 2021 04:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 47310 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47310@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.161638665922270 (code B ref -1); Mon, 22 Mar 2021 04:18:02 +0000 Received: (at submit) by debbugs.gnu.org; 22 Mar 2021 04:17:39 +0000 Received: from localhost ([127.0.0.1]:55815 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOC0X-0005n6-Tc for submit@debbugs.gnu.org; Mon, 22 Mar 2021 00:17:38 -0400 Received: from lists.gnu.org ([209.51.188.17]:55082) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOC0T-0005mw-Ps for submit@debbugs.gnu.org; Mon, 22 Mar 2021 00:17:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47888) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lOC0T-0003rn-6t for guix-patches@gnu.org; Mon, 22 Mar 2021 00:17:33 -0400 Received: from mail-qk1-x735.google.com ([2607:f8b0:4864:20::735]:45906) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lOC0Q-0007Vv-8F for guix-patches@gnu.org; Mon, 22 Mar 2021 00:17:32 -0400 Received: by mail-qk1-x735.google.com with SMTP id q3so9326232qkq.12 for ; Sun, 21 Mar 2021 21:17:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=pX5IPrLPV5ZYJlsR7hZ2pYX0F6nrFIzH5igYevGA6OA=; b=n2E1dav5l4J1gMK1RnF1q7dF7tvcQYGEmabvr3ohfHfRrP1051FaEbJlOn9Fiex9vA VuPNJ/cRME96i5KuIHd+zAiGf27Ldzcqvd82Ka3c0zcJS5xGiiWJYA8REceQQHHYVv3v xQqQiJsn6mITNc017+m/0IzxQJSVUxl0Lj90or9CK1ZSPMidR31LycmpYO72e1EuoR3e BOIN0VvEtBQQDAqsFXMJxBKFq9vunoLIzGuhJnjBYSejux0mrnITpL3mZTDQ27ijnhgp v9EYuvOsm+3PfqYONgYpMsXi80T2VBWfCDkcLZ0+cK6dAXUwUWQApC5XV0cWAvEW0sfE TOiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=pX5IPrLPV5ZYJlsR7hZ2pYX0F6nrFIzH5igYevGA6OA=; b=eAZhQKbFrV3p5NdeOSbe+tZkCP9kehGdcad9Q0+Jl3Q3j9QL+g6HucBOpnoWCiQH/c Hra9N/XWNI8ftuSm9SjIY0AANVU/tNwBRCgoVju9i/G354ZWXWjeOAnFFHdViEByHC5r 762Uk89XXGMXHnnBXmp+amjMTdF5tHgKKccjE9PwOOhZX96XIbhu7MuQ3LsJkQU9OcHW X51FGeoPUu+5eNH6L9Nmf9M7G+pjfhIjB+Tf4Xf5RmgdSpJl1iLQuWm27ZLlOc84MO00 zInig8mKGFkWt6bIcYafTT0ZuAIGHvdG3sLpNMAkBKo6jo2n3B7YnLnLwiiREch9wTpD dexQ== X-Gm-Message-State: AOAM532EzmPoLiDQ3tB07aozD5tEFiL0SzMEN3eTRdza+1DiOst/FnQX nMhm2l3vDLZcvgiJimdFL8W6gAsonPU= X-Google-Smtp-Source: ABdhPJyg/iRHvEt76vHiUUflJRl3Ot2rSOWLL+gOlgp+Ft0znXlQeOnDhf7TebJ+YQb8CIywz1vMGQ== X-Received: by 2002:a37:aad7:: with SMTP id t206mr9208355qke.139.1616386648049; Sun, 21 Mar 2021 21:17:28 -0700 (PDT) Received: from hurd (dsl-10-134-34.b2b2c.ca. [72.10.134.34]) by smtp.gmail.com with ESMTPSA id h8sm9964172qkk.116.2021.03.21.21.17.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Mar 2021 21:17:27 -0700 (PDT) From: Maxim Cournoyer Date: Mon, 22 Mar 2021 00:10:37 -0400 Message-ID: <87eeg7vn3d.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::735; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qk1-x735.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1616387472; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=pX5IPrLPV5ZYJlsR7hZ2pYX0F6nrFIzH5igYevGA6OA=; b=iH6kAq/eZpDgbNd9lcdREvLsi08GApKcmr4I0H+MNkGR1rHIUMh+hbwurW4abUi5JlaNe7 x3JxKrz0CjdNUYosIsI2i+yuXj+0ALrYTMoJzVlFBMZKh6CA3p1dTFExfiEc/V+qewUm2p uT4jXXDxq12IZfMh6JngCsU6wQPrL7Q4FNy7eXKTS+DGZX5wHDLRhwBzTyxWPKs3H7Sopu GBZoeurv3B6hpVl3QbUgAtCxWITkoQv5QaEgG/d53aNY6vBhlENLHcdD9LNXUCaJSqRlVc WsKHG0FKSSVkJHiXuX5Ufvu67mzWtJsojIPkgdkbLjy94+uUQ6J0H+LWpt1AxQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1616387472; a=rsa-sha256; cv=none; b=QDGVn+LY2QWGCu4rkSMPfn+TE5ga7viEI5NeGXEBBzQzY5tc0m5nQ88sEFAWBw17SxaIUn eq/1o+xs9UV5AKLsK+pAc8JfJiyqP6Qx0ueWbBrFXs2CBlA87Gds4/wQ99KVLrL7d5FZmY 0aygjepYd79CgEQ/ssBY0qU0Vqe08ElItrxkIEHDL2FEuPbs0n0rZJ3TgGgto/Ao2iFCMX 3mVMzS6t8oBe8jpWPEq9C0mmS9Z2R4mRvPryzLY/ecXh3bc+hSPfChyflJ9YRvc02F1rw3 AxMT0FNTUsCsmeiGl6FbAqSwcqzWObBNLCdlS0zdN+Ob63xyELDSKrp8NdICgQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=n2E1dav5; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (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-Migadu-Spam-Score: -1.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=n2E1dav5; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (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-Migadu-Queue-Id: 7061D10C80 X-Spam-Score: -1.32 X-Migadu-Scanner: scn0.migadu.com X-TUID: xg1397pwKA9p Hi Guix! This furthers the Go importer some more by adding better parsing of the description and synopsis field. It's now also possible to import specific versions, or to import dependencies at the exact version. A good example to try this new mode with is the protobuf package at version 1.24.0, which is what originally motivated this change: ./pre-inst-env guix import go -r --pin-versions google.golang.org/protobuf@v1.24.0 --8<---------------cut here---------------start------------->8--- (define-public go-google-golang-org-protobuf-1.23.1-0.20200526195155-81db48ad09cc (package (name "go-google-golang-org-protobuf") (version "1.23.1-0.20200526195155-81db48ad09cc") (source (origin (method git-fetch) (uri (git-reference (url "https://go.googlesource.com/protobuf") (commit (go-version->git-ref version)))) (file-name (git-file-name name version)) (sha256 (base32 "02cpr8rqr5wmpj2fqb32mzilsdnxkh52g1jz95a3ck3gzffc7hh1")))) (build-system go-build-system) (arguments '(#:import-path "google.golang.org/protobuf")) (propagated-inputs `(("go-github-com-google-go-cmp-0.4.0" ,go-github-com-google-go-cmp-0.4.0) ("go-github-com-golang-protobuf-1.4.0" ,go-github-com-golang-protobuf-1.4.0))) (home-page "https://google.golang.org/protobuf") (synopsis "Go support for Protocol Buffers") (description "This project hosts the Go implementation for @url{https://developers.google.com/protocol-buffers,protocol buffers}, which is a language-neutral, platform-neutral, extensible mechanism for serializing structured data. The protocol buffer language is a language for specifying the schema for structured data. This schema is compiled into language specific bindings. This project provides both a tool to generate Go code for the protocol buffer language, and also the runtime implementation to handle serialization of messages in Go. See the @url{https://developers.google.com/protocol-buffers/docs/overview,protocol buffer developer guide} for more information about protocol buffers themselves.") (license license:bsd-3))) (define-public go-honnef-co-go-tools-0.0.0-20190523083050-ea95bdfd59fc (package (name "go-honnef-co-go-tools") (version "0.0.0-20190523083050-ea95bdfd59fc") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/dominikh/go-tools") (commit (go-version->git-ref version)))) (file-name (git-file-name name version)) (sha256 (base32 "1763nw7pwpzkvzfnm63dgzcgbq9hwmq5l1nffchnhh77vgkaq4ic")))) (build-system go-build-system) (arguments '(#:import-path "honnef.co/go/tools")) (home-page "https://honnef.co/go/tools") (synopsis "Documentation") (description "Staticcheck is a state of the art linter for the . Using static analysis, it finds bugs and performance issues, offers simplifications, and enforces style rules.") (license license:expat))) (define-public go-google-golang-org-genproto-0.0.0-20200526211855-cb27e3aa2013 (package (name "go-google-golang-org-genproto") (version "0.0.0-20200526211855-cb27e3aa2013") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/googleapis/go-genproto") (commit (go-version->git-ref version)))) (file-name (git-file-name name version)) (sha256 (base32 "0ml73ghqcwbz7ipfk8fnxb5indcml49b5p7vp1fsyny0abyyrmxf")))) (build-system go-build-system) (arguments '(#:import-path "google.golang.org/genproto")) (propagated-inputs `(("go-honnef-co-go-tools-0.0.0-20190523083050-ea95bdfd59fc" ,go-honnef-co-go-tools-0.0.0-20190523083050-ea95bdfd59fc) ("go-google-golang-org-protobuf-1.23.1-0.20200526195155-81db48ad09cc" ,go-google-golang-org-protobuf-1.23.1-0.20200526195155-81db48ad09cc) ("go-google-golang-org-grpc-1.27.0" ,go-google-golang-org-grpc-1.27.0) ("go-golang-org-x-tools-0.0.0-20190524140312-2c0ae7006135" ,go-golang-org-x-tools-0.0.0-20190524140312-2c0ae7006135) ("go-golang-org-x-lint-0.0.0-20190313153728-d0100b6bd8b3" ,go-golang-org-x-lint-0.0.0-20190313153728-d0100b6bd8b3) ("go-github-com-golang-protobuf-1.4.1" ,go-github-com-golang-protobuf-1.4.1))) (home-page "https://google.golang.org/genproto") (synopsis "Go generated proto packages") (description "This repository contains the generated Go packages for common protocol buffer types, and the generated @url{http://grpc.io,gRPC} code necessary for interacting with Google's gRPC APIs.") (license license:asl2.0))) (define-public go-google-golang-org-protobuf-1.24.0 (package (name "go-google-golang-org-protobuf") (version "1.24.0") (source (origin (method git-fetch) (uri (git-reference (url "https://go.googlesource.com/protobuf") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0x3qyn3rizbs671gs7f8v50rmiwf9h7kbaradpivw9718mhbg1gn")))) (build-system go-build-system) (arguments '(#:import-path "google.golang.org/protobuf")) (propagated-inputs `(("go-google-golang-org-genproto-0.0.0-20200526211855-cb27e3aa2013" ,go-google-golang-org-genproto-0.0.0-20200526211855-cb27e3aa2013) ("go-github-com-google-go-cmp-0.4.0" ,go-github-com-google-go-cmp-0.4.0) ("go-github-com-golang-protobuf-1.4.1" ,go-github-com-golang-protobuf-1.4.1))) (home-page "https://google.golang.org/protobuf") (synopsis "Go support for Protocol Buffers") (description "This project hosts the Go implementation for @url{https://developers.google.com/protocol-buffers,protocol buffers}, which is a language-neutral, platform-neutral, extensible mechanism for serializing structured data. The protocol buffer language is a language for specifying the schema for structured data. This schema is compiled into language specific bindings. This project provides both a tool to generate Go code for the protocol buffer language, and also the runtime implementation to handle serialization of messages in Go. See the @url{https://developers.google.com/protocol-buffers/docs/overview,protocol buffer developer guide} for more information about protocol buffers themselves.") (license license:bsd-3))) --8<---------------cut here---------------end--------------->8--- Thank you, Maxim Cournoyer (4): import: utils: Refactor maybe-inputs and add maybe-propagated-inputs. import: go: Improve synopsis and description parsing. import: go: Add an option to use pinned versions. import: go: Append version to symbol name in the pinned version mode. doc/guix.texi | 14 +- guix/build-system/go.scm | 24 +- guix/import/go.scm | 454 +++++++++++++++++++++++-------------- guix/import/utils.scm | 47 ++-- guix/scripts/import.scm | 3 +- guix/scripts/import/go.scm | 75 +++--- tests/go.scm | 139 ++++++------ 7 files changed, 455 insertions(+), 301 deletions(-) -- 2.30.1