This triggered a warning. Arguably setting the version to the
same value doesn't require a `src` override (suggestion of the
warning), but let's use this opportunity to just clean it up.
Considering the code was out of sync, this adds the `version`/`src` warning to
non-"finalAttrs" calls to `mkDerivation`. That didn't work.
(I un-DRY-ed this as a micro-optimization at some point, and I apologize... while
simultaneously blaming contributors who change the file without understanding it,
therefore implicating myself *yet again* and making myself a hypocrite)
Considering that no attribute value passed to mkDerivation was
allowed to be a function anyway, this does not cause any changes
for code that used the previous interpretation of __functor,
because that could wouldn't have worked anyway.
In practice, this fixes a problem when an option value from
`lib.types.functionTo` is passed as an argument here.
(`functionTo` returns a `lib.setFunctionArgs` result, which is a
__functor)
When cherry-picking without -x or not cherry-picking at all, the
check-cherry-picks job would usually remain green. This is annoying to
deal with for reviewers, because "all green" still needs attention -
have all commits been cherry-picked properly?
If a commit was not cherry-picked correctly, either without -x or not at
all, because it's a genuine commit to begin with, the reviewers
attention is required anyway. Thus we can also let the job fail in this
case.
This makes the job significantly faster when the commit can't be found
on master or staging directly. Before this change, the script would have
had to iterate through 20+ release branches before finding the latest
one. With lazy fetching for git enabled, this would take a few minutes.
Using a `tree:0` filter instead of `blob:none` reduces the checkout time
from over 3 minutes to about 45 seconds. The required trees/blobs will
then be fetched on-demand.
This on-demand fetching creates additional output for `git range-diff`
on stderr, so we hide that. This only happens the first time it's run,
so we don't need to adjust the other calls - which will still return any
real errors, should they happen.