Skip to content
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

rl-2311: Add release notes on lib #268871

Merged
merged 1 commit into from
Nov 23, 2023
Merged

Conversation

infinisil
Copy link
Member

@infinisil infinisil commented Nov 21, 2023

Description of changes

NixOS releases are also lib releases :).
As the main lib maintainer, here are the release notes for it.
These were collected from looking at the git diff since 22.11.

I boldly inserted them at the very front, because compared to all the package updates, lib may contain functions that everybody uses.

This work is sponsored by Antithesis

Things done

  • Built the manual

@infinisil
Copy link
Member Author

infinisil commented Nov 21, 2023

I notably didn't include these notes on lib.systems, because I'm not maintaining that and barely understand it:

Expand for drafty lib.systems release notes

Platforms

  • Added lib.systems.equals
  • GCC feature support for architectures x86-64, x86-64-v2, x86-64-v3, x86-64-v4, nehalem, alderlake and znver4
  • Better support for Rust cross compilation (mesa: fix cross compilation to x86_64 #233628)
  • New elaborated platform properties:
    • hasSharedLibraries
    • ubootArch
  • New doubles:
    • "mips-linux" "mips64-linux" "mips-none" "mips64-none"
  • New platforms:
    • bluefield2
  • New examples:
    • bluefield2
    • gnu64_simplekernel
    • mips64-embedded
    • mips-embedded
  • Removed examples:
    • mipsisa32r6-linux-gnu
    • mipsisa32r6el-linux-gnu
    • mipsisa64r6-linux-gnuabin32
    • mipsisa64r6el-linux-gnuabin32
    • mipsisa64r6-linux-gnuabi64
    • mipsisa64r6el-linux-gnuabi64

Ping @alyssais @Ericson2314 @amjoseph-nixpkgs

Comment on lines 86 to 91
- The internal NixOS transition to Markdown documentation is now complete,
as such, these functions are not necessary anymore:
- `mkAliasOptionModuleMD` is now just an alias to `mkAliasOptionModule`
- `mkPackageOptionMD` is now just an alias to `mkPackageOption`
- `mdDoc` is now the same as its argument
- `literalDocBook` is now removed after deprecation in 22.11
Copy link
Member Author

@infinisil infinisil Nov 21, 2023

Choose a reason for hiding this comment

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

Ping @pennae. Is this accurate or should this be moved to some more internal section?

Copy link
Contributor

Choose a reason for hiding this comment

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

literalDocBook being gone should be here, the others maybe not quite for this release. 23.05 will be around for a bit after 23.11 is released, so there'll be some overlap where out-of-tree modules will still need to use those aliases if they want to be compatible with both. not sure how relevant that is in practice, maybe it'll be enough to just add a note that all of these should still be used until 23.05 is EOL?

Copy link
Member Author

@infinisil infinisil Nov 21, 2023

Choose a reason for hiding this comment

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

Ah yeah, I think it's best to just remove the mention for these then. I only kept the removal note on literalDocBook around, the others are removed now.

Copy link
Member

@alejandrosame alejandrosame left a comment

Choose a reason for hiding this comment

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

LGTM, just please move the whole block to the end of the file and we'll edit it appropriately with nixpkgs internal section afterwards.

@github-actions github-actions bot removed the 6.topic: lib The Nixpkgs function library label Nov 21, 2023
@infinisil
Copy link
Member Author

Moved it to the bottom for now, but these lib changes should not go under "internal" changes. They are a stable and exposed API. I also think that generally curated release notes should go over non-curated ones.


- `lib.meta.getExe pkg` now gives a warning if `pkg.meta.mainProgram` is not set,
but it continues to default to the derivation name.
Use `lib.meta.getExe' pkg "someBinary"` to avoid the warning and/or select a different binary.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Use `lib.meta.getExe' pkg "someBinary"` to avoid the warning and/or select a different binary.
Nixpkgs accepts PRs that set `meta.mainProgram` on packages where it makes sense.
Use `lib.meta.getExe' pkg "some-command"` to avoid the warning and/or select a different executable.

Ideally we have better data: more mainPrograms.
Nits:

  • commands tend to be lower snake case
  • avoid "binary" because scripts aren't binaries (/bin is very very unfortunate)

Copy link
Member

Choose a reason for hiding this comment

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

lib.meta.getExe is annoying. Do we really want people to type that?
Sublibraries are cool, but everyone writes lib.getExe.

Copy link
Member Author

Choose a reason for hiding this comment

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

Applied your suggestion, also added a mention that it's also available as lib.getExe.

For the future we should figure out a clear policy about which symbols to re-export under lib.*, so we aren't struggling with this, but not today :)

Comment on lines 662 to 663
- [`lib.fixedPoints.fix`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.fixedPoints.fix) has improved documentation.
- [`lib.lists.foldl'`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.lists.foldl-prime) has improved documentation.
Copy link
Member

Choose a reason for hiding this comment

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

This should be in a section of its own, because the functions did not change and mentioning it serves a different purpose.

Copy link
Member Author

Choose a reason for hiding this comment

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

Now moved to a more general section: #268871 (comment)


## Nixpkgs library changes {#sec-release-23.11-lib}

### Additions and improvements {#sec-release-23.11-lib-additions-improvements}
Copy link
Member Author

Choose a reason for hiding this comment

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

@roberth I restructured it into just two sections instead now, one of them is here, and includes both new stuff but also improvements to stuff (intentionally not being specific what "stuff" is, so it can also include docs)

@infinisil infinisil force-pushed the release-notes-lib branch 2 times, most recently from ec12700 to 69549df Compare November 22, 2023 00:07
@infinisil infinisil added this to the 23.11 milestone Nov 22, 2023
@alejandrosame alejandrosame reopened this Nov 22, 2023
@infinisil
Copy link
Member Author

Ping @roberth, does it look good now?

Also @alejandrosame, do you want to merge this yourself or can I do that myself? (and then backport)

@alejandrosame
Copy link
Member

Ping @roberth, does it look good now?

Also @alejandrosame, do you want to merge this yourself or can I do that myself? (and then backport)

Please, merge it. I'm away for quite some time today (plus, not sure I really have merge rights for this)

Copy link
Member

@roberth roberth left a comment

Choose a reason for hiding this comment

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

Prioritization and a typo. LGTM after that.

Module system:
- `lib.types.string` is now fully deprecated and gives a warning when used.
- Now that the internal NixOS transition to Markdown documentation is complete,
`lib.options.literalDocBook` is has been removed after deprecation in 22.11.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
`lib.options.literalDocBook` is has been removed after deprecation in 22.11.
`lib.options.literalDocBook` has been removed after deprecation in 22.11.

Not to be confused with `definitionsWithLocations`, which is the same but for option _definitions_.
- Improved error message for option declarations missing `mkOption`

### Breaking changes and deprecations {#sec-release-23.11-lib-breaking-changes-deprecations}
Copy link
Member

Choose a reason for hiding this comment

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

Breaking changes should go first, not last.

Comment on lines +685 to +701
- `lib.meta.getExe pkg` (also available as `lib.getExe`) now gives a warning if `pkg.meta.mainProgram` is not set,
but it continues to default to the derivation name.
Nixpkgs accepts PRs that set `meta.mainProgram` on packages where it makes sense.
Use `lib.getExe' pkg "some-command"` to avoid the warning and/or select a different executable.
Copy link
Member

Choose a reason for hiding this comment

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

Changes with a proper migration path (deprecations in logs, as well as good error messages) should be demoted to a section that almost all readers can skip, or just omitted.

NixOS releases are also `lib` releases :)

The release notes were collected from looking at the `git diff` since
22.11.

Since the NixOS and Nixpkgs manuals are rendered separately, I'm linking
to the "unstable" link to make sure the links definitely work on the time of
release. The "stable" link might take some time to become available
@infinisil
Copy link
Member Author

@roberth Done! (diff)

@roberth roberth dismissed stale reviews from alejandrosame and themself November 23, 2023 21:29

"Please merge it"

Copy link
Member

@roberth roberth left a comment

Choose a reason for hiding this comment

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

Awesome.

@roberth roberth merged commit 1183269 into NixOS:master Nov 23, 2023
5 of 6 checks passed
@infinisil infinisil deleted the release-notes-lib branch November 23, 2023 21:36
Copy link
Contributor

Successfully created backport PR for release-23.11:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants