all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andrew Tropin <andrew@trop.in>
To: 宋文武 <iyzsong@envs.net>, "Ludovic Courtès" <ludo@gnu.org>
Cc: 65119@debbugs.gnu.org, "Ludovic Courtès" <ludo@gnu.org>,
	paren@disroot.org
Subject: [bug#65119] [PATCH 0/8] Sharing service code between Home and System
Date: Mon, 21 Aug 2023 17:43:21 +0400	[thread overview]
Message-ID: <87r0nwh5om.fsf@trop.in> (raw)
In-Reply-To: <87ttt3a4tm.fsf@envs.net>

[-- Attachment #1: Type: text/plain, Size: 2552 bytes --]

On 2023-08-13 13:28, 宋文武 wrote:

> Ludovic Courtès <ludo@gnu.org> writes:
>
>> [...]
>>
>> This patch lets us map System services to Home and uses the new
>> mechanism for three services: mcron, dicod, and syncthing.
>>
>>   services: dicod: Remove Shepherd < 0.9.0 compatibility layer.
>>   services: dicod: Pre-build the GCIDE index.
>>   services: syncthing: Use 'match-record'.
>>   services: Define 'for-home'.
>>   home: services: Support mapping of System services to Home services.
>>   home: services: mcron: Define as a mapping of the system service.
>>   home: services: Add dicod.
>>   home: services: Add Syncthing.
>
> I didn't test them, but those changes look good to me!

Hi Ludovic, 宋文武!

Sorry for comming late to the party, I saw this message only a week ago
and didn't have time to make an extensive reply yet, so I will share my
quick thought on the most problematic part and maybe later will
formulate others thoughts in more details.

define-service-type-mapping looks imperative and potentially very
problematic.  Collecting those values in unknown order and applying this
implicit transformation making a good room for foot shooting.  Imagine
someone would like to use his own (let's say) shepherd home service
implementation and will add this to one of the source files of their
channel:

--8<---------------cut here---------------start------------->8---
(define-service-type-mapping
  shepherd-root-service-type => my-home-shepherd-service-type)
--8<---------------cut here---------------end--------------->8---

What happens if somebody will use his channel just for getting some
package?  Very likely it would break the build or in the worst case it
will build with unexpected service implementation under the hood.

I had [1][2] and still have concerns about macros and records
composability and reusability.  I personally don't like excessive usage
of them in general.  By adding more macros, already quite complex guix
services mechanism becomes even more harder to learn, inspect, reason
about and work with.  In addition to that it has a major technical issue
mentioned above.  I'm strongly against this change and would suggest to
revert it.

I hope it doesn't sound rude and I'm really thankful for your work on
this, but I just think it's not the right solution, at least yet, in its
current form.

[1]: https://yhetil.org/guix-devel/878rvp1deg.fsf@trop.in/T/#u
[2]: https://yhetil.org/87ild88kax.fsf@trop.in
-- 
Best regards,
Andrew Tropin

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  parent reply	other threads:[~2023-08-21 13:44 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-06 21:04 [bug#65119] [PATCH 0/8] Sharing service code between Home and System Ludovic Courtès
2023-08-06 21:07 ` [bug#65119] [PATCH 1/8] services: dicod: Remove Shepherd < 0.9.0 compatibility layer Ludovic Courtès
2023-08-06 21:07 ` [bug#65119] [PATCH 2/8] services: dicod: Pre-build the GCIDE index Ludovic Courtès
2023-08-06 21:07 ` [bug#65119] [PATCH 3/8] services: syncthing: Use 'match-record' Ludovic Courtès
2023-08-06 21:07 ` [bug#65119] [PATCH 4/8] services: Define 'for-home' Ludovic Courtès
2023-08-06 21:07 ` [bug#65119] [PATCH 5/8] home: services: Support mapping of System services to Home services Ludovic Courtès
2023-08-06 21:07 ` [bug#65119] [PATCH 6/8] home: services: mcron: Define as a mapping of the system service Ludovic Courtès
2023-08-21 15:50   ` Andrew Tropin
2023-08-06 21:07 ` [bug#65119] [PATCH 7/8] home: services: Add dicod Ludovic Courtès
2023-08-06 21:07 ` [bug#65119] [PATCH 8/8] home: services: Add Syncthing Ludovic Courtès
2023-08-13  5:28 ` [bug#65119] [PATCH 0/8] Sharing service code between Home and System 宋文武 via Guix-patches via
2023-08-20 21:23   ` bug#65119: " Ludovic Courtès
2023-08-21 13:43   ` Andrew Tropin [this message]
2023-08-22 16:25     ` [bug#65119] " Ludovic Courtès
2023-08-25  6:28       ` Andrew Tropin
2023-09-08 12:42         ` Andrew Tropin
2023-09-08 22:18         ` Ludovic Courtès
2023-09-09 10:42           ` Andrew Tropin
2023-09-13 18:06             ` Ludovic Courtès
2023-09-17  5:28               ` Andrew Tropin
2023-09-17 10:27                 ` Ludovic Courtès
2023-09-13 19:55             ` Ludovic Courtès
2023-09-17  7:01               ` Andrew Tropin
2023-10-13 16:05                 ` Ludovic Courtès
2023-10-14  6:03                   ` Andrew Tropin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r0nwh5om.fsf@trop.in \
    --to=andrew@trop.in \
    --cc=65119@debbugs.gnu.org \
    --cc=iyzsong@envs.net \
    --cc=ludo@gnu.org \
    --cc=paren@disroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.