From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 11 06:28:29 2024 Received: (at submit) by debbugs.gnu.org; 11 Dec 2024 11:28:29 +0000 Received: from localhost ([127.0.0.1]:33235 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLKtI-0000HC-Da for submit@debbugs.gnu.org; Wed, 11 Dec 2024 06:28:29 -0500 Received: from lists.gnu.org ([209.51.188.17]:44130) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLJnI-0003lL-LN for submit@debbugs.gnu.org; Wed, 11 Dec 2024 05:18: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 ) id 1tLJnI-0006HV-Dm for bug-gnu-emacs@gnu.org; Wed, 11 Dec 2024 05:18:12 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tLJnG-00009u-Ky for bug-gnu-emacs@gnu.org; Wed, 11 Dec 2024 05:18:12 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-434ab938e37so42487305e9.0 for ; Wed, 11 Dec 2024 02:18:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733912287; x=1734517087; darn=gnu.org; h=mime-version:message-id:date:user-agent:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=NfiAT13qefzL/YoY03FLc3z0+geEJlY8c4VVhY6kAhQ=; b=lh2O+o35DRJebODbMIMoxez+5cJdB0C+t4Ty7o8YXbIc6W6Gl9EfBdcQSbkMe6lyxi rZ/n3FD5NE5o7N0YDNdfofCDPAEiPyJMyKXyrX12t5KK/HQj8lb9uedIezmZODBHHeRC wgM+GjQh6f0N0dsaMePu7OIyKaKREp1qm2X9t1XWDDW+bbtFLN413WIL33BKEIk1Abjb 0RbBJZeS2IUfMZvz2fmFZvR7+tRmZoWTiQICYE2WRMlHFfKILbuwOVU6Sci+xRPnSVoF WDrfGNJPVXwFR/lOy4ATPunzDP4lvBGcs4IR6QInQIcBGKX49non8KsrXL5AnFf23sn5 12vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733912287; x=1734517087; h=mime-version:message-id:date:user-agent:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=NfiAT13qefzL/YoY03FLc3z0+geEJlY8c4VVhY6kAhQ=; b=mOlXcybUsnuyFAx3vcG5OnEGN93viZC6rRVrTTU0qWOfrnOBRsmHHGQu9SOB1JFOjU n418O41qtFvIJh1Pr12Xegwb/x6NXN3LRwU5uvGdDt6chxPX04jZMzNQXqJMDsm0dTPO 3juHYxzT00YwHSI1sn5uSA5aUBpbfYikqGIp14STNWgs+ixKlqDzpSlzK/v9db8TYHQR s0t3Cis53Hth1kP7HMO0N7UnxKVBUW+OjmQETK1AqaSP+SzEhF4YLs4cQjArUjISVd64 9m86JciiCvpLj8enB3Hbi6WYSiql7KXCvpxYmmUN5fa2x3DkbBwaJQknm9TG/lgBiaoa c4Rw== X-Gm-Message-State: AOJu0YxL363LaeGiRdR/BnCpS4DH39/kA8jXkhKsiZCZMj4hqONDupc+ femZ2jR+G304yn/THjbbq74s2aJekXlmdZ6wYBGFKKTN6yfbCTU6+eVhlraM X-Gm-Gg: ASbGncustBaq17StIgR4DouvkzSh7C5kb6AF6cT83SOk6M7qcfMQ8MooXfbf4QDps7c kOuwdeBz5rw0uW777YEBD4vpHEaK0DCFHe+XOejwDOAiapvI3Z+3/Mjg7T7whr+f9ZRS+HylLto jeOlsW6QXICHzahyP/TzF8lW6DJGnABWBj+HXVTSWsH/SZ+QLufxtwH/VDA8RvYEh5ux1Ogl5PK RXmyOMuuF0NZCeepqTbwCyWkkY4DyuS8NgRvuYlj4FTO6V5oYOjBia8NIHbdIQBAv6Qf+HOpeKL n1huXJ/KIPGADqc= X-Google-Smtp-Source: AGHT+IHSgprHWHAS6XCH5Jn9DLDa7B1sR9PSrwoOwRt2Q5IVKsAR2lO20vCz7etCCoFSWjZWQ/ygUw== X-Received: by 2002:a05:600c:4f86:b0:434:a711:ace4 with SMTP id 5b1f17b1804b1-4361c38cceamr18052815e9.17.1733912287063; Wed, 11 Dec 2024 02:18:07 -0800 (PST) Received: from Wills-MacBook-Pro.local ([2a00:23c7:253d:cd01:21f5:855:55d:d079]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4361f511cfbsm9547685e9.20.2024.12.11.02.18.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2024 02:18:05 -0800 (PST) From: "O'Brien, Will" To: bug-gnu-emacs@gnu.org Subject: [PATCH] Add custom args to test compile step User-Agent: Gnus/5.13 (Gnus v5.13) Date: Wed, 11 Dec 2024 10:18:04 +0000 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=will.08rien@gmail.com; helo=mail-wm1-x334.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-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 11 Dec 2024 06:28:27 -0500 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: -2.3 (--) --=-=-= Content-Type: text/plain Tags: patch Hi, First time trying to contribute here, so apologies for any wrong doing. I haven't signed FSF papers; would be happy to but believe this may fit in to tiny patch territory. This is a feature request to pass custom flags down to the test compile step in go-ts-mode-test-... functions. Specifically I wanted to add the coverprofile argument to unit test invocation. The attached patch seems to do the trick for me. In GNU Emacs 31.0.50 (build 1, aarch64-apple-darwin23.6.0, NS appkit-2487.70 Version 14.6.1 (Build 23G93)) of 2024-09-02 built on Wills-MacBook-Pro.local Windowing system distributor 'Apple', version 10.3.2575 System Description: macOS 15.1.1 Configured using: 'configure --disable-silent-rules --prefix=/nix/store/2hqk7brndnbi3r5c2rjyhx0k19m1q77j-w08r-emacs-92ea393a16e --enable-locallisppath=/nix/store/2hqk7brndnbi3r5c2rjyhx0k19m1q77j-w08r-emacs-92ea393a16e/site-lisp --without-dbus --without-imagemagick --with-mailutils --disable-ns-self-contained --with-cairo --with-modules --with-xml2 --with-gnutls --with-rsvg --with-native-compilation --with-gnutls=ifavailable --enable-mac-app=/nix/store/2hqk7brndnbi3r5c2rjyhx0k19m1q77j-w08r-emacs-92ea393a16e/Applications --with-xwidgets --with-tree-sitter 'CFLAGS=-O3 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/ -framework AppKit' 'CPPFLAGS=-I/Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/ -I/Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk//System/Library/Frameworks/AppKit.framework/Versions/C/Headers -I/nix/store/d3f47kd7kr5xdpcgs3xx7bg2mx5fbb0z-libgccjit-12.2.0/include' 'LDFLAGS=-O3 -L /nix/store/d3f47kd7kr5xdpcgs3xx7bg2mx5fbb0z-libgccjit-12.2.0/lib'' best -- will --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Add-custom-args-to-test-compile-step.patch >From 0f3059391479511013c560e16858f453d342cba5 Mon Sep 17 00:00:00 2001 From: w08r Date: Wed, 11 Dec 2024 09:31:47 +0000 Subject: [PATCH] Add custom args to test compile step --- lisp/progmodes/go-ts-mode.el | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/go-ts-mode.el b/lisp/progmodes/go-ts-mode.el index 86e74ad58a8..b926e6d7c64 100644 --- a/lisp/progmodes/go-ts-mode.el +++ b/lisp/progmodes/go-ts-mode.el @@ -52,6 +52,12 @@ :type '(repeat string) :group 'go) +(defcustom go-ts-mode-test-args nil + "List of extra args for the go-ts-mode test commands." + :version "31.1" + :type '(repeat string) + :group 'go) + (defvar go-ts-mode--syntax-table (let ((table (make-syntax-table))) (modify-syntax-entry ?+ "." table) @@ -392,11 +398,20 @@ specifying build tags." (format "-tags %s" (string-join go-ts-mode-build-tags ",")) "")) +(defun go-ts-mode--get-test-args () + "Return the test args. +This function respects the `go-ts-mode-test-args' variable for +specifying test args, such as adding coverage file." + (if go-ts-mode-test-args + (string-join go-ts-mode-test-args) + "")) + (defun go-ts-mode--compile-test (regexp) "Compile the tests matching REGEXP. This function respects the `go-ts-mode-build-tags' variable for specifying build tags." - (compile (format "go test -v %s -run '%s'" + (compile (format "go test %s -v %s -run '%s'" + (go-ts-mode--get-test-args) (go-ts-mode--get-build-tags-flag) regexp))) -- 2.32.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 11 10:46:36 2024 Received: (at 74786) by debbugs.gnu.org; 11 Dec 2024 15:46:36 +0000 Received: from localhost ([127.0.0.1]:35792 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLOv5-0008Kt-PJ for submit@debbugs.gnu.org; Wed, 11 Dec 2024 10:46:36 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45348) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLOv3-0008Ka-DS for 74786@debbugs.gnu.org; Wed, 11 Dec 2024 10:46:33 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tLOuw-0002pM-Hd; Wed, 11 Dec 2024 10:46:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ZO256Y7MeIn6gPaN1PkSFR41SiFGurQEIYVUlvtKmJE=; b=mFT94whcgVdS RamZWXZ8KKqzgPe/iKuOSHIryT+JXfu4nzeeifWWaySXrCMXzBnQgQbhmZy90Ijl+Jm2CH/NU7QFs jmS2PwgFEsRU7V8401fhb++8BNX2amVEBX0GTmc1Fic92L7nPQxgXn7xWanGaljYHSPw+CLKtrfdD UsKU6cYrZ8u6ytA/isCuVQB+bVWJfbd//3Pgl+CPPJjmGRKbklkVQ3nFmDI90LnsVFktp3Q2DRr5/ hyy4kkIFtZWtAhar+wSfpIlWf5kwztF1z8rvmjARkxwSD60SNfAnY7DIDGgomI5tBTDMKb3voIbQs 6k6/+r+oLNP6uCpYm/e98g==; Date: Wed, 11 Dec 2024 17:45:59 +0200 Message-Id: <86wmg62pfs.fsf@gnu.org> From: Eli Zaretskii To: "O'Brien, Will" , Randy Taylor In-Reply-To: (will.08rien@gmail.com) Subject: Re: bug#74786: [PATCH] Add custom args to test compile step References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 74786 Cc: 74786@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: -3.3 (---) > From: "O'Brien, Will" > Date: Wed, 11 Dec 2024 10:18:04 +0000 > > First time trying to contribute here, so apologies for any wrong doing. I > haven't signed FSF papers; would be happy to but believe this may fit in to > tiny patch territory. It does. But you may wish to start the paperwork regardless, so we could accept your future contributions without limitations. Let me know if you want me to send you the form and instructions. > This is a feature request to pass custom flags down to the test compile > step in go-ts-mode-test-... functions. Specifically I wanted to > add the coverprofile argument to unit test invocation. > > The attached patch seems to do the trick for me. Thanks. Randy, any comments or suggestions? From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 11 10:59:14 2024 Received: (at 74786) by debbugs.gnu.org; 11 Dec 2024 15:59:14 +0000 Received: from localhost ([127.0.0.1]:35822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLP7K-0000eX-03 for submit@debbugs.gnu.org; Wed, 11 Dec 2024 10:59:14 -0500 Received: from mail-wr1-f53.google.com ([209.85.221.53]:49400) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLP7H-0000e1-5X for 74786@debbugs.gnu.org; Wed, 11 Dec 2024 10:59:12 -0500 Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-385e06af753so3056286f8f.2 for <74786@debbugs.gnu.org>; Wed, 11 Dec 2024 07:59:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733932685; x=1734537485; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=wD+d0yfmnQSmXXbDVeXSogigChB72LUROeK3xg0bKvY=; b=gjnEOttYYy+07aYYxLbF30u94NdkbtrgIjy+SUl33oGg6nl22/SExbrHJ6u38gvopC jAHYM8xCyCP1pfjQidc1bphv9RIVc6uuvVbCsmxgui3/S2NC0a4rkUkpHeDbiJGAhjLd qxgf1qUMnB0PcWXivzde18GSLan1kIzKhmG0lVF+OJvnHtYF1nphuKgw0YbgC+BxVf5s 4oLFrMbxkZAAvZkOBjdSRwYaXz3sdF5xwidVIKkyrLP+tBZgx2LB4f/uv+mp+ZqfWOOm XnLW/4HbXMu1hISPGF73xErEie2ES6FMELCqa0H1saudy/Xd7eF0i4/rpWzdKKZ3V2lv RNyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733932685; x=1734537485; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wD+d0yfmnQSmXXbDVeXSogigChB72LUROeK3xg0bKvY=; b=iHKtGqBbOIlyWbcPazwYJeTKvfLfuXSeow6GIi+IGRFJka2mTrcGv3es6w1rolPiyT Tv8mqOk7d4NO9JZRxrO90FqI6CDth8mu0u3gVIFiQ6mu4Ezbv+mLExfesSZadnkst8Mc lZDZS2AGUOHEql9cjQ71Iegi1tdWhS10JSeEEOifANWgWnHQ7FdnnfhCUengAnLOFZ0c fIVTvqIWDvsns2rYacUFRcHxq4PobwfdsfyYaL4SrAnl5JI3PvKPrvQugJ9MUunpfh9t Yd7mdM6icupiLQjmkwKcond/e7AWoOOyPqofM0FDpqGq0ikZAI0TLUyu76SeyzxRKfPM 6QQw== X-Forwarded-Encrypted: i=1; AJvYcCUK7t/ubObcrd8N81RmKWwOE4YEaPcT9gP+VyKEk4YqPwpRA0LMCbbK2ap3zTy6sjiLVHBrzA==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwNOOd0jZ5wO42YUWDJv5MLsbf6/mMKltoquObO+Eo+qjgJdzPY roYBSoj0AAwXE7dGs472DK4ma61IyUsGYgfN9Pqbfsf5Z5UL2b3/wi2AKA== X-Gm-Gg: ASbGncsjJCh4cHkwJiXlVoaOwXaHOBtIH1rJ92YAt9KxcI/wvAEAOwUe4AVRDGj4Bgn 0n/HWWqvCx6O+Fyq125cvxEp3AXrPxrm7ujcdm/EchdPwAvkcIC8J/N1Bu1SiE0pugeilC1sgT9 O1TekazY1e9LWAaAwCcxYiw0MuTcTHjTSIaQ1oXnbVu7YLUw8m69zFKN9NIP8kUsQSmSMLBCcrV GTO3hqCnoqmdUe5/VFSPQQb05mBTQgesM5cq79bwA== X-Google-Smtp-Source: AGHT+IE98unUP6320w/CY7lSh511XxjBMe5/Uv6sB0/Q0+1aKE0h7bS6tFyRLalLyLvoAV9yhJ7qUQ== X-Received: by 2002:a5d:6486:0:b0:385:f249:c336 with SMTP id ffacd0b85a97d-3864cec57c2mr3344191f8f.45.1733932684516; Wed, 11 Dec 2024 07:58:04 -0800 (PST) Received: from rltb ([2a01:e0a:3f3:fb51:c52c:e130:63af:d25d]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38782514bf9sm1598483f8f.80.2024.12.11.07.58.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2024 07:58:04 -0800 (PST) From: Robert Pluim To: Eli Zaretskii Subject: Re: bug#74786: [PATCH] Add custom args to test compile step In-Reply-To: <86wmg62pfs.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 11 Dec 2024 17:45:59 +0200") References: <86wmg62pfs.fsf@gnu.org> Date: Wed, 11 Dec 2024 16:58:03 +0100 Message-ID: <87wmg643g4.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74786 Cc: Randy Taylor , "O'Brien, Will" , 74786@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 (-) >>>>> On Wed, 11 Dec 2024 17:45:59 +0200, Eli Zaretskii said: >> From: "O'Brien, Will" >> Date: Wed, 11 Dec 2024 10:18:04 +0000 >>=20 >> First time trying to contribute here, so apologies for any wrong doi= ng. I >> haven't signed FSF papers; would be happy to but believe this may fi= t in to >> tiny patch territory. Eli> It does. But you may wish to start the paperwork regardless, so we Eli> could accept your future contributions without limitations. Let me Eli> know if you want me to send you the form and instructions. >> This is a feature request to pass custom flags down to the test comp= ile >> step in go-ts-mode-test-... functions. Specifically I wanted to >> add the coverprofile argument to unit test invocation. >>=20 >> The attached patch seems to do the trick for me. Eli> Thanks. Eli> Randy, any comments or suggestions? I=CA=BCm not Randy, but: >> +(defun go-ts-mode--get-test-args () >> + "Return the test args. >> +This function respects the `go-ts-mode-test-args' variable for >> +specifying test args, such as adding coverage file." >> + (if go-ts-mode-test-args >> + (string-join go-ts-mode-test-args) >> + "")) >> + This entire function is not needed, since (string-join nil) =3D> "" >> (defun go-ts-mode--compile-test (regexp) >> "Compile the tests matching REGEXP. >> This function respects the `go-ts-mode-build-tags' variable for >> specifying build tags." >> - (compile (format "go test -v %s -run '%s'" >> + (compile (format "go test %s -v %s -run '%s'" >> + (go-ts-mode--get-test-args) >> (go-ts-mode--get-build-tags-flag) >> regexp))) >>=20 so you could just inline the `string-join' here. Robert --=20 From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 11 12:11:05 2024 Received: (at 74786) by debbugs.gnu.org; 11 Dec 2024 17:11:05 +0000 Received: from localhost ([127.0.0.1]:36098 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLQEq-0006Y3-SZ for submit@debbugs.gnu.org; Wed, 11 Dec 2024 12:11:05 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46588) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLQEp-0006XG-4u for 74786@debbugs.gnu.org; Wed, 11 Dec 2024 12:11:03 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tLQEj-00082s-P8; Wed, 11 Dec 2024 12:10:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=/ZiNZQhydyx5tb42vWlU05OBUYDF7zsP22P8BIQtx3s=; b=kE83unHJOTt0 num9GZSDN+L9eMZug9W0q1CE5xl9nyI07KLUiy07Q2pTzmMIDABTiOpe3vOzk/BvbWdAxiD2rdvRv 2NUK2KEH/jdAFS4czGO2NhC9zyOw+10PeNADfyVLg95m657hH07Jv1CxfilWl4bLh+F5QOuoCF7BU qe9P9Ft40/SOLL/mqFQeSXRp/yl6RjgJ66VZXu6IL60imjmi44D+1W2+dpF1MwpsoyrioifyHgxI9 FRbHGqgiUlnEJmBQIXU5FM3FqljhGig7h7mOeN6kUqweZ0iHV/Kyy36Ii9uQbNb6SyLtFE6fl3vO/ zFgf4B9onswsRZ0v1OEVEA==; Date: Wed, 11 Dec 2024 19:10:55 +0200 Message-Id: <86ikrq2li8.fsf@gnu.org> From: Eli Zaretskii To: "O'Brien, Will" In-Reply-To: (will.08rien@gmail.com) Subject: Re: bug#74786: [PATCH] Add custom args to test compile step References: <86wmg62pfs.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 74786 Cc: dev@rjt.dev, 74786@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: -3.3 (---) > From: "O'Brien, Will" > Cc: Randy Taylor , 74786@debbugs.gnu.org > Date: Wed, 11 Dec 2024 16:30:36 +0000 > > On Wed, Dec 11 2024 at 17:45, Eli Zaretskii wrote: > > >> From: "O'Brien, Will" > >> Date: Wed, 11 Dec 2024 10:18:04 +0000 > >> > >> First time trying to contribute here, so apologies for any wrong doing. I > >> haven't signed FSF papers; would be happy to but believe this may fit in to > >> tiny patch territory. > > > > It does. But you may wish to start the paperwork regardless, so we > > could accept your future contributions without limitations. Let me > > know if you want me to send you the form and instructions. > > Makes sense, please pass on the form and I will complete. Thanks, form sent off-list. From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 11 12:27:10 2024 Received: (at 74786) by debbugs.gnu.org; 11 Dec 2024 17:27:10 +0000 Received: from localhost ([127.0.0.1]:36121 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLQUO-00088o-VK for submit@debbugs.gnu.org; Wed, 11 Dec 2024 12:27:09 -0500 Received: from mail-wm1-f46.google.com ([209.85.128.46]:46220) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLPch-0003Mx-82 for 74786@debbugs.gnu.org; Wed, 11 Dec 2024 11:31:40 -0500 Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-43622267b2eso1860005e9.0 for <74786@debbugs.gnu.org>; Wed, 11 Dec 2024 08:31:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733934638; x=1734539438; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=URDroej7oqQ6KRAqALp9CXkLsKGpTgoRnjpK0Sv4W0U=; b=NT6nHFk4xWEIVN1F3djyuRraaCgyALzofoWlL7AQHXsH4R4dg18qGpUY3v7dRInOqR 0VenbLT5wLiS34xbzAkkMldnSPOiFD1VE8pt/2ORrUDRACMiecKJVEJDPWYLykIM7dQ3 v/eQ+KB5FDgD/BtoLnqydYzf/sQfdXy8fogu80oQNBJ3OVTCRvpnXzZuawvUHKI67FJz Q7tC9xh6tZaMuGthkBpLd/Ds8vyt5HADFrQX/KXiA35y7l54fWvnPzlU3Gk5HSQN45l1 gtwq8oTSJkWQaHlVJVQn5duQh4B+bwMR6MVujLjVUR303+2rOxNcAcxkEamqAXZNvl0u vIqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733934638; x=1734539438; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=URDroej7oqQ6KRAqALp9CXkLsKGpTgoRnjpK0Sv4W0U=; b=SY+N/nV3y1SRXbhzZ+vHJcuG55wFA6qRcNtJt6QkSJHKooKarpSbX2rV6BXSmRVoD4 O4ECP6cnqZsTPakE7nft/mcPzlG8UCn3/BFfggQ6H2QvlwovnOu4psHIyJ1IPyeC6jmd iHx0xx4EEKxIWIgAlZrY9WLMZ5ksysYQN65uRwcEviHFl8mKsQ6AedLsSCiLrlMQs6tn GvqnNF1U2loH94WLN3Z2u24nQvbdxgHjvR8r6IIugAec4Jy3k3h3XXM/zU5vUkoY/vsj IM4HQVzGUf9g/2LCwBs2Yy3jdZuPUtlVUHQL4sHwVElChYlTn8VAkHxg3/BpK+JdZegP SoxA== X-Forwarded-Encrypted: i=1; AJvYcCWx6zLdLfUpZ+EsLRJ4XWHE//6qixp+QIMjqICpRkgcyLAbp17i49mollvodUpmThyWDx0Waw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YzSPBOCM0+pX1W4fvNBijveKDrivNrdKNLxnvZnZ4AnZEhTGBRC i1Bh+b0/EmhDsPaLeRAAxyGYpLfGK7CgLqRt3vtz0LyuEW0NQNvl X-Gm-Gg: ASbGncu3HWewJOPOUpRF4sPjF/rm8uldmukfXI3t17VluNszUETrruP8BRNz2pVEf3w 9puG6ec28imNycf90Oh4sXGxxPeZ0Lx/xlPYYnhHmdiKy1K0aXaJewV96OQR9vYUObJ4JNXuXYJ RIgv3MRnyG7D3VUj3nQyYU1qrlJtZyFxkZzwBHJeo7TNjOMX8BfP0voYLGQQux7Dx8K4JwUr1rB qu781+4f+a4WtTqZMQkRMLKSV3/pW6hZhK8K4PvuOtqBfXQH/jps6rr5fX6X52w0KF7LWJnMDNR isGSOBU8USe72A0= X-Google-Smtp-Source: AGHT+IGbooXR/tbNiuRDQXVibo2/iFBFrxySlUEjwA8q9neKJLuMX29ho/mkb2fYBnVdZiVXtSQr8A== X-Received: by 2002:a05:600c:4450:b0:434:f871:1bbc with SMTP id 5b1f17b1804b1-4361c35e4famr34515775e9.10.1733934637502; Wed, 11 Dec 2024 08:30:37 -0800 (PST) Received: from Wills-MacBook-Pro.local ([2a00:23c7:253d:cd01:21f5:855:55d:d079]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434fe3cc773sm81794145e9.29.2024.12.11.08.30.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2024 08:30:36 -0800 (PST) From: "O'Brien, Will" To: Eli Zaretskii Subject: Re: bug#74786: [PATCH] Add custom args to test compile step In-Reply-To: <86wmg62pfs.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 11 Dec 2024 17:45:59 +0200") References: <86wmg62pfs.fsf@gnu.org> Date: Wed, 11 Dec 2024 16:30:36 +0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74786 X-Mailman-Approved-At: Wed, 11 Dec 2024 12:27:06 -0500 Cc: Randy Taylor , 74786@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 (-) On Wed, Dec 11 2024 at 17:45, Eli Zaretskii wrote: >> From: "O'Brien, Will" >> Date: Wed, 11 Dec 2024 10:18:04 +0000 >> >> First time trying to contribute here, so apologies for any wrong doing. I >> haven't signed FSF papers; would be happy to but believe this may fit in to >> tiny patch territory. > > It does. But you may wish to start the paperwork regardless, so we > could accept your future contributions without limitations. Let me > know if you want me to send you the form and instructions. Makes sense, please pass on the form and I will complete. best -- will From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 11 12:27:11 2024 Received: (at 74786) by debbugs.gnu.org; 11 Dec 2024 17:27:11 +0000 Received: from localhost ([127.0.0.1]:36123 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLQUQ-000892-Ge for submit@debbugs.gnu.org; Wed, 11 Dec 2024 12:27:11 -0500 Received: from mail-wm1-f42.google.com ([209.85.128.42]:55618) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLPds-0003Pp-H7 for 74786@debbugs.gnu.org; Wed, 11 Dec 2024 11:32:53 -0500 Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-4361dc6322fso5987945e9.3 for <74786@debbugs.gnu.org>; Wed, 11 Dec 2024 08:32:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733934712; x=1734539512; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=4ck4D527Cl+UjmKQrFSSBZKlWC6OiEXiqbkWnipoty4=; b=XGMCRIj18u6mH/HopcBi2IgrMovuSKYQIFrpxIeYhNa88BdgXTzbc/axjRkMNpAajf Ap60t2HPdKpSEKPnv5IttOoJSIYnIUUbZI/LVhbN1UHYmeh4RMLnV1TPHQxy4rqwzz4L d6TwBDt6zriYOknjAsTAXh3qZRemySRHhWR5WJh24oWIJctYhnOT2J88wf4Xp5hbdcUe +3l/hn8CESQh07gIv8ZxqcMAdxoVFmQ4YOhLTndvSzsudWMYR7J9iSN522fynZDs4StF aougWTei80vCKcQ9fv+QOls838qAi8k/MmXU27oEfECuNZ8dz79GscYZomMDVbIHA4ou +FyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733934712; x=1734539512; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=4ck4D527Cl+UjmKQrFSSBZKlWC6OiEXiqbkWnipoty4=; b=W2MgHpe7JfiGIXQHj+9jwE1nmueQI99yPnCWowfu5BMFT1+mnreV3vdWqJER6+mZ7u KnYmjK56TsafCvjyD+hSkZIvE18Slp7nbSJZOdloYc3UZhk+UWKZNdHIOjR0Ew9us8ps xDYV/EdLDXTF/YyHy8N6gAR2e3Qf94anyzxbbeE8ufI6XNEdsRVhldw2GNPRcJXfg2Kf j6S133luGJZljHGmiD9V+WJxU2VbzmtIkoXydS1fuO5tQoK9nmWVfoda7UurWWhJ0ivF wqqoN+ex9ExSr8EPxpYSB+iy/P/gMn4JHZAiimKY9kYqsyvlz63VcztZGxZ8QYJiavzF pN6A== X-Forwarded-Encrypted: i=1; AJvYcCXozxbX2z1TPho+On4xG2E7JL2SqbX7K/uNJKH27++xkLL4MEv1Yjd0IudGTqZE7xvzPcIpxA==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwX3VOoPRzrpHoj+h+cKcNwOVVk6x8GD+rCa64J25HBX1lzaL8h UOtX2zldvDymOI6JjDqU9i5+nNpjERZdFSS896SOMGpTlfMgyzMG X-Gm-Gg: ASbGnctdf/PwN49SMprf6KO4+1yjuTwlLuTgKPPWN+C16xOcTHhAZdOs3BA9/0ViF+i 3Rw3W5doCFP3QAOtU/8vWY7mWj0zUkhHC6H1MG7SuukRJWEfh9xXUsyQyTprskOuhlIRC2UFN05 SDKPet6rQPwoi/+rxhqM3Cl8q9ayBHXN0MQbMcmrRzCd+gE3Tx8t4YFFnEwJe9W+zok+LE+6opi HU+B3PfENviEMJ5xBV6FncveaVIDPFvPQ4Rs5x/s3WNTyn2z15VGVmfB3F9EuQ63MTWyTdVK7S+ fwoFMJO97bfrzVI= X-Google-Smtp-Source: AGHT+IGZmZVJ4NLtU7esuvhFLftBLcO+i6YKHHyetCoUq80wOzOAq1gGN1P0sURprXyog0Wuu4GcBw== X-Received: by 2002:a05:600c:1907:b0:434:ffd7:6fca with SMTP id 5b1f17b1804b1-4361c34469amr30047765e9.2.1733934711725; Wed, 11 Dec 2024 08:31:51 -0800 (PST) Received: from Wills-MacBook-Pro.local ([2a00:23c7:253d:cd01:21f5:855:55d:d079]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436229d1824sm1593145e9.18.2024.12.11.08.31.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2024 08:31:50 -0800 (PST) From: "O'Brien, Will" To: Robert Pluim Subject: Re: bug#74786: [PATCH] Add custom args to test compile step In-Reply-To: <87wmg643g4.fsf@gmail.com> (Robert Pluim's message of "Wed, 11 Dec 2024 16:58:03 +0100") References: <86wmg62pfs.fsf@gnu.org> <87wmg643g4.fsf@gmail.com> Date: Wed, 11 Dec 2024 16:31:49 +0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74786 X-Mailman-Approved-At: Wed, 11 Dec 2024 12:27:06 -0500 Cc: Randy Taylor , Eli Zaretskii , 74786@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 On Wed, Dec 11 2024 at 16:58, Robert Pluim wrote: >>>>>> On Wed, 11 Dec 2024 17:45:59 +0200, Eli Zaretskii sai= d: > > I=CA=BCm not Randy, but: > > >> +(defun go-ts-mode--get-test-args () > >> + "Return the test args. > >> +This function respects the `go-ts-mode-test-args' variable for > >> +specifying test args, such as adding coverage file." > >> + (if go-ts-mode-test-args > >> + (string-join go-ts-mode-test-args) > >> + "")) > >> + > > This entire function is not needed, since > > (string-join nil) =3D> "" > > >> (defun go-ts-mode--compile-test (regexp) > >> "Compile the tests matching REGEXP. > >> This function respects the `go-ts-mode-build-tags' variable for > >> specifying build tags." > >> - (compile (format "go test -v %s -run '%s'" > >> + (compile (format "go test %s -v %s -run '%s'" > >> + (go-ts-mode--get-test-args) > >> (go-ts-mode--get-build-tags-flag) > >> regexp))) > >>=20 > > so you could just inline the `string-join' here. Ah, thanks! I've attached a new patch with the simplification. best -- will --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Add-custom-args-to-test-compile-step.patch >From 497266302d7ac20be411685c8d7a6dba0126360a Mon Sep 17 00:00:00 2001 From: w08r Date: Wed, 11 Dec 2024 09:31:47 +0000 Subject: [PATCH] Add custom args to test compile step --- lisp/progmodes/go-ts-mode.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/go-ts-mode.el b/lisp/progmodes/go-ts-mode.el index 86e74ad58a8..acf458bf63b 100644 --- a/lisp/progmodes/go-ts-mode.el +++ b/lisp/progmodes/go-ts-mode.el @@ -52,6 +52,12 @@ :type '(repeat string) :group 'go) +(defcustom go-ts-mode-test-args nil + "List of extra args for the Go test commands." + :version "31.1" + :type '(repeat string) + :group 'go) + (defvar go-ts-mode--syntax-table (let ((table (make-syntax-table))) (modify-syntax-entry ?+ "." table) @@ -396,7 +402,8 @@ specifying build tags." "Compile the tests matching REGEXP. This function respects the `go-ts-mode-build-tags' variable for specifying build tags." - (compile (format "go test -v %s -run '%s'" + (compile (format "go test %s -v %s -run '%s'" + (string-join go-ts-mode-test-args) (go-ts-mode--get-build-tags-flag) regexp))) -- 2.32.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 14 21:18:24 2024 Received: (at 74786) by debbugs.gnu.org; 15 Dec 2024 02:18:24 +0000 Received: from localhost ([127.0.0.1]:49016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tMeD4-0006ky-88 for submit@debbugs.gnu.org; Sat, 14 Dec 2024 21:18:24 -0500 Received: from mail-4317.proton.ch ([185.70.43.17]:16437) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tMeCs-0006kE-Iz for 74786@debbugs.gnu.org; Sat, 14 Dec 2024 21:18:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rjt.dev; s=protonmail3; t=1734229080; x=1734488280; bh=ompwRqZtwKxLTCZ2pC+uc0BexHwFnbxH1QMyfLjzUNg=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=tyGNYiCundICXd9RCo5p9oFrxmTPBxJ+lKefe7StsP1FlDQqAOyB6ryuRV/o095hb JoDbX2qnPwIDN3o8gT28evf68p8a2SDtnbopYJslCSV3/+teuVscX89kkBldyc5TGM iuMRghyn5gK1zIuJvzCjYH4+IBYCJk+fHeVOysLDOqZ0zegV1WJQIZ0LosHBmc1UtT VHhgi3oL8MmsrhK8gpKC4bbwCbhAodUQKCHJxLPJ72IBK5zBQpJVeqjTqUZsVkzqSL QzHv/xFyKA6Ifv06Wd2m57AKfpBWnIDvH8jGppiGujtK1+mNFVLK8siBn1dpebjD73 uWrdGQxUc6gGg== Date: Sun, 15 Dec 2024 02:17:55 +0000 To: "O'Brien, Will" From: Randy Taylor Subject: Re: bug#74786: [PATCH] Add custom args to test compile step Message-ID: In-Reply-To: References: <86wmg62pfs.fsf@gnu.org> <87wmg643g4.fsf@gmail.com> Feedback-ID: 44397038:user:proton X-Pm-Message-ID: 2a04406ea858ba21e8bcc8aa86928b3eb834c86c MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74786 Cc: Robert Pluim , Eli Zaretskii , 74786@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 (-) On Wednesday, December 11th, 2024 at 11:31, O'Brien, Will wrote: > [...] >=20 > Ah, thanks! I've attached a new patch with the simplification. >=20 > best > -- > will Thanks for working on this. +(defcustom go-ts-mode-test-args nil + "List of extra args for the Go test commands." Should we call this `go-ts-mode-test-flags' instead? That seems to be the parlance golang uses, and there is an official `-args' that go test supports that has a specific behaviour: =09-args =09 Pass the remainder of the command line (everything after -args) =09 to the test binary, uninterpreted and unchanged. =09 Because this flag consumes the remainder of the command line, =09 the package list (if present) must appear before this flag. + (compile (format "go test %s -v %s -run '%s'" + (string-join go-ts-mode-test-args) With the above in mind, we may want to move the %s to the absolute end so that -args could be used without catastrophe. This will also need a commit message and a NEWS entry. See the CONTRIBUTE file for details. From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 16 21:42:06 2024 Received: (at 74786) by debbugs.gnu.org; 17 Dec 2024 02:42:06 +0000 Received: from localhost ([127.0.0.1]:56952 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNNXC-0001zp-9K for submit@debbugs.gnu.org; Mon, 16 Dec 2024 21:42:06 -0500 Received: from mail-108-mta103.mxroute.com ([136.175.108.103]:41437) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNNX7-0001zR-NK for 74786@debbugs.gnu.org; Mon, 16 Dec 2024 21:42:04 -0500 Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta103.mxroute.com (ZoneMTA) with ESMTPSA id 193d27e6331000310e.001 for <74786@debbugs.gnu.org> (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Tue, 17 Dec 2024 02:41:58 +0000 X-Zone-Loop: ae42c307b37e4aff73570d400f74221cb386731d5362 X-Originating-IP: [136.175.111.3] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=neverwas.me ; s=x; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=EKNO4SD4tuo13Dhoh82oQXNAeU9bZw91uvhPUKSICYc=; b=LPmqxVWhDywDDUYRTnriET2IJu o9+oVEyFrL2pS4LQlq/DtbJ0Pdwn+v5ZaXXkYFf5FE/HPe6wANmomJtHo8axU3Xaja7VzKR4FgmJn 3I58R2LsiUgROo4tMYSu90HPj8JvGLtWFNzxo+GyNwKP/d/nTE9UfwCKWVL/v0YaruJVoNZN/rVnt jQ6PDJc/7RCUeNNq2c2erin4n+Qj6yX8ICwHw/cHvaYI/mn2yiVTsRIf8BVZkiaUrnZP6Aq44oCLO hKMzw8xtqkbTpTboIvfNMm23kPCYA7R7un/06x8b4v/bPTjM/c2Z/ms2m0U+WYT8uFd9Ab3Dn7I23 joCbkJjA==; From: "J.P." To: "O'Brien, Will" Subject: Re: bug#74786: [PATCH] Add custom args to test compile step In-Reply-To: (Will O'Brien's message of "Wed, 11 Dec 2024 16:31:49 +0000") References: <86wmg62pfs.fsf@gnu.org> <87wmg643g4.fsf@gmail.com> Date: Mon, 16 Dec 2024 18:41:55 -0800 Message-ID: <87ldwfhvyk.fsf@neverwas.me> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Authenticated-Id: masked@neverwas.me X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74786 Cc: Randy Taylor , Robert Pluim , Eli Zaretskii , 74786@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 (-) Hi, Hope you don't mind my butting in. "O'Brien, Will" writes: > Ah, thanks! I've attached a new patch with the simplification. > [...] > @@ -396,7 +402,8 @@ specifying build tags." > "Compile the tests matching REGEXP. > This function respects the `go-ts-mode-build-tags' variable for > specifying build tags." > - (compile (format "go test -v %s -run '%s'" > + (compile (format "go test %s -v %s -run '%s'" > + (string-join go-ts-mode-test-args) ^ Should this specify a separator argument? Or, since $ go help testflag lists a few options that take a regexp argument, maybe something like (mapconcat #'shell-quote-argument go-ts-mode-test-args " ") would make more sense? If that's just nonsense, please pardon the noise. J.P. From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 17 10:19:52 2024 Received: (at 74786) by debbugs.gnu.org; 17 Dec 2024 15:19:52 +0000 Received: from localhost ([127.0.0.1]:59905 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNZMV-0005WO-0u for submit@debbugs.gnu.org; Tue, 17 Dec 2024 10:19:52 -0500 Received: from mail-wm1-f51.google.com ([209.85.128.51]:50297) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNT1i-00027N-Ql for 74786@debbugs.gnu.org; Tue, 17 Dec 2024 03:34:00 -0500 Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-4361a50e337so34734565e9.0 for <74786@debbugs.gnu.org>; Tue, 17 Dec 2024 00:33:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734424372; x=1735029172; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=A3ACC6j40xPzN84nMdPbR1TXR+affTTVsy+E91uh4wU=; b=UAmCePrH1KAlF8WzGf8ekj5gWHJJPsO+EsvguxYT2wn3X8+cjMZrb49KOWfwhOZ6FL vZxM5BJtJxe4ZSXD5a2p3bz4B35hxSCTCR2wednh7vuqQmarApnHTpRQQbG0rUxqL+Nq RBESZnH9braM3tYmr2yBFzNnX34JxjFnriuHT9ly16XkEVwnEnD6cdHM6RXKWiW5OnTz TaEWoBHu0ny0Iy968jLmM1PcnpHc9tveUuswiXQZwIMbqf0g1hhfE3dqD2U5m0LWJpX3 Kg/zObYo4p9G4KwUTYjWqakaQpLm3GYfLr6Jm1ctCzb1YplZD2Lw4BZEUZy17bU/C0vZ eM5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734424372; x=1735029172; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=A3ACC6j40xPzN84nMdPbR1TXR+affTTVsy+E91uh4wU=; b=oA+jhYpctP80Maj8G8Cewt+6QEMRhE9SJXA6LZArUdXwzIrb6kk33NHWDsCzWbCOcx PY9GuwMo3w2njonl8NMd6a1Ab9Kr5BwOtJZteeFDVAX6Aky/Q2+6X72UJmMlKbPs+7af WrA3lRVSy+GuIuCqK2vGOibLcYgxII5GIOq4vTCe98rjrMwn+TIc+lPqh2iFbm4yS7wH OxaUp+S444JDP5ukZBTwpAHDQYBArqNMn7E8sfsg1+dtrQOFArKDs+N7ScP2TMJ4RLh2 IIn2lsXnMX41hS+Lm6xYDjclXc3GR1KPUGk/kh7Bc4d21vtWZ/8bAHSaSsLy/SRq4xEL AJ3A== X-Forwarded-Encrypted: i=1; AJvYcCW2n1UG/UosKvZN3R5fbaF8GZXgLEV7LnSQdL8PKDQkGUq4DlRXD2OD0Ba1BwbCdjfcOM7XAw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YyzqEOfq9XDlCnE3FJBR+EcG58vdbakmIA/NCH9zBaUifYKT78K 0wLuRqXWqWnTiWe25rVfi5+NxhMXMn54Ii4nlhbrpdw+3IfzHhMjTI3/6I5xgTSKLQ== X-Gm-Gg: ASbGncuDZc5quAGAvrrxMn0HCWKF/VCtvgYsnURZ0ccQ6995jsSR8aJGflzIRIlREWU eeKzSAMcGJ/TN+7DcxPDbxKEwtl3agRz+/pA4JpdGZkFYlcvGozuZtJ7ZKCl6d5mxWodTOOR9w8 DjG1C5wgs32XVMIxmwqYnznQ1IMOX5DdPdjgW9hgU56X9VXT5zOZsanswVOP7Cw7XsGs2AY93S+ YiJ/MjU1GMyay//bZWVJ2qwByskMNwBRj6f/Z+uAhYFVGhuSY5gPxZDSp/uuzb/WeqDpI6iHXdD MUzSzHkveIhTvwKmPUA= X-Google-Smtp-Source: AGHT+IH7Nu15tqsg2AIpasdHUtk8q7pPC5gmjRvz71LFhXdr7iQDobDPhldZVUdXZjzab0lmEGLdTA== X-Received: by 2002:a05:6000:402c:b0:386:4a0c:fe17 with SMTP id ffacd0b85a97d-38880ae1306mr12850963f8f.27.1734424371836; Tue, 17 Dec 2024 00:32:51 -0800 (PST) Received: from Wills-MacBook-Pro.local ([2a00:23c7:253d:cd01:e1f5:b71:ad4c:a24b]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-388c80120dcsm10681479f8f.8.2024.12.17.00.32.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 00:32:51 -0800 (PST) From: "O'Brien, Will" To: "J.P." Subject: Re: bug#74786: [PATCH] Add custom args to test compile step In-Reply-To: <87ldwfhvyk.fsf@neverwas.me> (J. P.'s message of "Mon, 16 Dec 2024 18:41:55 -0800") References: <86wmg62pfs.fsf@gnu.org> <87wmg643g4.fsf@gmail.com> <87ldwfhvyk.fsf@neverwas.me> Date: Tue, 17 Dec 2024 08:32:50 +0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74786 X-Mailman-Approved-At: Tue, 17 Dec 2024 10:19:49 -0500 Cc: Randy Taylor , Robert Pluim , Eli Zaretskii , 74786@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 (-) On Mon, Dec 16 2024 at 18:41, "J.P." wrote: >> "Compile the tests matching REGEXP. >> This function respects the `go-ts-mode-build-tags' variable for >> specifying build tags." >> - (compile (format "go test -v %s -run '%s'" >> + (compile (format "go test %s -v %s -run '%s'" >> + (string-join go-ts-mode-test-args) > ^ > > Should this specify a separator argument? It should indeed! > Or, since > > $ go help testflag > > lists a few options that take a regexp argument, maybe something like > > (mapconcat #'shell-quote-argument go-ts-mode-test-args " ") Ah, nice! Yeah I will update. Thank you! From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 17 10:19:52 2024 Received: (at 74786) by debbugs.gnu.org; 17 Dec 2024 15:19:52 +0000 Received: from localhost ([127.0.0.1]:59907 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNZMW-0005WW-4y for submit@debbugs.gnu.org; Tue, 17 Dec 2024 10:19:52 -0500 Received: from mail-wm1-f50.google.com ([209.85.128.50]:59789) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNT2q-0002AH-7t for 74786@debbugs.gnu.org; Tue, 17 Dec 2024 03:35:08 -0500 Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-436281c8a38so32798555e9.3 for <74786@debbugs.gnu.org>; Tue, 17 Dec 2024 00:35:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734424447; x=1735029247; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=uhAice5Eg42NhONDPpStQuQHTPYEEK5e/QWBKwQ4s9Q=; b=cgn6okZxw7XYTt0mojEMWMzg0ZfukzLZ0LemgnqM/axG5QvVbRUrb80j+sfGt6kY1s +8rZJkn2JDOBPjNhfnv7mUmI6fMzNUiyFusE16GJyyC4gb6zWA5tfzuvaakdFemtUkTO n5kPQz7+kANavsUctvg8zShSNuV6vBURrz7GKIXAoTDgbNjClmrM3Dr47ODYgF9Kn427 m945rOTyQtd10Ntv/OSUNoRtqyHKRiPxixLpP4Nobyhgj3CVkavRmjK1/r5EokOjmVTe QZuBUzSET/7nFa2UDdVzJyl8fISdF1jJCrD9zAHJenNyzn7P4RpO5vcX0L7wgLT5mbJP YidQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734424447; x=1735029247; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=uhAice5Eg42NhONDPpStQuQHTPYEEK5e/QWBKwQ4s9Q=; b=S+AxtksUh+W4sydtEdOo5iSKFDNMBhZwYF0+8FXgpNXtYcthlBP7o40dlKtAEwpo4I DGimOGLGykNhK1Poz0EgL7dsg0FByd15JUYc2P3tbNpn9iXusLsRoraw5vGNVMack7/h p6pRHx4RS4BCPOj05BnQ/a5+xieHx39dFjH86TzefM3HH5inwXWxLwkq/SPByc2HvEKV NR03Uc0CBHC5mHePiBiD/uXcsyag6jYAWxF7UG+y/c7tiZ7jeN/0n6Hrd5L6AAiz1DHq 3nCnGfnE432gRvdG65hBuy1rkw4e/aV/ImdumTB5Hjcqvs0I0fZJzXz2jUKKRFxPkGhy qwkw== X-Forwarded-Encrypted: i=1; AJvYcCW0PnMhDvitEw2LfQpvU4NGLCCOT2rN/xvZ93W21ZJru6QEFhNkQ9a0HJ7YgyyygOfs2iLpFQ==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwG+PVJ9WbPZpScXIefZVoT585bj3Tyf/1z8zbdtUQGBiOwntJl fJ+FUVrid1yhwKSIWgT5PEyBA4eBBTdawd4hTo2nNWcLUBklz0Yz1PCBS37DjEECbg== X-Gm-Gg: ASbGncujc2x61CiapnXjIxWQFQsjjxdSwGZIvVFkuAtr4bojqI1YfeJ5rSufyv2L4Pa cmppULVzwRpASyzuNaTcRCEwAhAyslchLTXqZ3sw5/WRyuFsUV4zQWPw7g2Ols1oCKS8RbaNr5/ +qapU8UvS1tPfGjekGMMhGE4gfUAPcFCV3US1h7zmrWMsiPGR7oH34ke0lrKFe2j+davKXF5tti uSFKn551/3uY659AVju3mHWFfyCep//gPpybf1bgNCyOdhzmXwVkK0sfY/NSshdEcRR3TrX52VQ ufeR3L4LFc4Lq9UR0kI= X-Google-Smtp-Source: AGHT+IHCVw0GGWujOtjqhGxGGgOYAmb+RfwXqrKO517/sHHkskA6buXcGT/qWBRSWEyulDwBscp3LQ== X-Received: by 2002:a05:6000:1fa9:b0:386:4acd:4d77 with SMTP id ffacd0b85a97d-3888e0b8b65mr13471412f8f.44.1734424447420; Tue, 17 Dec 2024 00:34:07 -0800 (PST) Received: from Wills-MacBook-Pro.local ([2a00:23c7:253d:cd01:e1f5:b71:ad4c:a24b]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-388c8012034sm10360087f8f.22.2024.12.17.00.34.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 00:34:06 -0800 (PST) From: "O'Brien, Will" To: Randy Taylor Subject: Re: bug#74786: [PATCH] Add custom args to test compile step In-Reply-To: (Randy Taylor's message of "Sun, 15 Dec 2024 02:17:55 +0000") References: <86wmg62pfs.fsf@gnu.org> <87wmg643g4.fsf@gmail.com> Date: Tue, 17 Dec 2024 08:34:05 +0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74786 X-Mailman-Approved-At: Tue, 17 Dec 2024 10:19:50 -0500 Cc: Robert Pluim , Eli Zaretskii , 74786@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 (-) On Sun, Dec 15 2024 at 02:17, Randy Taylor wrote: > On Wednesday, December 11th, 2024 at 11:31, O'Brien, Will wrote: >> [...] >> >> Ah, thanks! I've attached a new patch with the simplification. >> >> best >> -- >> will > > Thanks for working on this. > > +(defcustom go-ts-mode-test-args nil > + "List of extra args for the Go test commands." > Should we call this `go-ts-mode-test-flags' instead? > That seems to be the parlance golang uses, and there is an official > `-args' that go test supports that has a specific behaviour: > -args > Pass the remainder of the command line (everything after -args) > to the test binary, uninterpreted and unchanged. > Because this flag consumes the remainder of the command line, > the package list (if present) must appear before this flag. > > + (compile (format "go test %s -v %s -run '%s'" > + (string-join go-ts-mode-test-args) > With the above in mind, we may want to move the %s to the absolute > end so that -args could be used without catastrophe. Got it. Right I'll work on this and test out a few options with combinations flags. > This will also need a commit message and a NEWS entry. > See the CONTRIBUTE file for details. Ok, will send new patch with code changes and NEW entry along with a commit message. Thank you! -- will From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 19 11:21:28 2024 Received: (at 74786) by debbugs.gnu.org; 19 Dec 2024 16:21:28 +0000 Received: from localhost ([127.0.0.1]:39796 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOJHE-0008K4-2h for submit@debbugs.gnu.org; Thu, 19 Dec 2024 11:21:28 -0500 Received: from mail-wr1-f48.google.com ([209.85.221.48]:57658) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOJHC-0008Jo-2n for 74786@debbugs.gnu.org; Thu, 19 Dec 2024 11:21:26 -0500 Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-385df53e559so789500f8f.3 for <74786@debbugs.gnu.org>; Thu, 19 Dec 2024 08:21:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734625220; x=1735230020; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=zZikMawGHZDrf3pLMTESEgAEFapyf8AUrrLFBn95i2Y=; b=Bz39JEWVi+2URI/OEDwXFkAMSTgrycANf7WE7/OW0r4VQ1GrbBEnlhngIhkKd1x02i I6sHDW//D5s0vUy9o0NElk4VkLRlCvQL/lkOA/Ot9Tzlo+TllZa961xKhM9l0880BRPy MVaGB4ql9UP2RLY87fcU9UUqbocmp2VaraE2GN/OmliW0Ht01CEPsEiRxxFqg+anNulT 0I/w/0ALwcRP+CR3xxV5TttApuQlGJBUzCNBMCjrjV4u9VlmaRcm0we8YFk6wmnlhOru sozMtOZjHOj4jzFcycsKYbmQ+v4RFouK9Lr9BM4RO16BkGXnymBDGUA1SRhFU/7+KoGO fNBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734625220; x=1735230020; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=zZikMawGHZDrf3pLMTESEgAEFapyf8AUrrLFBn95i2Y=; b=fOVT4rJ/9aaEnrj02ghy0kHzZt1oEEcyiHazsrH0x+H7yRpvfz34p54ZD10ynN1HZQ jw8YuPbQL4nc1plT4cmAf9NQvkdhrrOtKlj2eg1QK1Mdd1kYkDi5teoz+zbbKNnJAKQ5 IfjU2GwFDic6b7O17JBadW2eUQ7zPqbjWkHn5Q64skh/ql7ykNb1Euek+fRhpZDv0Bqx 9JoOoVga8MYaNseKEFV14dDo3o055IkPrqFrMUpjaltU+ZaAnE8aK+zNghrLBGEId9WF ibDP4AefQq67mhPtahHOXiDFhSQuRi0CiD9Hui7AbtYBBxy9T7uplTKbwP57R1F+rwDo qlVg== X-Forwarded-Encrypted: i=1; AJvYcCW3fq+CAhLXlLRco4SAV7TfgZYa+wZkvHAZ6gtuOk7jxDgu6kO11c8DLqfAMpx8PUd65SzHpw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YzyuNvSYkkGK4WWdIcqhGXK1kk8dXaM2zq328RAYST8KNK0RUKi 7ygVfw8HXkRY31v8l1Mk9hprRCjKMPN5Id6ymGJQ4gVPWhvFa/b2 X-Gm-Gg: ASbGnctT1ffNBgtPk9n9Yf3eEPagmaflxTjzsdJniWny0U7i74bYBRsbRH8esoSOLIY thJOd/4kydkv7Hhxj3xNwsTnsLhOdVA1mObnb5Wd1mhCVaKr2j4JaH2JEVkZc0V29xqwJNhoy7e 8efwgL0ToOwqGBOVDMa1OIe69FGnkZWJhtp1dAadiXGkS1nUYd476P1bUoN9v0KFI3DsTGqR+Ry E/niad8o8auhKxJp1NtgK8/D8Oy7SizgEG6PFkenu+hYCZcIZwFWYZDX6cNpzJRd4xWC6QNW9zw pjuYMv7f1NqOADH/Ifg= X-Google-Smtp-Source: AGHT+IFvDHxjd532mEDtk2a2FvOyXoyRSQbJKnozfM0NAWLkIb7Wm0TA8zyONnHDi1ZM74e+keT95g== X-Received: by 2002:a5d:6da9:0:b0:382:3c7b:9ae with SMTP id ffacd0b85a97d-388e4d4392cmr6739866f8f.16.1734625220055; Thu, 19 Dec 2024 08:20:20 -0800 (PST) Received: from Wills-MacBook-Pro.local ([2a00:23c7:253d:cd01:e1f5:b71:ad4c:a24b]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c8a8d32sm1891348f8f.99.2024.12.19.08.20.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 08:20:19 -0800 (PST) From: "O'Brien, Will" To: Randy Taylor , "J.P." Subject: Re: bug#74786: [PATCH] Add custom args to test compile step In-Reply-To: (Will O'Brien's message of "Tue, 17 Dec 2024 08:34:05 +0000") References: <86wmg62pfs.fsf@gnu.org> <87wmg643g4.fsf@gmail.com> Date: Thu, 19 Dec 2024 16:20:18 +0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74786 Cc: Robert Pluim , Eli Zaretskii , 74786@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 Hi, On Tue, Dec 17 2024 at 08:34, "O'Brien, Will" wrote: > On Sun, Dec 15 2024 at 02:17, Randy Taylor wrote: > >> On Wednesday, December 11th, 2024 at 11:31, O'Brien, Will wrote: [...] >> + (compile (format "go test %s -v %s -run '%s'" >> + (string-join go-ts-mode-test-args) >> With the above in mind, we may want to move the %s to the absolute >> end so that -args could be used without catastrophe. > > Got it. Right I'll work on this and test out a few options with > combinations flags. > >> This will also need a commit message and a NEWS entry. >> See the CONTRIBUTE file for details. > > Ok, will send new patch with code changes and NEW entry along with > a commit message. I believe the attached patch should cover your suggestion, Randy, as well as incorporating Robert's and J.P.'s suggestions. I have tried to update NEWS and used a commit message within the patch which I believe conforms to the requirements laid out in CONTRIBUTE. Look forward to hearing your feedback, thank you all for showing such patience. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Enable-extra-flags-in-go-ts-mode-test-commands.patch >From d7114eebea210214c4539db2ceb2a344f480a09f Mon Sep 17 00:00:00 2001 From: w08r Date: Thu, 19 Dec 2024 09:53:02 +0000 Subject: [PATCH] Enable extra flags in go-ts-mode test commands * lisp/progmodes/go-ts-mode.el (go-ts-mode-test-flags): (go-ts-mode--get-test-flags): New custom variable for controlling test behaviour. (go-ts-mode--compile-test): Updated to use new test flags variable for passing extra information to the go test command line. (go-ts-mode-test-this-package): Updated to use new test flags variable for passing extra information to the go test command line. --- etc/NEWS | 4 ++++ lisp/progmodes/go-ts-mode.el | 22 ++++++++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 3efce149dbf..59248f79672 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -463,6 +463,10 @@ package of the current buffer. It is bound to 'C-c C-t p' in 'go-ts-mode'. The 'go-ts-mode-build-tags' user option is available to set a list of build tags for the test commands. +The 'go-ts-mode-test-flags' user option is available to set a list of +additional flags to pass to the go test command line. + + ** C-ts mode +++ diff --git a/lisp/progmodes/go-ts-mode.el b/lisp/progmodes/go-ts-mode.el index 86e74ad58a8..36cb95856b7 100644 --- a/lisp/progmodes/go-ts-mode.el +++ b/lisp/progmodes/go-ts-mode.el @@ -52,6 +52,12 @@ :type '(repeat string) :group 'go) +(defcustom go-ts-mode-test-flags nil + "List of extra flags for the Go test commands." + :version "31.1" + :type '(repeat string) + :group 'go) + (defvar go-ts-mode--syntax-table (let ((table (make-syntax-table))) (modify-syntax-entry ?+ "." table) @@ -392,13 +398,20 @@ specifying build tags." (format "-tags %s" (string-join go-ts-mode-build-tags ",")) "")) +(defun go-ts-mode--get-test-flags () + "Return the flags for test invoation." + (if go-ts-mode-test-flags + (mapconcat #'shell-quote-argument go-ts-mode-test-flags " ") + "")) + (defun go-ts-mode--compile-test (regexp) "Compile the tests matching REGEXP. This function respects the `go-ts-mode-build-tags' variable for specifying build tags." - (compile (format "go test -v %s -run '%s'" + (compile (format "go test -v %s -run '%s' %s" (go-ts-mode--get-build-tags-flag) - regexp))) + regexp + (go-ts-mode--get-test-flags)))) (defun go-ts-mode--find-defun-at (start) "Return the first defun node from START." @@ -457,9 +470,10 @@ be run." (defun go-ts-mode-test-this-package () "Run all the unit tests under the current package." (interactive) - (compile (format "go test -v %s -run %s" + (compile (format "go test -v %s -run %s %s" (go-ts-mode--get-build-tags-flag) - default-directory))) + default-directory + (go-ts-mode--get-test-flags)))) ;; go.mod support. -- 2.32.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 20 11:16:06 2024 Received: (at 74786) by debbugs.gnu.org; 20 Dec 2024 16:16:06 +0000 Received: from localhost ([127.0.0.1]:43750 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOffa-0000ph-Fe for submit@debbugs.gnu.org; Fri, 20 Dec 2024 11:16:06 -0500 Received: from mail-wr1-f41.google.com ([209.85.221.41]:58813) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOffV-0000p4-VI for 74786@debbugs.gnu.org; Fri, 20 Dec 2024 11:16:05 -0500 Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-385e3621518so1144940f8f.1 for <74786@debbugs.gnu.org>; Fri, 20 Dec 2024 08:16:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734711296; x=1735316096; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=raFDBoFJfCUCRtVALfOf20ArOYQcA5XQ0x5cX/DgiHw=; b=S38tW9F2eKVQKeaXCTUKcIYTM5Qq4Eiih2YgCAdQwuOdRv2OxEueXHNCqU0OquLXop L2nms1M5jjBJv3zIUhlC6bmSkFwT00fxHD4C5M72qkIlpP//8dgKfRLhHI6Cdck2YR2M wapi16eWeOdzBlbdgQSmHAnL+3NjTJo6AalJhZI6gWfOqg2vdTfRQ5T7ZNXt8pmZ2x+N zynTbkUgDfzYmFCEKibKizundZsPS4WmE7y6oSWnSvz3zgXmdwF0kmC5ZRMTGPu5Qt13 7w043ESLWq1nW9MrnxBvnbqKuqsaVSKcrb3p+LqDtj45JQx7LdQpmoqby4WKod0KUiWK NWDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734711296; x=1735316096; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=raFDBoFJfCUCRtVALfOf20ArOYQcA5XQ0x5cX/DgiHw=; b=NoKn/ybkZFgFTTFZP3AR4GXXpDR5GXu2mfA4DiapM6Yt6oHNU5r4rwMC5mkiv5h/Bq 89UGiKkeQkj2G+xOiXFbx4hmjXf1rFHL+qbUtzWZC5agekPk3CMMiBcrkFX2TZCBbo5H E0rSpwYhjoMM5bmVvtGK+/WaV9Y+wGiJd7RA5pj8tY8G42XpHoa7ErN25H5lrDXkdkVz te5NyTWP4MI4oTh0Cco6UpZwO1uLzVXMSmBCCN49y4zBvzoCj8fB/84Jmme/zD6oi82B VsSRPhXAjqJ6jon/BpkMYLVWNTa2ue4CJY0SWbBNUXd5afGW9WSNM6GdgkYyQ1NVslqg /PfQ== X-Forwarded-Encrypted: i=1; AJvYcCUwFrilUGcP9EDhBealMN4smCpnMYI6cuRtM/gypyYSl1KmtXwuSfSJeYrdXC4TPe79ButLVA==@debbugs.gnu.org X-Gm-Message-State: AOJu0YzfoN8SdD8nRoKYymxyptjVZbNXkBOkanCwZzYGXn5NJWnUr5Z/ hBqxQVG3U5QBChfE5xlMx7NWsBMp/illpKRpb2H5cDj1N1C/j3p7 X-Gm-Gg: ASbGnculmGS/HkLqsE5+PUOwcHjSe/QJK+UO03ZaUPl1llmi2gNBkDl1b7qEFAV9kzF fAu1LycQ/K8SEFa2doxxn5iAXApZPoRNH7xu0j/mCwxIkMCjBsNlrX4SVYo5qCWHAB6sz42n98Z 6oCQ2DbtjcoFJ/KuMTR15hNl5ecBi2eVjQ36/+EJ9dQcUxsSY1aAGGQXli1oszZfDKumdOUj9/7 cFKmNgSQhq29WDdmcws80mIM9FVvEFWKKfBPulycc4o3y4N8sqQ8PH1jJ2SjKfJY2Pfp7ay3t08 gig4FGB4IALdGvJPpY4= X-Google-Smtp-Source: AGHT+IE/B9oOOJU9UCELxe2d/obyMiSZ4Dd5HypeW0/o8Ek7n7PkW9ntFf4Dhrn/C0UN8njFqXBSPQ== X-Received: by 2002:a05:6000:4020:b0:385:e411:c894 with SMTP id ffacd0b85a97d-38a223f72c0mr3052391f8f.43.1734711295978; Fri, 20 Dec 2024 08:14:55 -0800 (PST) Received: from Wills-MacBook-Pro.local ([2a00:23c7:253d:cd01:e1f5:b71:ad4c:a24b]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c828ba0sm4323962f8f.14.2024.12.20.08.14.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2024 08:14:55 -0800 (PST) From: "O'Brien, Will" To: Randy Taylor Subject: Re: bug#74786: [PATCH] Add custom args to test compile step In-Reply-To: (Will O'Brien's message of "Thu, 19 Dec 2024 16:20:18 +0000") References: <86wmg62pfs.fsf@gnu.org> <87wmg643g4.fsf@gmail.com> Date: Fri, 20 Dec 2024 16:14:54 +0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74786 Cc: Robert Pluim , 74786@debbugs.gnu.org, Eli Zaretskii , "J.P." 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 (-) Hi, On Thu, Dec 19 2024 at 16:20, "O'Brien, Will" wrote: > I believe the attached patch should cover your suggestion, Randy, > as well as incorporating Robert's and J.P.'s suggestions. I think there's a further issue which I believe was pre-existing. The package test function looks like this: --8<---------------cut here---------------start------------->8--- (defun go-ts-mode-test-this-package () "Run all the unit tests under the current package." (interactive) (compile (format "go test -v %s -run %s" (go-ts-mode--get-build-tags-flag) default-directory))) --8<---------------cut here---------------end--------------->8--- The issue that the argument to the `-run` flag is a regex that should match any tests that will be execute. Passing a directory has slightly unexpected consequences, and although it seems to work, for me typically results tests not running. I think that we can remove the `-run` flag from this function. What do others think? Also, should this be a separate bug/patch (if indeed it is a bug) or I can incorporate this change into the current change set. best -- will From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 01 18:50:44 2025 Received: (at 74786) by debbugs.gnu.org; 1 Jan 2025 23:50:44 +0000 Received: from localhost ([127.0.0.1]:40885 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tT8U8-0004WU-Gd for submit@debbugs.gnu.org; Wed, 01 Jan 2025 18:50:44 -0500 Received: from mail-4317.proton.ch ([185.70.43.17]:37399) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tT8U5-0004WH-Kw for 74786@debbugs.gnu.org; Wed, 01 Jan 2025 18:50:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rjt.dev; s=protonmail3; t=1735775435; x=1736034635; bh=TIuzNNbotaKCX/X+pwZ1+5T1wFJDkgRSl66pnFBMkfM=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=NCH/HidpfCPOXvj9HmJDKifJfEMbLZuj67W/CirUB3skZxPHgAZmk6P8cU/H3gjQ3 +o3n5dExGefu81whhjj13G/yzL4DJguyrsE+ERLOYA2Gf4ecMbVlhljaImcTiCeyLG ugjgg8PG7V+YNj3Md0rmo2nyGcHLWfOVb3+Tnaj2QzMzE+Ap9t7TwPGEpELorVvwd7 5PNcBfdU5rKBtLZscG/QIiTSB9sjWdD0Gkv6nckfb1ClefqNUGXRJTzyHiQ66Oe/GF BR0twRxyLd8bI9wRZpWmLMUZ+cGQ3BNq6U6YVdlEemzTVyaG0e85ye5Vkfq526rMoT /tM5y+663MWNg== Date: Wed, 01 Jan 2025 23:50:32 +0000 To: "O'Brien, Will" From: Randy Taylor Subject: Re: bug#74786: [PATCH] Add custom args to test compile step Message-ID: In-Reply-To: References: <86wmg62pfs.fsf@gnu.org> <87wmg643g4.fsf@gmail.com> Feedback-ID: 44397038:user:proton X-Pm-Message-ID: 8677cf220a954884cf664b110738d10ae4e1ca24 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74786 Cc: Robert Pluim , 74786@debbugs.gnu.org, Eli Zaretskii , "J.P." 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 (-) On Friday, December 20th, 2024 at 11:14, O'Brien, Will wrote: >=20 >=20 > Hi, >=20 > On Thu, Dec 19 2024 at 16:20, "O'Brien, Will" will.08rien@gmail.com wrote= : >=20 > > I believe the attached patch should cover your suggestion, Randy, > > as well as incorporating Robert's and J.P.'s suggestions. Thanks, the patch looks good to me. There is a typo: + "Return the flags for test invoation." ^invocation >=20 >=20 > I think there's a further issue which I believe was pre-existing. >=20 > The package test function looks like this: >=20 > --8<---------------cut here---------------start------------->8--- >=20 > (defun go-ts-mode-test-this-package () > "Run all the unit tests under the current package." > (interactive) > (compile (format "go test -v %s -run %s" > (go-ts-mode--get-build-tags-flag) > default-directory))) > --8<---------------cut here---------------end--------------->8--- >=20 >=20 > The issue that the argument to the `-run` flag is a regex that > should match any tests that will be execute. Passing a directory > has slightly unexpected consequences, and although it seems to > work, for me typically results tests not running. >=20 > I think that we can remove the `-run` flag from this function. > What do others think? Also, should this be a separate bug/patch > (if indeed it is a bug) or I can incorporate this change into the > current change set. >=20 > best > -- > will I believe you are correct, we can get rid of the -run flag. Please incorporate these changes as part of this patch. (Side note, maybe we should actually pass the package to go test instead of relying on default directory but don't worry about that for this patch). From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 01 20:39:15 2025 Received: (at control) by debbugs.gnu.org; 2 Jan 2025 01:39:16 +0000 Received: from localhost ([127.0.0.1]:41255 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tTAB9-0001CL-JD for submit@debbugs.gnu.org; Wed, 01 Jan 2025 20:39:15 -0500 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]:61828) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tTAB7-0001CA-OV for control@debbugs.gnu.org; Wed, 01 Jan 2025 20:39:14 -0500 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-5d3d0205bd5so16155782a12.3 for ; Wed, 01 Jan 2025 17:39:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735781953; x=1736386753; darn=debbugs.gnu.org; h=to:subject:message-id:date:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=hbUSGntKiqZKHVneQ9wO/QMycTG0V2iyuhoQMl26vyQ=; b=YJbFJdkPG8e6A/SecIsIJGrjZHOX2bgTs4z4KTQFFDMG5i0Evn5SmkfJEtJAYxsWlW AgklxQ4VuwJUjQvcZNTVfoJLrOp0GR5zcrJBFmY7w8IXVsCR9/wAjGVK8+NODQtT22Zz Q66Gvpz+teA5eNdUUtiGLymVfGc/dl4+jX0zaOqvJ25tjS6lIQ+irRfhiFdbOM3BpGpX bl3k3fuyKfYZAJ6GB6bAzaCeaLobF6xYnvs+BYm/Js5MXwiGEvXoJNDvWDV4A46H7ExD 5RwtnrY6URkQtGJL4O7mPKs0xGgocRL2EtbOKuWuSVP3ePrCVILEIrClN8u1KdKXZOJP ibsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735781953; x=1736386753; h=to:subject:message-id:date:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=hbUSGntKiqZKHVneQ9wO/QMycTG0V2iyuhoQMl26vyQ=; b=crZ0kt2KSF8u1kHCpjmtTtx0gAjrOgboIw1obp62g3PnywmSVqWLQO/tKqpZDka906 8aCffBVLphgE0h+3bXBZWX3eWFDredm3FUXq6i1lYQOXJ1c/f3W0GT9s7m2pD+lvKbBr RxX2m+M9GxjJMSXEWWAU91sJeSv8b9wGDeam6rasVImqmXkQx3a5u5B34FeqsEbUXlNW expUiG697bvMqZMn8CDL0dfuDOb1TCXw2zxRYWzqmHo8wmacC3FTfARFP0368ra6kEI4 C/cQvUomqqVTghC8GwOydgzmXsaqrbbHbbXEr18GhWaQMAl2x24JeWc3e1A5MiV4Wqu+ 0egg== X-Gm-Message-State: AOJu0YzgI3ep5bxzExWGEH8QI+sPZo9AQElFSe+DBOmXzYJiCCFhXoIr Mz1INwVq+V2OS2HavAHi4HiVjeQNIFpcQaSXCE+kYDkspRFyJEBOyFC1K7ZqSqPrRmMGskhn+93 djys3Coa0KWp6FAxwEc5grTH8MRe3jun/ X-Gm-Gg: ASbGnctYivzfPbsa7eWh52bL67hCIcz+USqmHqulDLglMUZLTQNcPtDIEErjAAcwr9E NCmMPHBsflOz4Yn5hKCPhqeOdGmGflVTDFZbX7Kxi X-Google-Smtp-Source: AGHT+IHZtstB4KrXSV5j45+7Y6FPsvLDAskKL9zgB2xW7V4CruZfYtGXSkeADTPHnz3Y8v7wjpCYDUApzWMjReFWm+M= X-Received: by 2002:a05:6402:530f:b0:5d6:5139:7e97 with SMTP id 4fb4d7f45d1cf-5d81dd5ed7amr34795275a12.1.1735781952708; Wed, 01 Jan 2025 17:39:12 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 1 Jan 2025 19:39:12 -0600 From: Stefan Kangas MIME-Version: 1.0 Date: Wed, 1 Jan 2025 19:39:12 -0600 Message-ID: Subject: control message for bug #74786 To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control 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 (-) severity 74786 wishlist quit From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 02 06:22:05 2025 Received: (at 74786) by debbugs.gnu.org; 2 Jan 2025 11:22:06 +0000 Received: from localhost ([127.0.0.1]:42911 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tTJHB-0002zz-DE for submit@debbugs.gnu.org; Thu, 02 Jan 2025 06:22:05 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:59526) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tTJH8-0002zT-Rj for 74786@debbugs.gnu.org; Thu, 02 Jan 2025 06:22:04 -0500 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-3862df95f92so4880052f8f.2 for <74786@debbugs.gnu.org>; Thu, 02 Jan 2025 03:22:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735816916; x=1736421716; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=eP+538ixbCvEhZrp/BgCDywzUW2E2+yzI4OLDK24thU=; b=UzPj/uVM9+rhVxs1oqyEdxItvu96JVnHI8R1/JCy8VpvnduNaSUI6y9Xk2CEaayRQW 02mkuLCG5KXKLz5OCCK3yej7RTTNhxe1OSGyY5fSpzkW1XejWvJjJ149RPgGWIFLe7Ht qm5wfH8/B9CqEa/VG9mnMQwjxAqHvIvQ1NKGaaiuNwK++PDmrZUr6670OGB9/vscvXtC yG1DSUkgRJLrMtLfhy/eRr16wknkSEK2/O85HFbCu+IODW8XQgILQxAKvpNW7GzLZZzp +cFRGpkYwkMauXCHyWUxyQJ/7Roho9blQ7ye/MPV1o7E+hcesCDe3YiNwX/G/3FhQL3K PsGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735816916; x=1736421716; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=eP+538ixbCvEhZrp/BgCDywzUW2E2+yzI4OLDK24thU=; b=UP/8h8RXkec4lR3q6uMXxpAEjDjOyttuZO3tJtpHpA8ITv0c3SXcJLAuexdqNdmhOn KPV4XWvEwqNaujjtdMY5G/2XDMw264rb3IAK2St8QCMeDMIebN6Qk1hIUjmivEM19ZlB 79Lo+hctRT2sVbF+ke1AxvenIoAmeCFUWs0tsMsLjIhVDZzOv9MfN6jepmCOfwm/+9wH Na/oytAfQtqfDs+k+EzjK+4l7ImwP1dCsWLWytx+pOKXehNXc64WPYBqZx9pbRFuA4ye FjyCbOOXEd/BFfQuSUFscTdb14foKR4w1FzcPKLIaWPsmrbQEEusIDeroq4HXHFo6BHr P9qQ== X-Forwarded-Encrypted: i=1; AJvYcCWGVbMS7pY1xXHH3o+KsJZEjqus4Gung+yW9x9a5MJdzNVsFx1r3CPkNiaOwNDFw1QAOPOmew==@debbugs.gnu.org X-Gm-Message-State: AOJu0YxSeHY2Tfx/+6hHMVT8UICYHyGHiNFONyCQBPPU07R0bS9QKClN 63S+n5YIKqhYqrcA/Ymaq6f/JcusZ4gB6ksdLIzlptu2sTnaByrc X-Gm-Gg: ASbGncsb+l/Lkva3jfFeHM/dZGtBM3w4SEvrJ+WTu8B7QE7mdxSausMu0En7xzhVlHK gFjxQE2BF8vf81QGU1TFq5kH/7nR7icUlOIep32lJTfmqkq7P103daus/ZoDvHabfFvbZ6rfJo2 FFYJpJvbeQudxLeK9GusAAvEJpX73foyYPi/NBR0GnObXWnPaz7THtDGX+eVRZ1iUbkjzAyaQ4I p2Rbx7oRebHztFGL7uDwX3YHEdfoZ5QrH5tL5L9bax6F5i15/MiNgbF7i921sr6qHhtUCLQI765 XOhC0LtharzhU5oWZ/76 X-Google-Smtp-Source: AGHT+IH/g+pFUcSwJrz3hKHnOsqAM4d/9ZGN8AdCJ0irFfIvhMlxvAFqByLG3HifrA5K2uFCudpHQA== X-Received: by 2002:a05:6000:4023:b0:385:f220:f788 with SMTP id ffacd0b85a97d-38a223fd77bmr40734554f8f.48.1735816916283; Thu, 02 Jan 2025 03:21:56 -0800 (PST) Received: from Wills-MacBook-Pro.local ([2a00:23c7:253d:cd01:80ed:4520:1152:3675]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c8a8d32sm38163620f8f.99.2025.01.02.03.21.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jan 2025 03:21:55 -0800 (PST) From: "O'Brien, Will" To: Randy Taylor Subject: Re: bug#74786: [PATCH] Add custom args to test compile step In-Reply-To: (Randy Taylor's message of "Wed, 01 Jan 2025 23:50:32 +0000") References: <86wmg62pfs.fsf@gnu.org> <87wmg643g4.fsf@gmail.com> Date: Thu, 02 Jan 2025 11:21:54 +0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74786 Cc: Robert Pluim , 74786@debbugs.gnu.org, Eli Zaretskii , "J.P." 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 On Wed, Jan 01 2025 at 23:50, Randy Taylor wrote: > Thanks, the patch looks good to me. > There is a typo: > + "Return the flags for test invoation." > ^invocation > Fixed. [...] >> I think that we can remove the `-run` flag from this function. >> What do others think? Also, should this be a separate bug/patch >> (if indeed it is a bug) or I can incorporate this change into the >> current change set. >> > > I believe you are correct, we can get rid of the -run flag. > Please incorporate these changes as part of this patch. Done. > (Side note, maybe we should actually pass the package to > go test instead of relying on default directory but > don't worry about that for this patch). Will raise a new issue. best -- will --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Enable-extra-flags-in-go-ts-mode-test-commands.patch >From 71817f2e23148e65add2a32a53d22abc63f5af42 Mon Sep 17 00:00:00 2001 From: w08r Date: Thu, 19 Dec 2024 09:53:02 +0000 Subject: [PATCH] Enable extra flags in go-ts-mode test commands * lisp/progmodes/go-ts-mode.el (go-ts-mode-test-flags): (go-ts-mode--get-test-flags): New custom variable for controlling test behaviour. (go-ts-mode--compile-test): Updated to use new test flags variable for passing extra information to the go test command line. (go-ts-mode-test-this-package): Updated to use new test flags variable for passing extra information to the go test command line. Removed incorrect use of -run flag --- etc/NEWS | 4 ++++ lisp/progmodes/go-ts-mode.el | 22 ++++++++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 3efce149dbf..59248f79672 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -463,6 +463,10 @@ package of the current buffer. It is bound to 'C-c C-t p' in 'go-ts-mode'. The 'go-ts-mode-build-tags' user option is available to set a list of build tags for the test commands. +The 'go-ts-mode-test-flags' user option is available to set a list of +additional flags to pass to the go test command line. + + ** C-ts mode +++ diff --git a/lisp/progmodes/go-ts-mode.el b/lisp/progmodes/go-ts-mode.el index 86e74ad58a8..4c9006b3536 100644 --- a/lisp/progmodes/go-ts-mode.el +++ b/lisp/progmodes/go-ts-mode.el @@ -52,6 +52,12 @@ :type '(repeat string) :group 'go) +(defcustom go-ts-mode-test-flags nil + "List of extra flags for the Go test commands." + :version "31.1" + :type '(repeat string) + :group 'go) + (defvar go-ts-mode--syntax-table (let ((table (make-syntax-table))) (modify-syntax-entry ?+ "." table) @@ -392,13 +398,20 @@ specifying build tags." (format "-tags %s" (string-join go-ts-mode-build-tags ",")) "")) +(defun go-ts-mode--get-test-flags () + "Return the flags for test invocation." + (if go-ts-mode-test-flags + (mapconcat #'shell-quote-argument go-ts-mode-test-flags " ") + "")) + (defun go-ts-mode--compile-test (regexp) "Compile the tests matching REGEXP. This function respects the `go-ts-mode-build-tags' variable for specifying build tags." - (compile (format "go test -v %s -run '%s'" + (compile (format "go test -v %s -run '%s' %s" (go-ts-mode--get-build-tags-flag) - regexp))) + regexp + (go-ts-mode--get-test-flags)))) (defun go-ts-mode--find-defun-at (start) "Return the first defun node from START." @@ -457,9 +470,10 @@ be run." (defun go-ts-mode-test-this-package () "Run all the unit tests under the current package." (interactive) - (compile (format "go test -v %s -run %s" + (compile (format "go test -v %s %s %s" (go-ts-mode--get-build-tags-flag) - default-directory))) + default-directory + (go-ts-mode--get-test-flags)))) ;; go.mod support. -- 2.32.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 04 14:06:13 2025 Received: (at 74786) by debbugs.gnu.org; 4 Jan 2025 19:06:13 +0000 Received: from localhost ([127.0.0.1]:57392 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tU9TR-0007sZ-00 for submit@debbugs.gnu.org; Sat, 04 Jan 2025 14:06:13 -0500 Received: from mail-4018.proton.ch ([185.70.40.18]:52327) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tU9TM-0007s0-Gm for 74786@debbugs.gnu.org; Sat, 04 Jan 2025 14:06:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rjt.dev; s=protonmail3; t=1736017561; x=1736276761; bh=y8gLd2lK/eYDx8PXKqgRETnYLc0/DTMfGJK4SDucPkY=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=nK6ISeQBCky9aT9KmP1DWSRnDE/6jWbAz01NYk8k8emZXmJDGPu7jY4hUjfVldmXx 3BIlcUNYGQk5tpCk6Uo4eJ1Ir9K+sg8BxnKaUZU7bosMuLqNBKb43BNM1pLxLFCJqt JBJ2U9ZoRkr7j/7ZE4eoRAj1IYMYT9V9ibBu76GPIBA1Fz5PStnGpOLxXpMRpYU2tQ Uh9Q+vxmWzyE50gMLdRejL0TaaETLpX1osaEBMxT4j50zPD9tlrV/O8aLk7T+AANF5 WT0jTRCWN6/sU0JuJnpTs+dLmolm0+kvliOW41votjnZmvdKywG+mRoBfBTuLGbgvf 57/99T+GRWPZQ== Date: Sat, 04 Jan 2025 19:05:55 +0000 To: "O'Brien, Will" From: Randy Taylor Subject: Re: bug#74786: [PATCH] Add custom args to test compile step Message-ID: In-Reply-To: References: <86wmg62pfs.fsf@gnu.org> <87wmg643g4.fsf@gmail.com> Feedback-ID: 44397038:user:proton X-Pm-Message-ID: e35d7f9155d9dd04e57da588cb5d3798a5ee1a5b MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74786 Cc: Robert Pluim , 74786@debbugs.gnu.org, Eli Zaretskii , "J.P." 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 (-) On Thursday, January 2nd, 2025 at 06:21, O'Brien, Will wrote: >=20 >=20 > On Wed, Jan 01 2025 at 23:50, Randy Taylor dev@rjt.dev wrote: >=20 > > Thanks, the patch looks good to me. > > There is a typo: > > + "Return the flags for test invoation." > > ^invocation >=20 >=20 > Fixed. >=20 > [...] >=20 > > > I think that we can remove the `-run` flag from this function. > > > What do others think? Also, should this be a separate bug/patch > > > (if indeed it is a bug) or I can incorporate this change into the > > > current change set. > >=20 > > I believe you are correct, we can get rid of the -run flag. > > Please incorporate these changes as part of this patch. >=20 >=20 > Done. >=20 > > (Side note, maybe we should actually pass the package to > > go test instead of relying on default directory but > > don't worry about that for this patch). >=20 >=20 > Will raise a new issue. >=20 > best > -- > will Thanks, looks good to me. Eli, please install if you have no further comments. Thanks in advance. From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 05 07:43:23 2025 Received: (at 74786-done) by debbugs.gnu.org; 5 Jan 2025 12:43:23 +0000 Received: from localhost ([127.0.0.1]:60289 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUPyS-0000cN-US for submit@debbugs.gnu.org; Sun, 05 Jan 2025 07:43:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41420) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tUPyQ-0000by-M6 for 74786-done@debbugs.gnu.org; Sun, 05 Jan 2025 07:43:19 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tUPyJ-0000n1-DG; Sun, 05 Jan 2025 07:43:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=m/Y+GEWjKy4SqMq6wclw+3GRXWDqsyaqNhLaLk79Vns=; b=C4IDEpz7QQqK 9Tlh1twlyu9f6VMTEzflcGytZ2POtBFmoU03lJLwdE9AUUA6fMTN6qeH8Gs/AV5LqQYwdEHe7wBBi B/GCW22KQji/oNlgHDS+/n57ThiJS8v+d8PCoqKCNZJU5oC0SvVIFH1ClMMP4NdiXUUJC4bNpxP18 rvQ0e3w5dM97/3mJnmjF41JBvi8d7sLmrHsBETxHxoymRvTJblklrNVOEzQDVUED8ZlJxWPdcuI8c 7nUBExF4kgnuJ1HcS5nVqU97p1wzYBCCDVlLC6zfgeJHl5hxDp/iH5P6/hy/FJ+S2+R0dXL/pAEWf O00VV7rfPRWBo7KgOWMQ/A==; Date: Sun, 05 Jan 2025 14:43:07 +0200 Message-Id: <868qrp8m90.fsf@gnu.org> From: Eli Zaretskii To: Randy Taylor In-Reply-To: (message from Randy Taylor on Sat, 04 Jan 2025 19:05:55 +0000) Subject: Re: bug#74786: [PATCH] Add custom args to test compile step References: <86wmg62pfs.fsf@gnu.org> <87wmg643g4.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 74786-done Cc: will.08rien@gmail.com, 74786-done@debbugs.gnu.org, rpluim@gmail.com, jp@neverwas.me 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: -3.3 (---) > Date: Sat, 04 Jan 2025 19:05:55 +0000 > From: Randy Taylor > Cc: "J.P." , Robert Pluim , Eli Zaretskii , 74786@debbugs.gnu.org > > Thanks, looks good to me. > > Eli, please install if you have no further comments. Thanks in > advance. Thanks, installed on the master branch, and closing the bug. From unknown Fri Jun 20 07:18:33 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 03 Feb 2025 12:24:17 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator