Subject: [bug#28283] Status: [PATCH 1/1] gnu: services: version-control: Add cgit.

From: Oleg Pykhalov <[email-masked]>
Date: Fri, 22 Sep 2017 20:57:33 +0300

Hello Ludovic,

[email-masked] (Ludovic Courtès) writes:

> Hi Oleg,
>
> Oleg Pykhalov <[email-masked]> skribis:
>
>> [email-masked] (Ludovic Courtès) writes:
>>
>>> Hello Oleg,
>>>
>>> This patch fell through the cracks.  :-)
>>>
>>> Could you look into the comments I made below and send updated patches?
>>> We’re almost there!
>>
>> Yes, I looked them already few days ago.  Your last comment was about
>> nginx changes.  I'm working on it.  But I have issue with stucture when
>> I try to test.
>>
>> natsu@magnolia ~/src/guix$ guix environment guix -- make check-system TESTS=nginx
>> ;;; note: source file /home/natsu/src/guix-wigust/wigust/packages/emacs.scm
>> ;;;       newer than compiled /home/natsu/.cache/guile/ccache/2.2-LE-8-3.A/home/natsu/src/guix-wigust/wigust/packages/emacs.scm.go
>> substitute: updating list of substitutes from 'https://berlin.guixsd.org'... 100.0%
>> Compiling Scheme modules...
>> warning: failed to load '(gnu tests web)':
>> ERROR: In procedure allocate-struct: Wrong type argument in position 2: 9
>> Running 0 system tests...
>> TOTAL: 0
>
> This (admittedly obscure) error is the symptom of an ABI breakage:
> specifically, commit b714395a39fffc60f75408504a23dfe27ad13fc2 introduced
> a couple of new fields to the <service-type> record type, hence this
> error.

Yes, I thought I did this.  But I made this again today.  Same error.

> The solution in this case is to “rm -f gnu/*.go gnu/s*/*g.o && make”.
>
> HTH!
>
> Ludo’.

After I made another Git working tree with Magit.
--8<---------------cut here---------------start------------->8---
natsu@magnolia ~/src/guix-devel-nginx-test$ ./bootstrap 
…
natsu@magnolia ~/src/guix-devel-nginx-test$ ./configure --localstatedir=/var --prefix=''
…
natsu@magnolia ~/src/guix-devel-nginx-test$ guix environment guix --ad-hoc help2man -- make
…
--8<---------------cut here---------------end--------------->8---

Then I added new field to record:
--8<---------------cut here---------------start------------->8---
(define-record-type* <nginx-server-configuration>
  …
  (try-files           nginx-server-configuration-try-files
                       (default '())))
--8<---------------cut here---------------end--------------->8---

Testing:
--8<---------------cut here---------------start------------->8---
natsu@magnolia ~/src/guix-devel-nginx-test$ guix environment guix -- make check-system TESTS=nginx
;;; note: source file /home/natsu/src/guix-wigust/wigust/packages/emacs.scm
;;;       newer than compiled /home/natsu/.cache/guile/ccache/2.2-LE-8-3.A/home/natsu/src/guix-wigust/wigust/packages/emacs.scm.go
Compiling Scheme modules...
  LOAD     (gnu services web)
;;; note: source file ./gnu/services/web.scm
;;;       newer than compiled /home/natsu/src/guix-devel-nginx-test/gnu/services/web.go
  GUILEC   gnu/services/web.go
warning: failed to load '(gnu tests web)':
ERROR: In procedure allocate-struct: Wrong type argument in position 2: 9
Running 0 system tests...
TOTAL: 0
--8<---------------cut here---------------end--------------->8---