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
Use RFC 2119 convention to describe package naming convention #26513
Conversation
doc/coding-conventions.xml
Outdated
in new variable names, rather than converted to underscores | ||
(which was convention up to around 2013 and most names | ||
still have underscores instead of dashes) — e.g., | ||
<varname>http-parser</varname> instead of | ||
<varname>http_parser</varname>.</para></listitem> | ||
|
||
<listitem><para>If there are multiple versions of a package, this | ||
should be reflected in the variable names in | ||
SHOULD be reflected in the variable names in | ||
<filename>all-packages.nix</filename>, | ||
e.g. <varname>json-c-0-9</varname> and <varname>json-c-0-11</varname>. | ||
If there is an obvious “default” version, make an attribute like |
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 think this can be more sharply stated as "if there is a version used by the majority/supermajority of the packages, make an attribute like...".
While I'm quite a fan of IETF RFCs, and it will probably be good to utilize their terms to better express strength of obligation, we have docbook here. All-caps words in this way feel rather cumbersome to me personally. That's contrary to IETF where the pure-ASCII file is the authoritative version... |
BTW, if we use something like this, we must define what it means, e.g. via a reference to that RFC. |
(triage) @rht, do you have an opinion against replacing the ALL CAPS TEXT to bold text, to move this forward? |
Either way is fine as long as it is unambiguous. I have switched the ALL CAPS TEXT to bold text. |
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.
Emphasis as italics instead of bold is not an issue, and this is all good IMHO.
Whoops, I was basing it on https://nixos.org/nixpkgs/manual/#sec-hierarchy, the text "If it’s used to support software development:" has a raw of
Where it should have been as in https://nixos.org/nixos/manual/release-notes.html#sec-release-18.03
|
See also: w3c/tr-design#126. |
The raw of https://www.w3.org/TR/payment-request/ does use italic of all caps instead of bold, as in |
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.
To be clear, I don't have a strong opinion on the exact "formatting" of the key words. As noted on some links, ALL-CAPS have some advantages like plain text representation (e.g. for clipboard), on the other hand they're not stylistically nice (not a significant issue for short keywords).
I've seen some docbook specs using <glossterm>
instead of <emphasis>
, but that might be overly complicating and it now renders the same for me anyway.
Overall I'd be inclined to merge with the current style; in the "worst" case we just change it later. Any objections?
BTW, for the paragraph about non-release versions, I'm personally not confident about the requirement being as hard as must, but I consider that orthogonal to this PR. |
(Self-assigned so that we don't leave this behind again.) |
Motivation for this change
From @a4d442663580's suggestion in #26173 (comment).
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)