guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Outreachy - Guix Data Service: questions about improving the data fo


From: Luciana Lima Brito
Subject: Re: Outreachy - Guix Data Service: questions about improving the data for derivation comparisons.
Date: Sun, 25 Apr 2021 20:15:07 +0000

Hi

Your advices helped me think more clearly.

There was no need to create or modify structures other than what I was
already changing. I now return an alist instead of a list on the
derivation-differences-* functions on comparison.scm (for outputs,
inputs and sources). It helped to simplify the mapping on
controller.scm. The changes on html.scm were minimal, basically it is
matching on pairs, instead of single values.

Two questions:

1 - The match on the html expects 5 values for "outputs", so I had to
settle on using empty objects on the JSON, when needed, else it would
break the match on the html. Is it ok?

2 - Now on controller.scm "outputs", "inputs", "sources", and even
"arguments" have the same structure, which is an alist of the form:

  ((base . (...))
   (target . (...))
   (common . (...)))

and I'm using the same map and match-lambda code to process them,
wouldn't it be reasonable now to make it a local function?

I'm sending the patch. I'll be waiting your reviews.

-- 
Best Regards,

Luciana Lima Brito
MSc. in Computer Science

Attachment: 0001-Change-handling-of-queried-data-for-derivations-comp.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]