Skip to content

stylix: honour recent docs to doc renames#1493

Merged
trueNAHO merged 1 commit intonix-community:masterfrom
panchoh:doc/leftover-renamings-docs-to-doc
Jun 19, 2025
Merged

stylix: honour recent docs to doc renames#1493
trueNAHO merged 1 commit intonix-community:masterfrom
panchoh:doc/leftover-renamings-docs-to-doc

Conversation

@panchoh
Copy link
Copy Markdown
Contributor

@panchoh panchoh commented Jun 13, 2025

Starting with #1272, and followed by #1407, we are standardizing on doc (as in documentation), rather than docs (as in documents), following the current style of nixpkgs.

I’ve updated most remaining references to docs to reflect that, with the notable exclusion of serve-docs, which I’d like to rename to serve-doc in a follow-up PR.

Also note that I’ve extended the rename to nix build .#palette-generator.passthru.docsnix build .#palette-generator.passthru.doc, without adding a deprecated alias, as was so diligently done by @MattSturgeon with the global .#docs.#doc rename. If this is not acceptable, I’ll drop this change from this PR and add it to a subsequent, more proper one.

Things done

Notify maintainers

@awwpotato @danth @MattSturgeon @mightyiam @trueNAHO

@MattSturgeon
Copy link
Copy Markdown
Member

MattSturgeon commented Jun 13, 2025

Starting with #1272, and followed by #1407, we are standardizing on doc (as in documentation), rather than docs (as in documents), following the current style of nixpkgs.

Note that docs and doc are both short for documentation; neither is short for documents in this context.

"Documentation" is itself both a singular and plural noun. For whatever reason, "documentation" can be plural but "doc" cannot, so when shortened it gets an "s" to indicate it being a plural. 😁

We have standardised on doc for the directory and package name, largely because that matches nixpkgs, however this doesn't change the linguistics.

I’ve updated most remaining references to docs to reflect that, with the notable exclusion of serve-docs, which I’d like to rename to serve-doc in a follow-up PR.

Note that serve-docs is one case where I feel it is better to keep the plural form. You aren't serving a single piece of documentation, you are serving an entire website full of many pieces of documentation.

I can see a counter-argument, that you are in-fact serving the package (named "doc") as a website. But this feels off to me, which is why I didn't change it in #1407.


Also note that I’ve extended the rename to nix build .#palette-generator.passthru.docs -> nix build .#palette-generator.passthru.doc, without adding a deprecated alias. If this is not acceptable, I’ll drop this change from this PR and add it to a subsequent, more proper one.

IMO this is fine, assuming palette-generator.docs is a niche and rarely used passthru. If it is expected to be used by end-users or third-party contributors, then it should have a deprecation warning.

Note that even without any manual deprecation, the error produced by nix when an attr is missing is fairly helpful, it usually even suggests fixes for potential typos:

nix-repl> { doc = null; }.docs
error: attribute 'docs' missing
       at «string»:1:1:
            1| { doc = null; }.docs
             | ^
       Did you mean doc?

@stylix-automation stylix-automation bot added the status: merge conflict Merge conflict label Jun 14, 2025
@panchoh panchoh force-pushed the doc/leftover-renamings-docs-to-doc branch from e8049ba to cd87b54 Compare June 15, 2025 05:46
@panchoh panchoh changed the title stylix: honor recent docs -> doc rename stylix: honor recent docs → doc rename Jun 15, 2025
@panchoh panchoh changed the title stylix: honor recent docs → doc rename stylix: honour recent docs → doc rename Jun 15, 2025
@panchoh panchoh force-pushed the doc/leftover-renamings-docs-to-doc branch from ff5a5cf to 888a810 Compare June 15, 2025 05:51
@panchoh
Copy link
Copy Markdown
Contributor Author

panchoh commented Jun 15, 2025

Starting with #1272, and followed by #1407, we are standardizing on doc (as in documentation), rather than docs (as in documents), following the current style of nixpkgs.

Note that docs and doc are both short for documentation; neither is short for documents in this context.

"Documentation" is itself both a singular and plural noun. For whatever reason, "documentation" can be plural but "doc" cannot, so when shortened it gets an "s" to indicate it being a plural. 😁

Thanks for the enlightenment, @MattSturgeon!

We have standardised on doc for the directory and package name, largely because that matches nixpkgs, however this doesn't change the linguistics.

I’ve updated most remaining references to docs to reflect that, with the notable exclusion of serve-docs, which I’d like to rename to serve-doc in a follow-up PR.

Note that serve-docs is one case where I feel it is better to keep the plural form. You aren't serving a single piece of documentation, you are serving an entire website full of many pieces of documentation.

I see your point. My way of thinking about it is more in the lines of “serve the documentation this project might have”; I’m not concerned with how many pieces the documentation might have. Be one or two hundred, it feels the same to me at this level of abstraction. But that’s just the way I think, I won’t pursue this any further. Thanks again for the detailed explanation.

I can see a counter-argument, that you are in-fact serving the package (named "doc") as a website. But this feels off to me, which is why I didn't change it in #1407.

Ah, I hadn’t thought of that. But interesting nonetheless.


Also note that I’ve extended the rename to nix build .#palette-generator.passthru.docs -> nix build .#palette-generator.passthru.doc, without adding a deprecated alias. If this is not acceptable, I’ll drop this change from this PR and add it to a subsequent, more proper one.

IMO this is fine, assuming palette-generator.docs is a niche and rarely used passthru. If it is expected to be used by end-users or third-party contributors, then it should have a deprecation warning.

Note that even without any manual deprecation, the error produced by nix when an attr is missing is fairly helpful, it usually even suggests fixes for potential typos:

nix-repl> { doc = null; }.docs
error: attribute 'docs' missing
       at «string»:1:1:
            1| { doc = null; }.docs
             | ^
       Did you mean doc?

Thanks for the thorough analysis, very much appreciated! Since @danth gave a thumbs-up to your comment, I went ahead and kept the change in.

BTW, I’m having so much fun being here. <3

@stylix-automation stylix-automation bot removed the status: merge conflict Merge conflict label Jun 15, 2025
Copy link
Copy Markdown
Member

@MattSturgeon MattSturgeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple issues with the rebase, otherwise good

@panchoh
Copy link
Copy Markdown
Contributor Author

panchoh commented Jun 15, 2025

Couple issues with the rebase, otherwise good

Ouch. Apologies! Fixing it now…

Co-authored-by: Daniel Thwaites <danth@danth.me>
Co-authored-by: Matt Sturgeon <matt@sturgeon.me.uk>
@panchoh panchoh force-pushed the doc/leftover-renamings-docs-to-doc branch from 0c7d25f to 9cbb070 Compare June 15, 2025 20:14
@panchoh
Copy link
Copy Markdown
Contributor Author

panchoh commented Jun 15, 2025

And sorry, I should have inspected the commit after the first (failed) rebase, and I would have noticed the spurious changes.
Won’t happen again.

Copy link
Copy Markdown
Member

@MattSturgeon MattSturgeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And sorry, I should have inspected the commit after the first (failed) rebase, and I would have noticed the spurious changes.
Won’t happen again.

Don't worry it's easily done 😁

Copy link
Copy Markdown
Contributor

@0xda157 0xda157 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@trueNAHO trueNAHO merged commit 8c1421a into nix-community:master Jun 19, 2025
5 checks passed
@trueNAHO trueNAHO changed the title stylix: honour recent docs → doc rename stylix: honour recent docs to doc renames Jun 19, 2025
@stylix-automation
Copy link
Copy Markdown
Contributor

Successfully created backport PR for release-25.05:

stylix-automation bot pushed a commit that referenced this pull request Jun 19, 2025
Link: #1493

Co-authored-by: Daniel Thwaites <danth@danth.me>
Reviewed-by: Daniel Thwaites <danth@danth.me>
Co-authored-by: Matt Sturgeon <matt@sturgeon.me.uk>
Reviewed-by: Matt Sturgeon <matt@sturgeon.me.uk>
Reviewed-by: awwpotato <awwpotato@voidq.com>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
(cherry picked from commit 8c1421a)
@stylix-automation stylix-automation bot added the topic: documentation Documentation additions or improvements label Jun 19, 2025
trueNAHO pushed a commit that referenced this pull request Jun 19, 2025
Link: #1493

Co-authored-by: Daniel Thwaites <danth@danth.me>
Reviewed-by: Daniel Thwaites <danth@danth.me>
Co-authored-by: Matt Sturgeon <matt@sturgeon.me.uk>
Reviewed-by: Matt Sturgeon <matt@sturgeon.me.uk>
Reviewed-by: awwpotato <awwpotato@voidq.com>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
(cherry picked from commit 8c1421a)
@panchoh panchoh deleted the doc/leftover-renamings-docs-to-doc branch June 20, 2025 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: documentation Documentation additions or improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants