# \[Discussion\] PR reviews

**URL:** https://discourse.nixos.org/t/discussion-pr-reviews/2619
**Category:** Uncategorized
**Created:** [April 7, 2019, 7:27pm UTC](https://discourse.nixos.org/t/discussion-pr-reviews/2619 "2019-04-07T19:27:20Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![timokau](https://discourse.nixos.org/user_avatar/discourse.nixos.org/timokau/32/40_2.png) [@timokau](https://discourse.nixos.org/u/timokau)
#### Post date: [April 7, 2019, 7:27pm UTC](https://discourse.nixos.org/t/discussion-pr-reviews/2619/1 "2019-04-07T19:27:20Z")

</div>

Let’s keep the meta discussion for [PRs already reviewed](https://discourse.nixos.org/t/prs-already-reviewed/2617) here and keep the original post to reviews.  
CC @ryantm @vcunat @Ekleog@aanderse @samueldr @Infinisil @matthewbauer @manveru

---

<div class="post-metadata">

### Author: ![ryantm](https://discourse.nixos.org/user_avatar/discourse.nixos.org/ryantm/32/900_2.png) [@ryantm](https://discourse.nixos.org/u/ryantm)
#### Post date: [April 7, 2019, 4:38pm UTC](https://discourse.nixos.org/t/discussion-pr-reviews/2619/2 "2019-04-07T16:38:26Z")

</div>

Good idea! I made some small grammatical edits and pinned this to help with visibility. I think we should make this into a wiki post so the community can improve the top post, and when someone posts a PR here, we should delete the post after it has been merged. If you don’t have power to delete a post, post that you took care of it, and I’ll delete it.

---

<div class="post-metadata">

### Author: ![vcunat](https://discourse.nixos.org/user_avatar/discourse.nixos.org/vcunat/32/11_2.png) [@vcunat](https://discourse.nixos.org/u/vcunat)
#### Post date: [April 7, 2019, 6:12pm UTC](https://discourse.nixos.org/t/discussion-pr-reviews/2619/3 "2019-04-07T18:12:56Z")

</div>

It might be enough to choose some keyword used in comments, so that people with push access can filter those reviewed PRs. I don’t know about GitHub offering any better way, as non-members can’t do much more than post comments.

---

<div class="post-metadata">

### Author: ![timokau](https://discourse.nixos.org/user_avatar/discourse.nixos.org/timokau/32/40_2.png) [@timokau](https://discourse.nixos.org/u/timokau)
#### Post date: [April 7, 2019, 7:24pm UTC](https://discourse.nixos.org/t/discussion-pr-reviews/2619/4 "2019-04-07T19:24:02Z")

</div>

> [@PRs already reviewed](https://discourse.nixos.org/t/prs-already-reviewed/2617/3):
>
> Good idea! I made some small grammatical edits and pinned this to help with visibility.

Thanks!

> [@PRs already reviewed](https://discourse.nixos.org/t/prs-already-reviewed/2617/3):
>
> I think we should make this into a wiki post so the community can improve the top post, and when someone posts a PR here, we should delete the post after it has been merged. If you don’t have power to delete a post, post that you took care of it, and I’ll delete it.

I agree, any improvements to the top post are welcome. We can improve the process over time if it is well received by the community.

---

<div class="post-metadata">

### Author: ![timokau](https://discourse.nixos.org/user_avatar/discourse.nixos.org/timokau/32/40_2.png) [@timokau](https://discourse.nixos.org/u/timokau)
#### Post date: [April 7, 2019, 7:46pm UTC](https://discourse.nixos.org/t/discussion-pr-reviews/2619/5 "2019-04-07T19:46:11Z")

</div>

> [@vcunat](#):
>
> It might be enough to choose some keyword used in comments, so that people with push access can filter those reviewed PRs. I don’t know about GitHub offering any better way, as non-members can’t do much more than post comments.

This is basically a lite-version of my [[RFC 0030] Formalize review workflow by timokau · Pull Request #30 · NixOS/rfcs · GitHub](https://github.com/NixOS/rfcs/pull/30) proposal, which assumes ofBorg support for adding labels. Let’s see if there is interest and how discourse works out. There is also a [realistic chance](https://github.com/isaacs/github/issues/148#issuecomment-472856684) github may improve this in the future.

---

<div class="post-metadata">

### Author: ![timokau](https://discourse.nixos.org/user_avatar/discourse.nixos.org/timokau/32/40_2.png) [@timokau](https://discourse.nixos.org/u/timokau)
#### Post date: [April 7, 2019, 7:47pm UTC](https://discourse.nixos.org/t/discussion-pr-reviews/2619/6 "2019-04-07T19:47:43Z")

</div>

@Ekleog

> Now, I’m wondering whether discourse is a proper UI, as if multiple committers monitor the thread there is no good way of marking a comment over there as “done” so only one needs to click the link I think, but…

If discourse works for this is to be seen, but if we really stick to the “shouldn’t take more than a minute” rule race conditions are probably not too problematic.

---

<div class="post-metadata">

### Author: ![worldofpeace](https://discourse.nixos.org/user_avatar/discourse.nixos.org/worldofpeace/32/245_2.png) [@worldofpeace](https://discourse.nixos.org/u/worldofpeace)
#### Post date: [April 7, 2019, 9:02pm UTC](https://discourse.nixos.org/t/discussion-pr-reviews/2619/7 "2019-04-07T21:02:35Z")

</div>

> If the touched package or one of its dependencies has always failed on a platform, it should be explicitly marked as broken (by adding broken = True to its meta attributes), so that ofBorg reports “No Attempt”.

Are things like `stdenv.isDarwin` documented anywhere in the manual?  
We’re talking about platforms here and `broken = true;` will make it broken for everything.

---

<div class="post-metadata">

### Author: ![lilyball](https://discourse.nixos.org/user_avatar/discourse.nixos.org/lilyball/32/939_2.png) [@lilyball](https://discourse.nixos.org/u/lilyball)
#### Post date: [April 8, 2019, 6:55am UTC](https://discourse.nixos.org/t/discussion-pr-reviews/2619/8 "2019-04-08T06:55:20Z")

</div>

> [@worldofpeace](#):
>
> Are things like `stdenv.isDarwin` documented anywhere in the manual?

I don’t believe so. There’s a bunch of stuff that’s undocumented and requires reading the source in the `lib/` dir, including things like `stdenv.optional` and `stdenv.optionals`. There’s also things like `stdenv.ifEnable` which lives in `lib/deprecations.nix` with no explanation as to why it’s deprecated (trawling through history right now, this file used to be called `misc.nix` and was renamed with no explanation).

In fact, I don’t see any function-level documentation for nixpkgs at all. A few things are described in the manual, but as part of the general guide and not an explicit reference.

---

<div class="post-metadata">

### Author: ![lilyball](https://discourse.nixos.org/user_avatar/discourse.nixos.org/lilyball/32/939_2.png) [@lilyball](https://discourse.nixos.org/u/lilyball)
#### Post date: [April 8, 2019, 7:01am UTC](https://discourse.nixos.org/t/discussion-pr-reviews/2619/9 "2019-04-08T07:01:35Z")

</div>

> [@PRs already reviewed](https://discourse.nixos.org/t/prs-already-reviewed/2617/14):
>
> Can we add that for updates, the reviewer should find the changelog(s) and add a link (if OP does not already do that), and check that there is nothing missing.

I’d like to suggest that the PR template include a comment under “motivation for change” saying something to the effect for package updates that if there’s a GitHub release, or a changelog entry somewhere, it should be linked there.

---

<div class="post-metadata">

### Author: ![jtojnar](https://discourse.nixos.org/user_avatar/discourse.nixos.org/jtojnar/32/70_2.png) [@jtojnar](https://discourse.nixos.org/u/jtojnar)
#### Post date: [April 8, 2019, 6:42am UTC](https://discourse.nixos.org/t/discussion-pr-reviews/2619/10 "2019-04-08T06:42:40Z")

</div>

Can we add that for updates, the reviewer should find the changelog(s) and add a link (if OP does not already do that), and check that there is nothing missing.

---

<div class="post-metadata">

### Author: ![tomberek](https://discourse.nixos.org/user_avatar/discourse.nixos.org/tomberek/32/283_2.png) [@tomberek](https://discourse.nixos.org/u/tomberek)
#### Post date: [April 8, 2019, 4:25pm UTC](https://discourse.nixos.org/t/discussion-pr-reviews/2619/11 "2019-04-08T16:25:07Z")

</div>

What’s the best way to correct a nixpkgs-update automatic PR? Submit a new PR? Recommend the changes in review?

---

<div class="post-metadata">

### Author: ![timokau](https://discourse.nixos.org/user_avatar/discourse.nixos.org/timokau/32/40_2.png) [@timokau](https://discourse.nixos.org/u/timokau)
#### Post date: [April 8, 2019, 6:05pm UTC](https://discourse.nixos.org/t/discussion-pr-reviews/2619/12 "2019-04-08T18:05:30Z")

</div>

Just “fork the PR” and create a new one. The bot won’t be offended 😉

Just mention the replaced PR in the description. I’m not sure if githubs “fixes #xyz” keyword works with PRs, but you might try that.

---

<div class="post-metadata">

### Author: ![7c6f434c](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/7/8e7dd6/32.png) [@7c6f434c](https://discourse.nixos.org/u/7c6f434c)
#### Post date: [April 8, 2019, 7:00pm UTC](https://discourse.nixos.org/t/discussion-pr-reviews/2619/13 "2019-04-08T19:00:00Z")

</div>

> Just mention the replaced PR in the description. I’m not sure if githubs “fixes #xyz” keyword works with PRs, but you might try that.

We have recently seen it work for «Closes #NNNNN» in an update-collecting PR, I think.

---

<div class="post-metadata">

### Author: ![ryantm](https://discourse.nixos.org/user_avatar/discourse.nixos.org/ryantm/32/900_2.png) [@ryantm](https://discourse.nixos.org/u/ryantm)
#### Post date: [April 9, 2019, 5:01am UTC](https://discourse.nixos.org/t/discussion-pr-reviews/2619/14 "2019-04-09T05:01:02Z")

</div>

Right, I think GitHub will only pay attention to the `closes #NNNN` phrases in the body a PR’s first comment/message.

This is a great way to handle r-ryantm’s PRs. If you close its PRs before merging the other one, it might open a duplicate PR on the next run.

---

<div class="post-metadata">

### Author: ![vcunat](https://discourse.nixos.org/user_avatar/discourse.nixos.org/vcunat/32/11_2.png) [@vcunat](https://discourse.nixos.org/u/vcunat)
#### Post date: [April 9, 2019, 2:24pm UTC](https://discourse.nixos.org/t/discussion-pr-reviews/2619/15 "2019-04-09T14:24:30Z")

</div>

> [@lilyball](#):
>
> In fact, I don’t see any function-level documentation for nixpkgs at all. A few things are described in the manual, but as part of the general guide and not an explicit reference.

What about this? [Nixpkgs Reference Manual](https://nixos.org/nixpkgs/manual/#sec-functions-library)

---

<div class="post-metadata">

### Author: ![lilyball](https://discourse.nixos.org/user_avatar/discourse.nixos.org/lilyball/32/939_2.png) [@lilyball](https://discourse.nixos.org/u/lilyball)
#### Post date: [April 9, 2019, 7:33pm UTC](https://discourse.nixos.org/t/discussion-pr-reviews/2619/16 "2019-04-09T19:33:59Z")

</div>

Fair point, there is documentation for `lib.attrsets`, but it seems for nothing else.

---

<div class="post-metadata">

### Author: ![lilyball](https://discourse.nixos.org/user_avatar/discourse.nixos.org/lilyball/32/939_2.png) [@lilyball](https://discourse.nixos.org/u/lilyball)
#### Post date: [April 9, 2019, 8:18pm UTC](https://discourse.nixos.org/t/discussion-pr-reviews/2619/17 "2019-04-09T20:18:09Z")

</div>

I take it the “rebuild count” is the number in the label? What does that actually indicate?

Edit: Does that mean the number of packages that will get rebuilt as a consequence of updating this one?

---

<div class="post-metadata">

### Author: ![markuskowa](https://discourse.nixos.org/user_avatar/discourse.nixos.org/markuskowa/32/719_2.png) [@markuskowa](https://discourse.nixos.org/u/markuskowa)
#### Post date: [April 9, 2019, 8:33pm UTC](https://discourse.nixos.org/t/discussion-pr-reviews/2619/18 "2019-04-09T20:33:27Z")

</div>

Yes, it is the total number of packages that will be rebuild due to the change.

---

<div class="post-metadata">

### Author: ![timokau](https://discourse.nixos.org/user_avatar/discourse.nixos.org/timokau/32/40_2.png) [@timokau](https://discourse.nixos.org/u/timokau)
#### Post date: [April 9, 2019, 9:28pm UTC](https://discourse.nixos.org/t/discussion-pr-reviews/2619/19 "2019-04-09T21:28:07Z")

</div>

I have edited the OP to clear up broken vs platforms, mention how to fix bot PRs and explain more clearly that reviews should be on GitHub.

---

<div class="post-metadata">

### Author: ![timokau](https://discourse.nixos.org/user_avatar/discourse.nixos.org/timokau/32/40_2.png) [@timokau](https://discourse.nixos.org/u/timokau)
#### Post date: [April 9, 2019, 9:29pm UTC](https://discourse.nixos.org/t/discussion-pr-reviews/2619/20 "2019-04-09T21:29:33Z")

</div>

> [@jtojnar](#):
>
> Can we add that for updates, the reviewer should find the changelog(s) and add a link (if OP does not already do that), and check that there is nothing missing.

What is the value in having a changelog link in the PR? I could see the value if it was somehow accessible to the user when updating, but without that I’m not convinced its worth it to ask reviewers to hunt down changelogs for every single package.

[Next page](https://discourse.nixos.org/t/discussion-pr-reviews/2619.md?page=2)
