<feed xmlns='http://www.w3.org/2005/Atom'>
<title>guix/tests/style.scm, branch master</title>
<subtitle>Transactional package manager, declarative GNU/Linux distribution, reproducible deployment tool, and more! https://guix.gnu.org</subtitle>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/'/>
<entry>
<title>tests: style: conditionally disable two tests.</title>
<updated>2026-06-30T08:57:49+00:00</updated>
<author>
<name>Reepca Russelstein</name>
<email>reepca@russelstein.xyz</email>
</author>
<published>2026-06-29T04:06:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=cb7c32bb672d17bdf6e08f156ad612cbb428f025'/>
<id>cb7c32bb672d17bdf6e08f156ad612cbb428f025</id>
<content type='text'>
The length of the repository url causes it to go on its own line in 'guix
build guix' but not in 'make check' from a regular checkout with a shorter
TMPDIR.  Skip the tests in the case where they are currently known to fail,
until a proper fix can be implemented so that this doesn't block security
fixes from being deployed.

* tests/style.scm (%temporary-repository-file-name-too-long?): new variable.
  ("url-fetch-&gt;git-fetch, basic transformation",
   "url-fetch-&gt;git-fetch, preserved field" test cases): conditionally skip.

Fixes: guix/guix#6946
Change-Id: I4c14a89dac042a556b829398d12242b67cf579cd
Signed-off-by: Ludovic Courtès &lt;ludo@gnu.org&gt;
Merges: #9623
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The length of the repository url causes it to go on its own line in 'guix
build guix' but not in 'make check' from a regular checkout with a shorter
TMPDIR.  Skip the tests in the case where they are currently known to fail,
until a proper fix can be implemented so that this doesn't block security
fixes from being deployed.

* tests/style.scm (%temporary-repository-file-name-too-long?): new variable.
  ("url-fetch-&gt;git-fetch, basic transformation",
   "url-fetch-&gt;git-fetch, preserved field" test cases): conditionally skip.

Fixes: guix/guix#6946
Change-Id: I4c14a89dac042a556b829398d12242b67cf579cd
Signed-off-by: Ludovic Courtès &lt;ludo@gnu.org&gt;
Merges: #9623
</pre>
</div>
</content>
</entry>
<entry>
<title>style: Add ‘remove-input’ and related styling rules.</title>
<updated>2026-05-07T15:35:32+00:00</updated>
<author>
<name>Nicolas Graves</name>
<email>ngraves@ngraves.fr</email>
</author>
<published>2026-01-24T00:14:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=8a505cfd48264973f1208ffe04894af12074b8c7'/>
<id>8a505cfd48264973f1208ffe04894af12074b8c7</id>
<content type='text'>
* guix/scripts/style.scm (input-matches?, package-list-&gt;string,
%field-accessors, remove-from-package-field, transform-package-field):
Add variables.
(%options): Add options --remove-input, --remove-native-input,
--remove-propagated-input, and --parameter.
(guix-style): Implement those options.  To keep ony one autoload, use
specification-&gt;package+output rather than specification-&gt;package.

* tests/style.scm ("remove-input, single input removed",
"remove-input, one of multiple inputs removed",
"remove-input, middle input removed from list",
"remove-input, non-existent input unchanged",
"remove-input, input with output specifier",
"remove-native-input, single input removed",
"remove-native-input, one of multiple inputs removed",
"remove-native-input, does not affect inputs field",
"remove-propagated-input, single input removed",
"remove-propagated-input, one of multiple inputs removed",
"remove-propagated-input, does not affect other fields",
"remove-input from all three fields independently",
"remove-input, dry-run does not modify file"): New tests.
("url-fetch-&gt;git-fetch, preserved field"): Drop the use of %patch-path
and %package-module-path, which are not necessary because of -L.
Change the mocked procedure from specification-&gt;package to
specification-&gt;package+output, as in the implementation.

* doc/guix.texi (Invoking guix style): Add description for guix style
-S remove-*input rules.

Change-Id: I449c87930310a73ad316b4cb5db72d0906ea495d
Signed-off-by: Ludovic Courtès &lt;ludo@gnu.org&gt;
Merges: #5862
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* guix/scripts/style.scm (input-matches?, package-list-&gt;string,
%field-accessors, remove-from-package-field, transform-package-field):
Add variables.
(%options): Add options --remove-input, --remove-native-input,
--remove-propagated-input, and --parameter.
(guix-style): Implement those options.  To keep ony one autoload, use
specification-&gt;package+output rather than specification-&gt;package.

* tests/style.scm ("remove-input, single input removed",
"remove-input, one of multiple inputs removed",
"remove-input, middle input removed from list",
"remove-input, non-existent input unchanged",
"remove-input, input with output specifier",
"remove-native-input, single input removed",
"remove-native-input, one of multiple inputs removed",
"remove-native-input, does not affect inputs field",
"remove-propagated-input, single input removed",
"remove-propagated-input, one of multiple inputs removed",
"remove-propagated-input, does not affect other fields",
"remove-input from all three fields independently",
"remove-input, dry-run does not modify file"): New tests.
("url-fetch-&gt;git-fetch, preserved field"): Drop the use of %patch-path
and %package-module-path, which are not necessary because of -L.
Change the mocked procedure from specification-&gt;package to
specification-&gt;package+output, as in the implementation.

* doc/guix.texi (Invoking guix style): Add description for guix style
-S remove-*input rules.

Change-Id: I449c87930310a73ad316b4cb5db72d0906ea495d
Signed-off-by: Ludovic Courtès &lt;ludo@gnu.org&gt;
Merges: #5862
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: style: Fix tests for guile &gt; 3.0.9.</title>
<updated>2026-04-24T20:57:49+00:00</updated>
<author>
<name>Nicolas Graves</name>
<email>ngraves@ngraves.fr</email>
</author>
<published>2026-04-02T16:23:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=fbd8568c22df88321cf7ab4ce8e233fcb311737e'/>
<id>fbd8568c22df88321cf7ab4ce8e233fcb311737e</id>
<content type='text'>
* tests/style.scm : Drop the snippet that skipped all tests.
(read-package-field): Return S-expressions with comments rather than a
string.
Rewrite all tests accordingly.

Change-Id: I478611e7c58747a1b80598366c2b5510d9625498
Signed-off-by: Ludovic Courtès &lt;ludo@gnu.org&gt;
Merges: #7632
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* tests/style.scm : Drop the snippet that skipped all tests.
(read-package-field): Return S-expressions with comments rather than a
string.
Rewrite all tests accordingly.

Change-Id: I478611e7c58747a1b80598366c2b5510d9625498
Signed-off-by: Ludovic Courtès &lt;ludo@gnu.org&gt;
Merges: #7632
</pre>
</div>
</content>
</entry>
<entry>
<title>style: git-source: Handle more URLs.</title>
<updated>2026-03-10T21:53:54+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2026-03-04T20:48:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=78ddf62bfe2264c0085fdce4b2cbcad07f6eaf16'/>
<id>78ddf62bfe2264c0085fdce4b2cbcad07f6eaf16</id>
<content type='text'>
* guix/import/utils.scm (tarball-url-&gt;git-repository-url): New procedure.
* guix/scripts/style.scm (url-fetch-&gt;git-fetch)[transform-source]: Add
‘repository-url’ parameter.
Use ‘tarball-url-&gt;git-repository-url’ when ‘home-page’ is not a Git URL.
(transform-to-git-fetch): Rename ‘home-page’ to ‘repository-url’.
* tests/import/utils.scm ("tarball-url-&gt;git-repository-url, guile"): New test.
* tests/style.scm ("url-fetch-&gt;git-fetch, mirror:// URL"): New test.

Change-Id: I4f8ca7c67a58f917d69380678b62c00962b0f9cd
Signed-off-by: Ludovic Courtès &lt;ludo@gnu.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* guix/import/utils.scm (tarball-url-&gt;git-repository-url): New procedure.
* guix/scripts/style.scm (url-fetch-&gt;git-fetch)[transform-source]: Add
‘repository-url’ parameter.
Use ‘tarball-url-&gt;git-repository-url’ when ‘home-page’ is not a Git URL.
(transform-to-git-fetch): Rename ‘home-page’ to ‘repository-url’.
* tests/import/utils.scm ("tarball-url-&gt;git-repository-url, guile"): New test.
* tests/style.scm ("url-fetch-&gt;git-fetch, mirror:// URL"): New test.

Change-Id: I4f8ca7c67a58f917d69380678b62c00962b0f9cd
Signed-off-by: Ludovic Courtès &lt;ludo@gnu.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Adjust to Guile 3.0.10+.</title>
<updated>2026-01-25T20:23:25+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2026-01-03T21:15:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=d118a89d62ef1e85199f90a1267e555b49d38ee8'/>
<id>d118a89d62ef1e85199f90a1267e555b49d38ee8</id>
<content type='text'>
Guile 3.0.11 introduced a new implementation of (srfi srfi-34) with subtle
changes wrt. exceptionm handling.  This adjusts to these changes.

Changes in ‘tests/style.scm’ are due to the new output of (ice-9 pretty-print)
in 3.0.10.

* tests/file-systems.scm ("btrfs-store-subvolume-file-name (subvolid)"):
Specify the exception type.
* tests/services/file-sharing.scm ("transmission-password-hash, salt value too short")
("transmission-password-hash, salt value too long"): Likewise.
* tests/store.scm ("store-path-package-name #f"): Change to ‘test-error’
with #t as the exception type.
* tests/style.scm: Skip all the tests on Guile &gt; 3.0.9.
* tests/toml.scm &lt;top level&gt;: Set ‘raise’ in (guix build toml).
("parse-toml: No key"): Use ‘test-error’ instead of ‘test-equal’.
("parse-toml: Assignment to non-table"): Likewise.
("parse-toml: Invalid assignment to implicit table"): Change exception type
to #t
("parse-toml: Assignment to statically defined array"): Likewise.

Change-Id: I54ea77f22d3e95f72dad90690631876e7f013054
Signed-off-by: Ludovic Courtès &lt;ludo@gnu.org&gt;
Signed-off-by: Rutherther &lt;rutherther@ditigal.xyz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Guile 3.0.11 introduced a new implementation of (srfi srfi-34) with subtle
changes wrt. exceptionm handling.  This adjusts to these changes.

Changes in ‘tests/style.scm’ are due to the new output of (ice-9 pretty-print)
in 3.0.10.

* tests/file-systems.scm ("btrfs-store-subvolume-file-name (subvolid)"):
Specify the exception type.
* tests/services/file-sharing.scm ("transmission-password-hash, salt value too short")
("transmission-password-hash, salt value too long"): Likewise.
* tests/store.scm ("store-path-package-name #f"): Change to ‘test-error’
with #t as the exception type.
* tests/style.scm: Skip all the tests on Guile &gt; 3.0.9.
* tests/toml.scm &lt;top level&gt;: Set ‘raise’ in (guix build toml).
("parse-toml: No key"): Use ‘test-error’ instead of ‘test-equal’.
("parse-toml: Assignment to non-table"): Likewise.
("parse-toml: Invalid assignment to implicit table"): Change exception type
to #t
("parse-toml: Assignment to statically defined array"): Likewise.

Change-Id: I54ea77f22d3e95f72dad90690631876e7f013054
Signed-off-by: Ludovic Courtès &lt;ludo@gnu.org&gt;
Signed-off-by: Rutherther &lt;rutherther@ditigal.xyz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: style: Fix insufficient number of lines read.</title>
<updated>2025-11-15T06:53:15+00:00</updated>
<author>
<name>Martin Schitter</name>
<email>ms@mur.at</email>
</author>
<published>2025-11-04T04:00:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=944c20e171f98837c75820f50e6b98ad994ac375'/>
<id>944c20e171f98837c75820f50e6b98ad994ac375</id>
<content type='text'>
* tests/style.scm ("url-fetch-&gt;git-fetch, preserved field"):

The 9th line of origin, where the patches field is located,
was never read. (broken test since a1b0fde434)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* tests/style.scm ("url-fetch-&gt;git-fetch, preserved field"):

The 9th line of origin, where the patches field is located,
was never read. (broken test since a1b0fde434)
</pre>
</div>
</content>
</entry>
<entry>
<title>style: Add git-source rule.</title>
<updated>2025-10-24T14:42:54+00:00</updated>
<author>
<name>Nicolas Graves</name>
<email>ngraves@ngraves.fr</email>
</author>
<published>2025-09-04T11:53:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=a1b0fde434f905a4fe3a478d2f6d7fb4b7cca6df'/>
<id>a1b0fde434f905a4fe3a478d2f6d7fb4b7cca6df</id>
<content type='text'>
* guix/scripts/style.scm (transform-to-git-fetch)
(url-fetch-&gt;git-fetch): New procedures.
* doc/guix.texi: Add entry for git-source.
* tests/style.scm: Add tests for url-fetch-&gt;git-fetch.

Change-Id: I6192fba4d84619b81fbc75850542b9dbd2326d4a
Signed-off-by: Ludovic Courtès &lt;ludo@gnu.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* guix/scripts/style.scm (transform-to-git-fetch)
(url-fetch-&gt;git-fetch): New procedures.
* doc/guix.texi: Add entry for git-source.
* tests/style.scm: Add tests for url-fetch-&gt;git-fetch.

Change-Id: I6192fba4d84619b81fbc75850542b9dbd2326d4a
Signed-off-by: Ludovic Courtès &lt;ludo@gnu.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>style: Fix conversion of ‘unquote-splicing’ by ‘-S arguments’.</title>
<updated>2024-06-03T20:58:52+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2024-06-03T20:26:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=e8ab4ccaa7def9838a7fc240609028078a0988b0'/>
<id>e8ab4ccaa7def9838a7fc240609028078a0988b0</id>
<content type='text'>
* guix/scripts/style.scm (unquote-&gt;ungexp): Add missing comma for
‘ungexp-splicing’.
* tests/style.scm ("gexpify arguments, substitute-keyword-arguments +
unquote-splicing"): New test.

Change-Id: I17dcdd9b4812d54ddba1137e369360706b137bb4
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* guix/scripts/style.scm (unquote-&gt;ungexp): Add missing comma for
‘ungexp-splicing’.
* tests/style.scm ("gexpify arguments, substitute-keyword-arguments +
unquote-splicing"): New test.

Change-Id: I17dcdd9b4812d54ddba1137e369360706b137bb4
</pre>
</div>
</content>
</entry>
<entry>
<title>style: Add 'arguments' styling rule.</title>
<updated>2023-05-18T18:01:32+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2023-05-05T15:34:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=ba5da5125a81307500982517e2f458d57b024668'/>
<id>ba5da5125a81307500982517e2f458d57b024668</id>
<content type='text'>
* guix/scripts/style.scm (unquote-&gt;ungexp, gexpify-argument-value)
(quote-argument-value, gexpify-argument-tail)
(gexpify-package-arguments): New procedures.
(%gexp-keywords): New variable.
(%options): Add "arguments" case for 'styling-procedure.
(show-stylings): Update.
* tests/style.scm ("gexpify arguments, already gexpified")
("gexpify arguments, non-gexp arguments, margin comment")
("gexpify arguments, phases and flags")
("gexpify arguments, append arguments")
("gexpify arguments, substitute-keyword-arguments")
("gexpify arguments, append substitute-keyword-arguments"): New tests.
* doc/guix.texi (package Reference): For 'arguments', add compatibility
note and link to 'guix style'.
(Invoking guix style): Document the 'arguments' styling rule.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* guix/scripts/style.scm (unquote-&gt;ungexp, gexpify-argument-value)
(quote-argument-value, gexpify-argument-tail)
(gexpify-package-arguments): New procedures.
(%gexp-keywords): New variable.
(%options): Add "arguments" case for 'styling-procedure.
(show-stylings): Update.
* tests/style.scm ("gexpify arguments, already gexpified")
("gexpify arguments, non-gexp arguments, margin comment")
("gexpify arguments, phases and flags")
("gexpify arguments, append arguments")
("gexpify arguments, substitute-keyword-arguments")
("gexpify arguments, append substitute-keyword-arguments"): New tests.
* doc/guix.texi (package Reference): For 'arguments', add compatibility
note and link to 'guix style'.
(Invoking guix style): Document the 'arguments' styling rule.
</pre>
</div>
</content>
</entry>
<entry>
<title>style: Make 'safe' policy less conservative.</title>
<updated>2023-05-04T15:06:43+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2023-05-04T14:41:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=68fa28b3c3f6cca4485575b6dfa418be656443e7'/>
<id>68fa28b3c3f6cca4485575b6dfa418be656443e7</id>
<content type='text'>
Previously, a mere (arguments '(#:tests? #f)) would lead

  guix style -S inputs --input-simplification=safe

to bail out.  It now recognizes such trivial argument lists and
proceeds.

* guix/scripts/style.scm (trivial-package-arguments?): New procedure.
(simplify-package-inputs): Use it in the 'safe case instead of 'null?'.
* tests/style.scm ("input labels, 'safe' policy, trivial arguments"):
New test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, a mere (arguments '(#:tests? #f)) would lead

  guix style -S inputs --input-simplification=safe

to bail out.  It now recognizes such trivial argument lists and
proceeds.

* guix/scripts/style.scm (trivial-package-arguments?): New procedure.
(simplify-package-inputs): Use it in the 'safe case instead of 'null?'.
* tests/style.scm ("input labels, 'safe' policy, trivial arguments"):
New test.
</pre>
</div>
</content>
</entry>
</feed>
