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

Automatically compile hand-written release notes with changelog-d #9393

Merged
merged 11 commits into from Nov 27, 2023

Conversation

roberth
Copy link
Member

@roberth roberth commented Nov 19, 2023

Motivation

  • Speed up release process
  • Self-service principle
  • Enable release notes for minor releases (backports)
  • Make writing a note very low friction

Tested manually, including nix build, make, and manually producing the git history in this details section:

Example, git log and git diff

End result (horizontal bars not included)


Release 2.20.0 (2023-11-19)

Significant changes

  • Add C bindings #1234 #1238

    Here's one or more paragraphs that describe the change...

    • It's markdown
    • Add references to the manual using @docroot@

Other changes

  • Built-in constants now have :doc support in nix repl #1234 #1238

    Example:

    nix-repl> :doc builtins.currentSystem
    
        builtins.currentSystem
    
        Foo bar baz
    

Release 2.20.1 (2023-11-19)

  • C bindings support all store methods #2345


For completeness here's the git log summary

39292ae46dea59d29130d6b28ac029b7d032442d (HEAD -> test-2) release notes: 2.20.1
9745667b6ebeec07a36a47674e045b9cf14ed8f2 C bindings: supprot all store methods
d3da5b66dae04cb9780082478bfcb30031aa94dc release notes: 2.20.0
4d78bceb03ab4270f21d5fb8bde72ed442d6b3e6 nix-repl: Add :doc for constants
f18b6a6cd92d8b9fa211faead10f4c157069531f Add c-bindings

And the log with diffs

commit 39292ae46dea59d29130d6b28ac029b7d032442d
Author: Robert Hensing <robert@roberthensing.nl>
Date:   Sun Nov 19 18:52:10 2023 +0100

    release notes: 2.20.1

diff --git a/doc/manual/rl-next/c-bindings.md b/doc/manual/rl-next/c-bindings.md
deleted file mode 100644
index 5d4b43ff5..000000000
--- a/doc/manual/rl-next/c-bindings.md
+++ /dev/null
@@ -1,2 +0,0 @@
-synopsis: C bindings support all store methods
-prs: #2345
diff --git a/doc/manual/src/release-notes/rl-2.20.md b/doc/manual/src/release-notes/rl-2.20.md
index f0b3f7d20..8df2fd3d6 100644
--- a/doc/manual/src/release-notes/rl-2.20.md
+++ b/doc/manual/src/release-notes/rl-2.20.md
@@ -23,3 +23,6 @@
       Foo bar baz
   ``
 
+# Release 2.20.1 (2023-11-19)
+
+- C bindings support all store methods [#2345](https://github.com/NixOS/nix/pull/2345)

commit 9745667b6ebeec07a36a47674e045b9cf14ed8f2
Author: Robert Hensing <robert@roberthensing.nl>
Date:   Sun Nov 19 18:52:00 2023 +0100

    C bindings: supprot all store methods

diff --git a/doc/manual/rl-next/c-bindings.md b/doc/manual/rl-next/c-bindings.md
new file mode 100644
index 000000000..5d4b43ff5
--- /dev/null
+++ b/doc/manual/rl-next/c-bindings.md
@@ -0,0 +1,2 @@
+synopsis: C bindings support all store methods
+prs: #2345

commit d3da5b66dae04cb9780082478bfcb30031aa94dc
Author: Robert Hensing <robert@roberthensing.nl>
Date:   Sun Nov 19 18:50:11 2023 +0100

    release notes: 2.20.0

diff --git a/doc/manual/rl-next/c-bindings.md b/doc/manual/rl-next/c-bindings.md
deleted file mode 100644
index 28a8ebfc9..000000000
--- a/doc/manual/rl-next/c-bindings.md
+++ /dev/null
@@ -1,12 +0,0 @@
-synopsis: Add C bindings
-issues: #1234
-prs: #1238
-significance: significant
-description: {
-
-Here's one or more paragraphs that describe the change...
-
-- It's markdown
-- Add references to the manual using @docroot@
-
-}
diff --git a/doc/manual/rl-next/doc-constants.md b/doc/manual/rl-next/doc-constants.md
deleted file mode 100644
index b6adc30b4..000000000
--- a/doc/manual/rl-next/doc-constants.md
+++ /dev/null
@@ -1,16 +0,0 @@
-synopsis: Built-in constants now have :doc support in nix repl
-issues: #1234
-prs: #1238
-description: {
-
-Example:
-
-```
-nix-repl> :doc builtins.currentSystem
-
-    builtins.currentSystem
-
-    Foo bar baz
-```
-
-}
diff --git a/doc/manual/src/SUMMARY.md.in b/doc/manual/src/SUMMARY.md.in
index 8e7b4eeab..c2e663a7e 100644
--- a/doc/manual/src/SUMMARY.md.in
+++ b/doc/manual/src/SUMMARY.md.in
@@ -115,6 +115,7 @@
   - [C++ style guide](contributing/cxx.md)
 - [Release Notes](release-notes/release-notes.md)
 {{#include ./SUMMARY-rl-next.md}}
+  - [Release 2.20 (2023-11-19)](release-notes/rl-2.20.md)
   - [Release 2.19 (2023-11-17)](release-notes/rl-2.19.md)
   - [Release 2.18 (2023-09-20)](release-notes/rl-2.18.md)
   - [Release 2.17 (2023-07-24)](release-notes/rl-2.17.md)
diff --git a/doc/manual/src/release-notes/rl-2.20.md b/doc/manual/src/release-notes/rl-2.20.md
new file mode 100644
index 000000000..f0b3f7d20
--- /dev/null
+++ b/doc/manual/src/release-notes/rl-2.20.md
@@ -0,0 +1,25 @@
+# Release 2.20.0 (2023-11-19)
+
+### Significant changes
+
+- Add C bindings [#1234](https://github.com/NixOS/nix/issues/1234) [#1238](https://github.com/NixOS/nix/pull/1238)
+
+  Here's one or more paragraphs that describe the change...
+
+  - It's markdown
+  - Add references to the manual using @docroot@
+
+### Other changes
+
+- Built-in constants now have :doc support in nix repl [#1234](https://github.com/NixOS/nix/issues/1234) [#1238](https://github.com/NixOS/nix/pull/1238)
+
+  Example:
+
+  ```
+  nix-repl> :doc builtins.currentSystem
+
+      builtins.currentSystem
+
+      Foo bar baz
+  ```
+

commit 4d78bceb03ab4270f21d5fb8bde72ed442d6b3e6
Author: Robert Hensing <robert@roberthensing.nl>
Date:   Sun Nov 19 18:49:43 2023 +0100

    nix-repl: Add :doc for constants

diff --git a/doc/manual/rl-next/doc-constants.md b/doc/manual/rl-next/doc-constants.md
new file mode 100644
index 000000000..b6adc30b4
--- /dev/null
+++ b/doc/manual/rl-next/doc-constants.md
@@ -0,0 +1,16 @@
+synopsis: Built-in constants now have :doc support in nix repl
+issues: #1234
+prs: #1238
+description: {
+
+Example:
+
+```
+nix-repl> :doc builtins.currentSystem
+
+    builtins.currentSystem
+
+    Foo bar baz
+```
+
+}

commit f18b6a6cd92d8b9fa211faead10f4c157069531f
Author: Robert Hensing <robert@roberthensing.nl>
Date:   Sun Nov 19 17:40:07 2023 +0100

    Add c-bindings

diff --git a/doc/manual/rl-next/c-bindings.md b/doc/manual/rl-next/c-bindings.md
new file mode 100644
index 000000000..28a8ebfc9
--- /dev/null
+++ b/doc/manual/rl-next/c-bindings.md
@@ -0,0 +1,12 @@
+synopsis: Add C bindings
+issues: #1234
+prs: #1238
+significance: significant
+description: {
+
+Here's one or more paragraphs that describe the change...
+
+- It's markdown
+- Add references to the manual using @docroot@
+
+}

Context

Priorities

Add 👍 to pull requests you find important.

@roberth roberth added the process Issues related to the development process of Nix label Nov 19, 2023
@roberth roberth force-pushed the changelog-d branch 2 times, most recently from 11c8dcb to 6e3e87d Compare November 19, 2023 18:05
@roberth roberth marked this pull request as ready for review November 19, 2023 19:05
@roberth roberth added the contributor-experience Developer experience for Nix contributors label Nov 19, 2023
Copy link
Contributor

@fricklerhandwerk fricklerhandwerk left a comment

Choose a reason for hiding this comment

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

All the Bash: Not great, not terrible. Conflict-free release notes: nice.

maintainers/release-process.md Show resolved Hide resolved
* Update release notes.

```console
$ ./maintainers/release-notes
Copy link
Contributor

Choose a reason for hiding this comment

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

This could be one line like above

Suggested change
$ ./maintainers/release-notes
$ VERSION=X.YY.ZZ ./maintainers/release-notes

Copy link
Member Author

Choose a reason for hiding this comment

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

I think Eelco would have exported here in practice, while in the other place that's even less obvious.
I'm fine either way. Maybe @edolstra could decide?

@roberth
Copy link
Member Author

roberth commented Nov 19, 2023

All the Bash: Not great, not terrible.

It's cheap and gets the job done quite well. Crucially it's not critical, and the mutation has safeguards:

  • maintainers/release-notes requires a clean worktree, so no info is lost
  • maintainers/add-release-note checks that it doesn't overwrite

@roberth
Copy link
Member Author

roberth commented Nov 19, 2023

If we're happy about the behavior we may consider upstreaming it into changelog-d to get rid of the bash.

Comment on lines 17 to 20
-----

> [!TIP]
> Making a user facing change? `$ maintainers/add-release-note` :rocket:
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably not a good place for it. We have a checklist in the contributor guide.

@fricklerhandwerk
Copy link
Contributor

Triaged in Nix team meeting:

  • @fricklerhandwerk: could imagine something a bit simpler and more flexible (for the user) for the convenience script, such as $EDITOR $(mktemp) and process the result to create a file with the right name in the right place

    • @roberth: could also skip the script if it causes disagreement
  • @edolstra: worried about pulling GHC into the build time closure

    • @roberth: usually only the program itself will be fetched, a couple of MiB
  • @edolstra: why can't we just cat?

    • @roberth: it does a bit of not-entirely-trivial processing, see PR description
    • @fricklerhandwerk: also inclined to do something dumber
    • @roberth: that would ignore work done by other communities, not interested in re-inventing the wheel
  • @roberth: the syntax is a bit Cabal-flavored, which is not great, but close enough

  • @fricklerhandwerk: should not overthink it, we can change the creation process in the future

  • decision: idea approved, but leave out the helper script for now and don't run it in the build by default

@fricklerhandwerk fricklerhandwerk added the idea approved The given proposal has been discussed and approved by the Nix team. An implementation is welcome. label Nov 24, 2023
@fricklerhandwerk fricklerhandwerk self-assigned this Nov 24, 2023
@nixos-discourse

This comment was marked as duplicate.

@thufschmitt

This comment was marked as resolved.

@roberth roberth force-pushed the changelog-d branch 2 times, most recently from cd44198 to 7f20da6 Compare November 24, 2023 15:30
@roberth

This comment was marked as resolved.

This way we lose the preview of release notes on master, as well
as on https://nixos.org/manual/nix/unstable/release-notes/rl-next
but we can come back to this.
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/decdf666c833a325cb4417041a90681499e06a41' (2023-11-18)
  → 'github:NixOS/nixpkgs/9ba29e2346bc542e9909d1021e8fd7d4b3f64db0' (2023-11-23)
It is about 2 MB now, as only it and libffi (tiny) are new in the
build or shell closures.
Copy link
Contributor

@fricklerhandwerk fricklerhandwerk left a comment

Choose a reason for hiding this comment

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

Nice!

maintainers/release-notes Outdated Show resolved Hide resolved
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
@roberth roberth merged commit 928f0c1 into NixOS:master Nov 27, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor-experience Developer experience for Nix contributors documentation idea approved The given proposal has been discussed and approved by the Nix team. An implementation is welcome. process Issues related to the development process of Nix
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Release notes automation
4 participants