TVL depot development (mail to depot@tvl.su)
 help / color / mirror / code / Atom feed
From: Adam Joseph <adam@westernsemico•com>
To: depot@tvl.su
Subject: reference-scanning inputDrvs/inputSrcs
Date: Tue, 10 Jan 2023 12:20:18 -0800	[thread overview]
Message-ID: <167338201858.17566.15445543013512077061@localhost> (raw)
In-Reply-To: <20221202152213.3a59e629@ostraka>

Quoting Adam Joseph (2022-12-02 15:22:13)
> I've written a tool (using the awesome libnixstore crate) that calculates
> drv.inputDrvs using scanForReferences instead of string contexts, and compares
> the calculated results to what cppnix produced....  In a week or two I'm
> going to clean it up and write a post about it on the nixos discourse

Just want to mention that I haven't forgotten about this, but it is on hold for
a while because of two things:

1. Much as I loathe C++, I should implement this in cppnix first rather than in
   tvix because:

   a. If I don't get it exactly right on the first try, tvix will get the blame
      for any behavioral differences, and that is not cool.  The implementation
      is straightforward and obvious except for placeholders and
      unsafeDiscardOutputDependency -- those are subtle, and I can't be sure
      I'll get them right on the first try.

   b. Cppnix is already in production use.  It can calculates scanned-inputDrvs
      *in addition to* string-context inputDrvs, and emit a warning if they
      disagree.  Having no warnings on a large production codebase (nixpkgs,
      maybe even Hydra) for a few months is the sign that it ready for an RFC.

2. Nix will need scanned-inputDrvs anyways in order for Ericson2314's "EBB"
   derivations-that-emit-derivations-without-using-nixlang to be practically
   useful.  So I am going to wait for nix#3959 to merge before I try to
   implement scanned-inputDrvs for cppnix.  I will be much easier to convince
   people of its usefulness at that point.

     https://github.com/NixOS/nix/pull/3959
     https://github.com/NixOS/nix/pull/3959#issuecomment-1375508978

You may not hear much from me for the next month or two.  I have been dragged
into a really enormous project that I have been wanting to do for a long time:

  https://github.com/NixOS/nixpkgs/pull/209870

Getting such a major change approved only happens if it resolves some kind of
excruciating pain.  Fortunately that excruciating pain is present right now:

  https://github.com/NixOS/nixpkgs/issues/108305

So #209870 is my top priority right now because at the moment it is very easy to
convince people that it is useful.

  - a

  parent reply	other threads:[~2023-01-10 20:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CANHrikrEDPkH1raGDGAGETeATrWOJ=sBQCUXr6=pHJm1ajbd0A@mail.gmail.com>
     [not found] ` <20221202152213.3a59e629@ostraka>
2023-01-09 22:07   ` [tvix] string contexts vs. reference scanning Vincent Ambo
2023-01-11 11:49     ` sterni
2023-01-11 12:20       ` Vincent Ambo
2023-03-16  9:41     ` Vincent Ambo
2023-03-16 12:00       ` Florian Klink
2023-01-10 20:20   ` Adam Joseph [this message]
2023-01-10 20:48     ` reference-scanning inputDrvs/inputSrcs Vincent Ambo

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=167338201858.17566.15445543013512077061@localhost \
    --to=adam@westernsemico$(echo .)com \
    --cc=depot@tvl.su \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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 public inbox

	https://code.tvl.fyi

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).