Message ID | 20230118014510.19320-6-cox.katherine.e@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id D424C27BBE9; Wed, 18 Jan 2023 01:46:40 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id AA61627BBEB for <patchwork@mira.cbaines.net>; Wed, 18 Jan 2023 01:46:38 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1pHxWm-0002aM-P9; Tue, 17 Jan 2023 20:46:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1pHxWh-0002Sv-3z for guix-patches@gnu.org; Tue, 17 Jan 2023 20:46:09 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1pHxWg-0007Ap-Ag for guix-patches@gnu.org; Tue, 17 Jan 2023 20:46:06 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1pHxWg-0007aO-3q for guix-patches@gnu.org; Tue, 17 Jan 2023 20:46:06 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60904] [PATCH 05/25] gnu: Add go-github-com-google-safehtml. Resent-From: Katherine Cox-Buday <cox.katherine.e@gmail.com> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 18 Jan 2023 01:46:05 +0000 Resent-Message-ID: <handler.60904.B.167400632928812@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60904 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60904@debbugs.gnu.org Cc: Katherine Cox-Buday <cox.katherine.e@gmail.com> X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167400632928812 (code B ref -1); Wed, 18 Jan 2023 01:46:05 +0000 Received: (at submit) by debbugs.gnu.org; 18 Jan 2023 01:45:29 +0000 Received: from localhost ([127.0.0.1]:38604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1pHxW3-0007U7-As for submit@debbugs.gnu.org; Tue, 17 Jan 2023 20:45:28 -0500 Received: from lists.gnu.org ([209.51.188.17]:60108) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <cox.katherine.e@gmail.com>) id 1pHxVv-0007SL-H5 for submit@debbugs.gnu.org; Tue, 17 Jan 2023 20:45:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <cox.katherine.e@gmail.com>) id 1pHxVu-00021k-N8 for guix-patches@gnu.org; Tue, 17 Jan 2023 20:45:18 -0500 Received: from mail-il1-x12d.google.com ([2607:f8b0:4864:20::12d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <cox.katherine.e@gmail.com>) id 1pHxVt-0006xA-06 for guix-patches@gnu.org; Tue, 17 Jan 2023 20:45:18 -0500 Received: by mail-il1-x12d.google.com with SMTP id u8so16410052ilg.0 for <guix-patches@gnu.org>; Tue, 17 Jan 2023 17:45:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5MKgqN1VQeH5VDgAL9XYkuZJKhCobYTVg+vq0hbMjj8=; b=By4KVaiPOzn0KwFLdDKAl9HlPfXGvL9ABUagkH5c0uGkadJuuDHxrQZxvIMOxeg5BG OcoESRl1n5PiRku+xSdbsdzEv4Q/IWapvXadKVPGG8FSQWPBYRSSLONg2NiUVnI2pVB7 x3pltYrzlBgDdUs4+CgGz7uM4Jf6ixFjCFPVFMUOS5Ryw+BETktuwpwODlljpDDFVGwX ACN1ZebpxAszxWayZDbNphqLKJijRzqTuOY83ztzUrWJR2zqFpPr5LzG7aOHUfj4eNeZ PBajV6oatOmdckkC8YlXFLKm5VtugcxrtWialCDJXZmK1TkAAWqtEv8IEOAawhgs8TKs 3YeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5MKgqN1VQeH5VDgAL9XYkuZJKhCobYTVg+vq0hbMjj8=; b=yk5KZYSe3vrVSVzsG+Dq5xOmjOkwVvWJMdtnYL5KoUf2uRWG4aflBD3rgFhEFKtsEC cfmfN0jOyUFQfjiwcIvAjSRNcArG+AJgpNMKlUx34Bwddfn1kEj63fEaPY4vUJcIv1mm C3Nn+3rHXu8vR+TizbCCEMBdCiip8mNknDRqRVH2T2HB1zvi+DnDBZX/niDHt4jUViYw k8x1vH7NY/dW7mVzkaiWCqBnZ5/dAIXipySvA4HJmHTiKM6Rh9s6yCrFG+SDOVU/+Zyh zx+WYxFlGyJjMO0lMSSLd9mQ/tg+INT/3S8bO7IBE7sg5RasFLtKIhYJ0jQTqY0WVIzt nt6Q== X-Gm-Message-State: AFqh2kp1H8JKAN0gybMd8ADsqvlyjvhTV6RvprxStrtrmikE2EvdXOAI Z+pOW9NcSwV96HxyIUhRmCJwZvJCBO4= X-Google-Smtp-Source: AMrXdXt8UXekRdDP8MektmCtT8qM2mB4Ik9cmKILnqogW7Z4WGkX+FKFIfvpm2Zx0wPyn6v3bNlT2w== X-Received: by 2002:a05:6e02:1d0d:b0:305:9875:6d29 with SMTP id i13-20020a056e021d0d00b0030598756d29mr5677273ila.31.1674006315850; Tue, 17 Jan 2023 17:45:15 -0800 (PST) Received: from washu-v4.home.cox-buday.com (c-174-51-139-101.hsd1.co.comcast.net. [174.51.139.101]) by smtp.gmail.com with ESMTPSA id p32-20020a056638192000b0039e89ea68f9sm7889250jal.135.2023.01.17.17.45.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jan 2023 17:45:15 -0800 (PST) From: Katherine Cox-Buday <cox.katherine.e@gmail.com> Date: Tue, 17 Jan 2023 18:44:50 -0700 Message-Id: <20230118014510.19320-6-cox.katherine.e@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230118014510.19320-1-cox.katherine.e@gmail.com> References: <20230118014510.19320-1-cox.katherine.e@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::12d; envelope-from=cox.katherine.e@gmail.com; helo=mail-il1-x12d.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: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches |
Series |
gnu: golang: Add gopls
|
|
Commit Message
Katherine Cox-Buday
Jan. 18, 2023, 1:44 a.m. UTC
* gnu/packages/golang.scm (go-github-com-google-safehtml): New variable. --- gnu/packages/golang.scm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)
Comments
* gnu/packages/golang.scm (go-github-com-google-safehtml): New variable. > --- a/gnu/packages/golang.scm > +++ b/gnu/packages/golang.scm > @@ -10921,6 +10921,31 @@ (define-public go-github-com-google-go-jsonnet > + (propagated-inputs `(("go-golang-org-x-text" ,go-golang-org-x-text))) Please use new-style inputs. > + (synopsis "Safe HTML for Go") (synopsis "Go type for storing HTML data") > + (description > + "Package safehtml provides immutable string-like types which represent values > +that are guaranteed to be safe, by construction or by escaping or sanitization, > +to use in various HTML contexts and with various DOM APIs.") (description "This package provides a Go library for storing HTML data as an immutable string-like value.") -- (
"( via Guix-patches" via <guix-patches@gnu.org> writes: > * gnu/packages/golang.scm (go-github-com-google-safehtml): New variable. > >> --- a/gnu/packages/golang.scm >> +++ b/gnu/packages/golang.scm > >> @@ -10921,6 +10921,31 @@ (define-public go-github-com-google-go-jsonnet > >> + (propagated-inputs `(("go-golang-org-x-text" ,go-golang-org-x-text))) > > Please use new-style inputs. Ugh, +1, and sorry I missed this. I don't know why the importer doesn't do this by default yet. I suppose that's another patch that needs to happen. I also don't know why `guix style` and `guix lint` didn't catch this. >> + (synopsis "Safe HTML for Go") > > (synopsis "Go type for storing HTML data") (see other response, wondering if we should take upstream synopses or not) >> + (description >> + "Package safehtml provides immutable string-like types which represent values >> +that are guaranteed to be safe, by construction or by escaping or sanitization, >> +to use in various HTML contexts and with various DOM APIs.") > > (description > "This package provides a Go library for storing HTML data as an immutable string-like > value.") I disagree with this suggestion: the extra context about construction or escaping takes me from "why would I want to store HTML data in a struct", to, "oh this is a way to preclude passing around invalid/unsafe HTML around".
On Tue Feb 7, 2023 at 4:41 PM GMT, Katherine Cox-Buday wrote: > >> + (description > >> + "Package safehtml provides immutable string-like types which represent values > >> +that are guaranteed to be safe, by construction or by escaping or sanitization, > >> +to use in various HTML contexts and with various DOM APIs.") > > > > (description > > "This package provides a Go library for storing HTML data as an immutable string-like > > value.") > > I disagree with this suggestion: the extra context about construction or > escaping takes me from "why would I want to store HTML data in a > struct", to, "oh this is a way to preclude passing around invalid/unsafe > HTML around". That's true. There's no problem with incorporating it, but many upstream descriptions are a bit too focused on the internals for guix IMO. So I tried to construct a description that got the point across without being too detailed; I probably went too far. (Also, I know it's a Go convention, but I personally think we should remove the "package <name> is ..." phrasing where possible.) How about this instead: (description "This package provides a Go library for storing HTML data as an immutable string-like value that is guaranteed to be safe to use in various HTML- and DOM-related contexts.") -- (
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index 677d58d831..9f7a8160de 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -10921,6 +10921,31 @@ (define-public go-github-com-google-go-jsonnet implementation.") (license license:asl2.0))) +(define-public go-github-com-google-safehtml + (package + (name "go-github-com-google-safehtml") + (version "0.1.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/google/safehtml") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0j2xjy8xrk9y9k6bqpvimj84i6hg1wwsyvwsb0axhmp49cmnrp86")))) + (build-system go-build-system) + (arguments + '(#:import-path "github.com/google/safehtml")) + (propagated-inputs `(("go-golang-org-x-text" ,go-golang-org-x-text))) + (home-page "https://github.com/google/safehtml") + (synopsis "Safe HTML for Go") + (description + "Package safehtml provides immutable string-like types which represent values +that are guaranteed to be safe, by construction or by escaping or sanitization, +to use in various HTML contexts and with various DOM APIs.") + (license license:bsd-3))) + (define-public go-github-com-google-shlex (package (name "go-github-com-google-shlex")