-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
Documentation: style guide for use of with
#292468
Comments
relevant: #208242 |
the nix best practices page seems to imply that if we instead just recommend limiting its use to |
In my opinion, license should be a list, rather than "a list of licenses or a single license". The "singleton", even if being more typical, looks like an exception and not a rule. So, as a personal preference, I am writing
License should be called licenses, precisely because there is at least one multiple-licensed project.
There is more: we didn't find a decent replacement for To me, the exceptions are single-line statements, like:
This was discouraged too. |
correction: this is no longer encouraged. as best i am able to tell, the only person who has a major problem with i can drop |
I made a similar point here: #292120 (comment) To put it bluntly, this needs to be discussed. We cannot force change through partial adoption of previously accepted views without discussion. As far as the previous PRs and issues I have seen, other committers have expressed objections. Relevant changes should not be merged until controversy is settled. |
I've also yet to see a good reason why the 5 lines of the (usually trivial) For entire package definitions or modules, that reason is easy to find as their code usually is not trivial where non-intuitive |
|
@AndersonTorres trying to convince me is pointless, because it doesn't matter what i think. i'm trying to document consensus, not my own opinion. (for the record, my only strong opinion is that |
|
yes, because i want feedback on it (i.e. review)
correct! that's why i opened this issue before creating the PR! all of the actions i have taken i have done with the intent to get other people's opinions.
i want to get several different perspectives on the issue. they were a new voice, which is helpful i am already well aware of your opinion, and you continuing to repeat it does nothing to establish consensus. |
I've finally found a good example: This has now reared its head in an actual package (see https://github.com/NixOS/nixpkgs/pull/298316/files) where someone converted the meta = with lib; {
changelog = "https://gitlab.archlinux.org/pacman/pacman/-/raw/v${version}/NEWS";
}; which in turn broke the changelog. No eval error, because For another example where this would cause further issues, meta = with lib; {
platforms = [ "x86_64-linux" ] ++ optional (versionOlder version "24") "i686-linux";
}; In other words, were this converted to use the fixed-point parameter, and someone missed a spot to use said param, this would break And to someone unaware of the scoping rules of Perhaps it's time to put the footgun down and get rid of |
Good catch!
The rewritten nixd will probably be able to warn this! |
I don't know if I am more impressed with such an awful example of unexpected |
well, i stand corrected! guess it's time to discourage |
I'm still on the fence with the removal of |
I cannot get behind making packaging harder if the only potential benefit is it (sometimes) looks "cleaner". As for using |
Understandable, though do we have to remove all |
NixOS/rfcs#110 is trying something to solve this |
It seems the check added in #330066 will get us closer to cleaning up |
Unfortunately that specific error reporting is turned off again for now, see #330454 😅 |
Problem
i see a lot of
license = with licenses; [ mit ]
in PRs recently.compared to the simpler
license = licenses.mit
, this is both longer and more syntactically complex, taking longer to read for humans, and possibly longer to evaluate too.Proposal
this should be avoided for single-license packages (which is most of them).
this would not apply to
meta.maintainers
, for the following reason:maintainers
is plural, which implies a listi would be willing to write this into
pkgs/README.md
but i'm not going to open a PR until i've gotten some feedback, it wouldn't make sense for me to single-handedly decide what the best practice is.Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: