* Re: 02/02: services: Add Gitolite.
[not found] ` <20180928200105.E0B4F20476@vcs0.savannah.gnu.org>
@ 2018-09-30 1:45 ` Mark H Weaver
2018-09-30 10:28 ` Christopher Baines
0 siblings, 1 reply; 5+ messages in thread
From: Mark H Weaver @ 2018-09-30 1:45 UTC (permalink / raw)
To: guix-devel
Hi Christopher,
mail@cbaines.net (Christopher Baines) writes:
> cbaines pushed a commit to branch master
> in repository guix.
>
> commit 258a6d944ed891fa92fa87a16731e5dfe0bac477
> Author: Christopher Baines <mail@cbaines.net>
> Date: Fri Jul 13 20:39:46 2018 +0100
>
> services: Add Gitolite.
>
> * gnu/services/version-control.scm (<gitolite-configuration>,
> <gitolite-rc-file>): New record types.
> (gitolite-accounts, gitolite-activation): New procedures.
> (gitolite-service-type): New variables.
> * gnu/tests/version-control.scm (%gitolite-test-admin-keypair, %gitolite-os,
> %test-gitolite): New variables.
> (run-gitolite-test): New procedure.
> * doc/guix.texi (Version Control): Document the gitolite service.
This commit has a flaw which broke evaluations on Hydra, so I reverted
it for now.
> +(define-gexp-compiler (gitolite-rc-file-compiler
> + (file <gitolite-rc-file>) system target)
> + (match file
> + (($ <gitolite-rc-file> umask git-config-keys roles enable)
> + (apply text-file* "gitolite.rc"
> + `("%RC = (\n"
> + " UMASK => " ,(format #f "~4,'0o" umask) ",\n"
The problem is here, in the call to 'format'. Guile has two variants of
the 'format' procedure: a very simple one which is always available
(also known as 'simple-format'), and a much more complex and featureful
variant in (ice-9 format). In the code above, you are assuming that
(ice-9 format) has been loaded, but you have not arranged for that to
happen. During the Hydra evaluation, this led to the following error:
--8<---------------cut here---------------start------------->8---
0 (simple-format #f "~4,'0o" 63)
ERROR: In procedure simple-format:
In procedure simple-format: FORMAT: Unsupported format option ~4 - use (ice-9 format) instead
--8<---------------cut here---------------end--------------->8---
I guess that the fix will involve 'with-imported-modules'.
Could you take a look?
Mark
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: 02/02: services: Add Gitolite.
2018-09-30 1:45 ` 02/02: services: Add Gitolite Mark H Weaver
@ 2018-09-30 10:28 ` Christopher Baines
2018-09-30 19:25 ` Mark H Weaver
2018-09-30 20:17 ` Ludovic Courtès
0 siblings, 2 replies; 5+ messages in thread
From: Christopher Baines @ 2018-09-30 10:28 UTC (permalink / raw)
To: Mark H Weaver; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 2847 bytes --]
Mark H Weaver <mhw@netris.org> writes:
> Hi Christopher,
>
> mail@cbaines.net (Christopher Baines) writes:
>
>> cbaines pushed a commit to branch master
>> in repository guix.
>>
>> commit 258a6d944ed891fa92fa87a16731e5dfe0bac477
>> Author: Christopher Baines <mail@cbaines.net>
>> Date: Fri Jul 13 20:39:46 2018 +0100
>>
>> services: Add Gitolite.
>>
>> * gnu/services/version-control.scm (<gitolite-configuration>,
>> <gitolite-rc-file>): New record types.
>> (gitolite-accounts, gitolite-activation): New procedures.
>> (gitolite-service-type): New variables.
>> * gnu/tests/version-control.scm (%gitolite-test-admin-keypair, %gitolite-os,
>> %test-gitolite): New variables.
>> (run-gitolite-test): New procedure.
>> * doc/guix.texi (Version Control): Document the gitolite service.
>
> This commit has a flaw which broke evaluations on Hydra, so I reverted
> it for now.
>
>> +(define-gexp-compiler (gitolite-rc-file-compiler
>> + (file <gitolite-rc-file>) system target)
>> + (match file
>> + (($ <gitolite-rc-file> umask git-config-keys roles enable)
>> + (apply text-file* "gitolite.rc"
>> + `("%RC = (\n"
>> + " UMASK => " ,(format #f "~4,'0o" umask) ",\n"
>
> The problem is here, in the call to 'format'. Guile has two variants of
> the 'format' procedure: a very simple one which is always available
> (also known as 'simple-format'), and a much more complex and featureful
> variant in (ice-9 format). In the code above, you are assuming that
> (ice-9 format) has been loaded, but you have not arranged for that to
> happen. During the Hydra evaluation, this led to the following error:
>
> --8<---------------cut here---------------start------------->8---
> 0 (simple-format #f "~4,'0o" 63)
>
> ERROR: In procedure simple-format:
> In procedure simple-format: FORMAT: Unsupported format option ~4 - use (ice-9 format) instead
> --8<---------------cut here---------------end--------------->8---
Thanks for looking at this Mark, do you know where I can find out what
Hydra is doing when it encounters this error? I tried looking around the
web interface, but the latest evaluation I could find was from 2017
apparently.
> I guess that the fix will involve 'with-imported-modules'.
> Could you take a look?
Sure. The confusing thing to me here is that this code works when using
the service, including the system test (at least when I run it
locally). Also, as far as I understand, even though the code is within a
gexp-compiler, it doesn't even involve the store, as the call to format
happens before the g-expression is generated.
It sounds to me like adding #:use-modules (ice-9 format) to (gnu
services version-control) would fix this, but I'll wait until I can
reproduce the failure before re-adding the service.
Thanks,
Chris
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: 02/02: services: Add Gitolite.
2018-09-30 10:28 ` Christopher Baines
@ 2018-09-30 19:25 ` Mark H Weaver
2018-09-30 20:17 ` Ludovic Courtès
1 sibling, 0 replies; 5+ messages in thread
From: Mark H Weaver @ 2018-09-30 19:25 UTC (permalink / raw)
To: Christopher Baines; +Cc: guix-devel
Hi Christopher,
Christopher Baines <mail@cbaines.net> writes:
> Mark H Weaver <mhw@netris.org> writes:
>
>> mail@cbaines.net (Christopher Baines) writes:
>>
>>> cbaines pushed a commit to branch master
>>> in repository guix.
>>>
>>> commit 258a6d944ed891fa92fa87a16731e5dfe0bac477
>>> Author: Christopher Baines <mail@cbaines.net>
>>> Date: Fri Jul 13 20:39:46 2018 +0100
>>>
>>> services: Add Gitolite.
>>>
>>> * gnu/services/version-control.scm (<gitolite-configuration>,
>>> <gitolite-rc-file>): New record types.
>>> (gitolite-accounts, gitolite-activation): New procedures.
>>> (gitolite-service-type): New variables.
>>> * gnu/tests/version-control.scm (%gitolite-test-admin-keypair, %gitolite-os,
>>> %test-gitolite): New variables.
>>> (run-gitolite-test): New procedure.
>>> * doc/guix.texi (Version Control): Document the gitolite service.
>>
>> This commit has a flaw which broke evaluations on Hydra, so I reverted
>> it for now.
>>
>>> +(define-gexp-compiler (gitolite-rc-file-compiler
>>> + (file <gitolite-rc-file>) system target)
>>> + (match file
>>> + (($ <gitolite-rc-file> umask git-config-keys roles enable)
>>> + (apply text-file* "gitolite.rc"
>>> + `("%RC = (\n"
>>> + " UMASK => " ,(format #f "~4,'0o" umask) ",\n"
>>
>> The problem is here, in the call to 'format'. Guile has two variants of
>> the 'format' procedure: a very simple one which is always available
>> (also known as 'simple-format'), and a much more complex and featureful
>> variant in (ice-9 format). In the code above, you are assuming that
>> (ice-9 format) has been loaded, but you have not arranged for that to
>> happen. During the Hydra evaluation, this led to the following error:
>>
>> --8<---------------cut here---------------start------------->8---
>> 0 (simple-format #f "~4,'0o" 63)
>>
>> ERROR: In procedure simple-format:
>> In procedure simple-format: FORMAT: Unsupported format option ~4 - use (ice-9 format) instead
>> --8<---------------cut here---------------end--------------->8---
>
> Thanks for looking at this Mark, do you know where I can find out what
> Hydra is doing when it encounters this error? I tried looking around the
> web interface, but the latest evaluation I could find was from 2017
> apparently.
Hydra's web interface is the wrong place to look for information on
this problem.
I guess the error happens when Hydra tries to create a derivation for
the system test '%test-gitolite'.
The relevant code that Hydra runs to generate an evaluation is in
build-aux/hydra/gnu-system.scm. Specifically, 'system-test-jobs', which
calls (all-system-tests) from gnu/tests.scm, which looks for public
variables bound to 'system-test' records. That includes
'%test-gitolite'.
>> I guess that the fix will involve 'with-imported-modules'. Could you
>> take a look?
>
> Sure. The confusing thing to me here is that this code works when using
> the service, including the system test (at least when I run it
> locally). Also, as far as I understand, even though the code is within a
> gexp-compiler, it doesn't even involve the store, as the call to format
> happens before the g-expression is generated.
>
> It sounds to me like adding #:use-modules (ice-9 format) to (gnu
> services version-control) would fix this, but I'll wait until I can
> reproduce the failure before re-adding the service.
I'm not yet sufficiently familiar with gexp compilation to know where
the call to 'format' is ultimately being executed, and I don't have time
right now to investigate further, so I hoping that Ludovic can chime in
here with a definitive answer on how to fix this properly.
Mark
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: 02/02: services: Add Gitolite.
2018-09-30 10:28 ` Christopher Baines
2018-09-30 19:25 ` Mark H Weaver
@ 2018-09-30 20:17 ` Ludovic Courtès
2018-10-02 7:20 ` Christopher Baines
1 sibling, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2018-09-30 20:17 UTC (permalink / raw)
To: Christopher Baines; +Cc: guix-devel
Christopher Baines <mail@cbaines.net> skribis:
> Mark H Weaver <mhw@netris.org> writes:
[...]
>>> +(define-gexp-compiler (gitolite-rc-file-compiler
>>> + (file <gitolite-rc-file>) system target)
>>> + (match file
>>> + (($ <gitolite-rc-file> umask git-config-keys roles enable)
>>> + (apply text-file* "gitolite.rc"
>>> + `("%RC = (\n"
>>> + " UMASK => " ,(format #f "~4,'0o" umask) ",\n"
[...]
>> --8<---------------cut here---------------start------------->8---
>> 0 (simple-format #f "~4,'0o" 63)
>>
>> ERROR: In procedure simple-format:
>> In procedure simple-format: FORMAT: Unsupported format option ~4 - use (ice-9 format) instead
>> --8<---------------cut here---------------end--------------->8---
[...]
> It sounds to me like adding #:use-modules (ice-9 format) to (gnu
> services version-control) would fix this, but I'll wait until I can
> reproduce the failure before re-adding the service.
Yes, adding #:use-module (ice-9 format) will fix the problem.
You should be able to reproduce it by running “make hydra-jobs”.
As to why you can’t necessarily reproduce it… It turns out that loading
(ice-9 format) has the effect of set!ting the global ‘format’ binding.
So if some unrelated piece of code loads (ice-9 format), you don’t have
any problems; but if that doesn’t happen, you get the error.
This terrible behavior has been in Guile forever and nobody has dared
changing it so far. :-) The -Wformat warning tries hard to diagnose
the issue though.
HTH!
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: 02/02: services: Add Gitolite.
2018-09-30 20:17 ` Ludovic Courtès
@ 2018-10-02 7:20 ` Christopher Baines
0 siblings, 0 replies; 5+ messages in thread
From: Christopher Baines @ 2018-10-02 7:20 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 1889 bytes --]
Ludovic Courtès <ludo@gnu.org> writes:
> Christopher Baines <mail@cbaines.net> skribis:
>
>> Mark H Weaver <mhw@netris.org> writes:
>
> [...]
>
>>>> +(define-gexp-compiler (gitolite-rc-file-compiler
>>>> + (file <gitolite-rc-file>) system target)
>>>> + (match file
>>>> + (($ <gitolite-rc-file> umask git-config-keys roles enable)
>>>> + (apply text-file* "gitolite.rc"
>>>> + `("%RC = (\n"
>>>> + " UMASK => " ,(format #f "~4,'0o" umask) ",\n"
>
> [...]
>
>>> --8<---------------cut here---------------start------------->8---
>>> 0 (simple-format #f "~4,'0o" 63)
>>>
>>> ERROR: In procedure simple-format:
>>> In procedure simple-format: FORMAT: Unsupported format option ~4 - use (ice-9 format) instead
>>> --8<---------------cut here---------------end--------------->8---
>
> [...]
>
>> It sounds to me like adding #:use-modules (ice-9 format) to (gnu
>> services version-control) would fix this, but I'll wait until I can
>> reproduce the failure before re-adding the service.
>
> Yes, adding #:use-module (ice-9 format) will fix the problem.
>
> You should be able to reproduce it by running “make hydra-jobs”.
>
> As to why you can’t necessarily reproduce it… It turns out that loading
> (ice-9 format) has the effect of set!ting the global ‘format’ binding.
> So if some unrelated piece of code loads (ice-9 format), you don’t have
> any problems; but if that doesn’t happen, you get the error.
>
> This terrible behavior has been in Guile forever and nobody has dared
> changing it so far. :-) The -Wformat warning tries hard to diagnose
> the issue though.
Thanks both. I've added the #:use-module (ice-9 format) bit, and pushed
now. Locally I got make hydra-jobs.scm to run successfully, so hopefully
this hasn't broken anything this time :)
Chris
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-10-02 7:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20180928200104.10056.60968@vcs0.savannah.gnu.org>
[not found] ` <20180928200105.E0B4F20476@vcs0.savannah.gnu.org>
2018-09-30 1:45 ` 02/02: services: Add Gitolite Mark H Weaver
2018-09-30 10:28 ` Christopher Baines
2018-09-30 19:25 ` Mark H Weaver
2018-09-30 20:17 ` Ludovic Courtès
2018-10-02 7:20 ` Christopher Baines
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.