mbox series

[bug#51359,0/1] home-state-service-type and tests suite

Message ID 20211023180446.3362-1-go.wigust@gmail.com
Headers show
Series home-state-service-type and tests suite | expand

Message

Oleg Pykhalov Oct. 23, 2021, 6:04 p.m. UTC
Hi Guix,

This patch adds support for home-state-service-type which copied from the rde
project [1].  The introduction to home state services in documentation is
copied from discussion [2].

Tests passed:

    make check-system TESTS="home-state-git"
    make check-system TESTS="home-state-rsync"

[1] https://github.com/abcdw/rde/
[2] https://lists.sr.ht/~abcdw/rde-devel/%3C87pmzze9nn.fsf%40trop.in%3E#%3CCABrWRW1Fq-8mS=MbWJedUpayj1vFg-YE0oNF3zVTYWBMnp29Lg@mail.gmail.com%3E

Oleg Pykhalov (1):
  home: services: Add state services.

 doc/guix.texi                         |  32 ++
 gnu/home.scm                          |  12 +
 gnu/home/services/state.scm           | 210 ++++++++++++
 gnu/home/services/utils.scm           |  81 ++++-
 gnu/home/services/version-control.scm | 442 ++++++++++++++++++++++++++
 gnu/local.mk                          |   2 +
 gnu/tests/rsync.scm                   | 158 ++++++++-
 gnu/tests/version-control.scm         | 140 +++++++-
 guix/scripts/home.scm                 | 100 +++++-
 9 files changed, 1163 insertions(+), 14 deletions(-)
 create mode 100644 gnu/home/services/state.scm
 create mode 100644 gnu/home/services/version-control.scm

Comments

Xinglu Chen Oct. 30, 2021, 11:10 a.m. UTC | #1
On Sat, Oct 23 2021, Oleg Pykhalov wrote:

> Hi Guix,
>
> This patch adds support for home-state-service-type which copied from the rde
> project [1].  The introduction to home state services in documentation is
> copied from discussion [2].

There are still quite a few things that have to be fixed with Guix
Home[1][2][3][4], so I suggest we fix those before adding new services.

Also, Andrew mentioned a while a go that he was going to re-design the
state services; maybe he has some updates on that.

[1]: <https://issues.guix.gnu.org/50945> and <https://issues.guix.gnu.org/50941>
[2]: <https://issues.guix.gnu.org/51141>
[3]: <https://issues.guix.gnu.org/50978>
[4]: <https://issues.guix.gnu.org/50990>
Andrew Tropin June 8, 2022, 4:10 p.m. UTC | #2
On 2021-10-23 21:04, Oleg Pykhalov wrote:

> Hi Guix,
>
> This patch adds support for home-state-service-type which copied from the rde
> project [1].  The introduction to home state services in documentation is
> copied from discussion [2].
>
> Tests passed:
>
>     make check-system TESTS="home-state-git"
>     make check-system TESTS="home-state-rsync"
>
> [1] https://github.com/abcdw/rde/
> [2] https://lists.sr.ht/~abcdw/rde-devel/%3C87pmzze9nn.fsf%40trop.in%3E#%3CCABrWRW1Fq-8mS=MbWJedUpayj1vFg-YE0oNF3zVTYWBMnp29Lg@mail.gmail.com%3E
>
> Oleg Pykhalov (1):
>   home: services: Add state services.
>
>  doc/guix.texi                         |  32 ++
>  gnu/home.scm                          |  12 +
>  gnu/home/services/state.scm           | 210 ++++++++++++
>  gnu/home/services/utils.scm           |  81 ++++-
>  gnu/home/services/version-control.scm | 442 ++++++++++++++++++++++++++
>  gnu/local.mk                          |   2 +
>  gnu/tests/rsync.scm                   | 158 ++++++++-
>  gnu/tests/version-control.scm         | 140 +++++++-
>  guix/scripts/home.scm                 | 100 +++++-
>  9 files changed, 1163 insertions(+), 14 deletions(-)
>  create mode 100644 gnu/home/services/state.scm
>  create mode 100644 gnu/home/services/version-control.scm

Hi Oleg!

Thank you for the patch, but states are very WIP and not ready for
upstream yet IMO.  Also, I would like to reevaluate implementation of
git service-type and probably merge it separately.

Sorry for replying slowly :)  

Hope I will get back to states in foreseable future and will carefully
rethink, refactor and cleanup the code.

BTW, do you use states?  Can you share your experience with it?
Oleg Pykhalov June 8, 2022, 5:02 p.m. UTC | #3
Hi Andrew,

Andrew Tropin <andrew@trop.in> writes:

[…]

> Thank you for the patch, but states are very WIP and not ready for
> upstream yet IMO.  Also, I would like to reevaluate implementation of
> git service-type and probably merge it separately.
>
> Hope I will get back to states in foreseable future and will carefully
> rethink, refactor and cleanup the code.

If the user's configuration will stay the same, we probably could merge.

> BTW, do you use states?  Can you share your experience with it?

I tried the git state and it worked, don't remember rsync.  Also I don't
use it since the patch submitting day, because of plans to rewrite it.

Oleg.
Andrew Tropin June 8, 2022, 6:23 p.m. UTC | #4
On 2022-06-08 20:02, Oleg Pykhalov wrote:

> Hi Andrew,
>
> Andrew Tropin <andrew@trop.in> writes:
>
> […]
>
>> Thank you for the patch, but states are very WIP and not ready for
>> upstream yet IMO.  Also, I would like to reevaluate implementation of
>> git service-type and probably merge it separately.
>>
>> Hope I will get back to states in foreseable future and will carefully
>> rethink, refactor and cleanup the code.
>
> If the user's configuration will stay the same, we probably could merge.
>

Not sure if it will stay the same.  The implementation is quite fragile
and for sure should be revisited, maybe the user facing interface can be
organized better as well.

>> BTW, do you use states?  Can you share your experience with it?
>
> I tried the git state and it worked, don't remember rsync.  Also I don't
> use it since the patch submitting day, because of plans to rewrite it.

Ok.  I think I'll experiment with a new version of states in rde project
first and later will come back to merging it to Guix.  It seems as an
important feature, but it's hard to say when I'll get to it.