New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
maintainers: prefix number with underscore #95553
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is necessary. Though, other Nixpkgs maintainers can agree or disagree, and my judgement shouldn't be a blocker.
The reason it is required for packages is that on the command-line, --attr
can't work with leading numbers:
~/tmp/nixpkgs/nixpkgs 1 $ nix-build -A 0x0
error: syntax error, unexpected INT, at /Users/samuel/tmp/nixpkgs/nixpkgs/pkgs/top-level/all-packages.nix:531:3
(You can modify all-packages.nix
to provide a 0x0 if you want, but the result is the same if it isn't there.)
I don't think we're expected to interact with maintainers using --attr
; at the time we will, this could be re-considered. After all, this is a relatively minor mechanical change, so hopefully this is a triviality.
In addition, handle
is not forcibly the same as a GitHub alias. It is possible a user uses Nixpkgs without a GitHub account, even contributes without a GitHub account (yes, technically things are in place for that), and has a prefixed underscore for their handle. In that instance it becomes a bit annoying :) Though we're erring in the world of aggravating edge cases, so don't mind that last point too much.
Sorry, now I see why this is relevant. And this is using an existing precedent. |
Oh, not this again, I feel like I spend hours on discussing this trivial case. I don't think But if feel like this is a trip wire, let's create a meta data check in ofborg, that will be beneficial in the future as well. |
Not exactly easy to actually get it done and we might end up moving some checks away from ofborg anyway. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine by me. It's been fun, but became very tiring eventually. It pisses off too many people and since there is no simple solution, it's not worth arguing over.
Let's change it and, ideally, document the need for an underscore somewhere - maybe here?
I suggest also mapping over the keys and asserting none start with a number. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the common pattern with maintainers; [ _0x4A6F ];
.
Can you elaborate please? |
I'm assuming having CI do something to the effect of:
where there's a check that a new maintainer doesn't start with a number. |
I don't think adding it to ofborg is a productive use of time as there has been some discussions about moving things away from ofborg. Bus factor is also an issue so I don't want to add more things there anyway. I don't want to add it as a check that runs on hydra as that depends on someone noticing and caring about it enough to unbreak it, I think we have enough things already that we don't know are broken until after a PR is merged (e.g. the manuals). I'm happy to implement this and other maintainer checks (e.g. check |
I think this would be easy enough to implement as a github action. But I'm not sure what we want to do as a community. |
Just to be clear about the current status of actions: we can't use them at the moment. We were using two actions but they were removed because they caused too much disruption. We're now waiting for a couple of things to be resolved before we try them again, I don't really have a timeframe for when that will happen. I'd want to have those actions running for a couple of weeks without causing any problems before we start adding more. I see this PR as a slight improvement over the status quo even without a way of enforcing it, I don't think having a check should be a blocker. |
I am not suggesting an explicit test, but having the |
how did you want to expose this? doing the evaluation on just |
Actually, |
Sorry but I'm not going to implement what has been requested. Should I close this PR? |
I think the PR is fine as is. The check can happen in a different PR |
Don't you dare! 😄 |
This is the same pattern that is already used for packages, I think it makes sense to reuse it here.
nixpkgs/pkgs/top-level/all-packages.nix
Lines 531 to 545 in 4789d6f
GitHub doesn't allow usernames with underscores so these won't collide with another user.