From: Suhail <suhail@bayesians.ca>
To: Simon Tournier <zimon.toutoune@gmail.com>
Cc: Suhail <suhail@bayesians.ca>,
Felix Lechner via <help-guix@gnu.org>,
Julien Lepiller <julien@lepiller.eu>,
Felix Lechner <felix.lechner@lease-up.com>
Subject: Re: Turning off tests leads to a different store item
Date: Thu, 02 Nov 2023 15:25:33 +0000 [thread overview]
Message-ID: <87r0l818ka.fsf@> (raw)
Simon Tournier <zimon.toutoune@gmail.com> writes:
> On Wed, 01 Nov 2023 at 17:52, Suhail <suhail@bayesians.ca> wrote:
>
>> If not, why should skipping the tests result in a different
>> derivation tree?
>
> The store path is different because it hashes all the inputs, included
> the builder script; from my understanding.
It certainly seems to be the case. Would you know the specific place(s)
in the source code (in addition to guix/derivations.scm and
guix/store.scm) that would be relevant for this discussion?
On a related note, is Dolstra's phd thesis relevant for these aspects,
or do you know if Guix diverges from Nix in some areas?
> Well, from my understanding, get the same the store path for the same
> package built with or without its tests ... would mean to have a
> derivation for building and another derivation – referring to the
> former – for testing.
Yes, with the test derivation being something like a "fixed-output
derivation". [[info:guix#Derivations][From the manual]]:
#+begin_quote
Operations such as file downloads and version-control checkouts for
which the expected content hash is known in advance are modeled as
fixed-output derivations. Unlike regular derivations, the outputs of a
fixed-output derivation are independent of its inputs—e.g., a source
code download produces the same result regardless of the download method
and tools being used.
#+end_quote
The hypothetical test derivation leaves the build artifact unchanged,
but does communicate some "side" information. It's like a fixed-output
derivation carrying some metadata (further elaboration below).
> Well, taking this direction, one could imagine a derivation for each
> phases; somehow extend to all phases what it is already done for
> fetching source, build and grafts (guix build --source && guix build
> --no-grafts && guix build).
Perhaps not all. The thing that sets the "check" phase (#:tests?) apart
from the rest is that it's an identity transform with a
side-effect. i.e., it simply reports on the state of its input (i.e.,
the build artifact) leaving the build artifact unchanged. The only other
phase in the gnu-build-system that is similar to the "check phase" is
the "validate-runpath phase".
An alternative (possibly future) version of Guix might allow us to delay
the interpretation/meaning associated with the following cases:
- whether or not the tests were run, and
- whether or not the tests, if run, passed
To be able to do so, we need the "check derivation" be able to
communicate two things (downstream): a summary of the test phase (could
simply be a 3-valued datatype, like a 'Maybe Bool' in Haskell, but could
also be something more elaborate), and the input build artifact (which
remains unchanged). Similarly for the "validate-runpath derivation".
I do not know what the best way to communicate the "side-effect
information" (did the tests run and if so what was the conclusion) would
be. Specifically, should the output of "check derivation" (similarly for
"validate-runpath derivation") include the unchanged build artifact or
not?
Btw, is this still the appropriate mailing list (and more generally,
forum) for this discussion?
--
Suhail
This email is not an offer capable of acceptance, does not evidence an
intention to enter into an agreement, has no operative effect until a
definitive agreement is signed in writing by both parties, and that no
party should act in reliance on the email or any representations of the
sender until a definitive agreement is signed in writing by both
parties.
This email may contain information that is privileged, confidential
and/or exempt from disclosure. No waiver whatsoever is intended by
sending this e-mail which is intended only for the named recipient(s).
Unauthorized use, dissemination or copying is prohibited. If you
receive this email in error, please notify the sender and destroy all
copies of this email.
next reply other threads:[~2023-11-02 15:26 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-02 15:25 Suhail [this message]
2023-11-02 17:02 ` Turning off tests leads to a different store item Simon Tournier
2023-11-02 17:46 ` Simon Tournier
2023-11-03 13:08 ` Tomas Volf
2023-11-03 20:44 ` Suhail
[not found] <6543bf92.d40a0220.bbcd0.1118SMTPIN_ADDED_BROKEN@mx.google.com>
2023-11-02 16:03 ` Greg Hogan
-- strict thread matches above, loose matches on Subject: below --
2023-11-02 17:25 Suhail
2023-11-02 18:54 Suhail
2023-11-03 9:33 ` Simon Tournier
2023-11-03 14:13 Suhail
2023-11-05 12:07 ` Simon Tournier
[not found] <65429087.0c0a0220.5908c.4d60SMTPIN_ADDED_BROKEN@mx.google.com>
2023-11-07 18:58 ` Maxim Cournoyer
2023-11-07 21:58 ` Csepp
2023-11-08 2:53 ` Felix Lechner via
2023-11-08 14:45 ` Maxim Cournoyer
2023-11-08 17:07 ` Felix Lechner via
2023-11-08 18:18 ` Vagrant Cascadian
2023-11-08 19:20 ` Saku Laesvuori
2023-11-08 22:21 ` Simon Tournier
2023-11-09 3:17 ` Maxim Cournoyer
2023-11-09 7:37 ` Simon Tournier
2023-11-09 15:04 ` Maxim Cournoyer
2023-11-16 9:31 ` Simon Tournier
2023-11-18 4:38 ` Maxim Cournoyer
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r0l818ka.fsf@ \
--to=suhail@bayesians.ca \
--cc=felix.lechner@lease-up.com \
--cc=help-guix@gnu.org \
--cc=julien@lepiller.eu \
--cc=zimon.toutoune@gmail.com \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).