Skip to content

Documentation: list experimental features in manual#7798

Merged
edolstra merged 14 commits intoNixOS:masterfrom
peeley:list-experimental-features
Apr 11, 2023
Merged

Documentation: list experimental features in manual#7798
edolstra merged 14 commits intoNixOS:masterfrom
peeley:list-experimental-features

Conversation

@peeley
Copy link
Contributor

@peeley peeley commented Feb 10, 2023

Motivation

This PR updatesnix.conf manual page with a list of all current experimental features. Also adds a comment reminding future contributors to update the list of experimental commands in the docs when the list is changed.

Context

Currently, the manual does not list what experimental features are available, and grepping through the source is the most direct method.

See #7368 for more info.

Checklist for maintainers

Maintainers: tick if completed or explain if not relevant

  • agreed on idea
  • agreed on implementation strategy
  • tests, as appropriate
    • functional tests - tests/**.sh
    • unit tests - src/*/tests
    • integration tests - tests/nixos/*
  • documentation in the manual
  • code and comments are self-explanatory
  • commit message explains why the change was made
  • new feature or incompatible change: updated release notes

@peeley peeley force-pushed the list-experimental-features branch from b226aca to 0a04bdb Compare February 18, 2023 02:27
@peeley peeley requested review from edolstra and removed request for thufschmitt February 18, 2023 02:28
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/1860

@thufschmitt thufschmitt added the idea approved The given proposal has been discussed and approved by the Nix team. An implementation is welcome. label Mar 24, 2023
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2023-03-23-nix-team-meeting-minutes-43/26758/1

@peeley peeley force-pushed the list-experimental-features branch from f49084a to 0a04bdb Compare March 28, 2023 00:11
Lists all current experimental features in the `nix.conf` manual.
@peeley peeley force-pushed the list-experimental-features branch from 0a04bdb to d1d1ae7 Compare March 28, 2023 00:13
- Use struct not `std::pair`, designated initializers

- Use `constexpr` array that we can index by enum tag

- It no longer segfaults; not sure why.
Ericson2314 added a commit to obsidiansystems/nix that referenced this pull request Apr 3, 2023
Prior to this, there was an ad-hoc whitelist in `main.cc`. Now, every
command states its stability.

In a future PR, we will adjust the manual to take advantage of this new
information in the JSON.
(It will be easier to do that once we have some experimental feature
docs to link too; see NixOS#5930 and NixOS#7798.)
Ericson2314 added a commit to obsidiansystems/nix that referenced this pull request Apr 3, 2023
Prior to this, there was an ad-hoc whitelist in `main.cc`. Now, every
command states its stability.

In a future PR, we will adjust the manual to take advantage of this new
information in the JSON.
(It will be easier to do that once we have some experimental feature
docs to link too; see NixOS#5930 and NixOS#7798.)
Ericson2314 added a commit to obsidiansystems/nix that referenced this pull request Apr 3, 2023
Prior to this, there was an ad-hoc whitelist in `main.cc`. Now, every
command states its stability.

In a future PR, we will adjust the manual to take advantage of this new
information in the JSON.
(It will be easier to do that once we have some experimental feature
docs to link too; see NixOS#5930 and NixOS#7798.)
Ericson2314 added a commit to obsidiansystems/nix that referenced this pull request Apr 3, 2023
Prior to this, there was an ad-hoc whitelist in `main.cc`. Now, every
command states its stability.

In a future PR, we will adjust the manual to take advantage of this new
information in the JSON.
(It will be easier to do that once we have some experimental feature
docs to link too; see NixOS#5930 and NixOS#7798.)
@fricklerhandwerk fricklerhandwerk self-assigned this Apr 4, 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.

Thanks a lot! This change is a great improvement on many levels:

  1. we finally get an full, automated overview of experimental features
  2. we get more documentation on what they are about
  3. the cross-linking exposes powerful new capabilities to users which would otherwise go unnoticed

Because I think this will have quite some impact, I'd prefer that we take the time to get the added information right. @peeley if implementing my suggestions feels like too much work for you, we can lift this to the @NixOS/documentation-team to get more eyes and hands on it. Would be great if we can move this forward and merge soon.

Comment on lines 32 to 33
derivation attribute to `true`. See [these release
notes](../release-notes/rl-2.8.md) for an example.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please expand that information here. Release notes are not documentation, and it's a good occasion to lift that stuff to where it's visible for users.

Co-authored-by: Valentin Gagarin <[email protected]>
Instead of constructing a markdown list in C++ (which involved all sorts
of nasty string literals), export some JSON and assemble it with the
manual build system.

Besides following the precedent set with other dumped data, this is a
better separate of content and presentation; if we decide for example we
want to display this information in a different way, or in a different
section of the manual, it will become much easier to do so.
@peeley
Copy link
Contributor Author

peeley commented Apr 6, 2023

Thanks a lot! This change is a great improvement on many levels:

  1. we finally get an full, automated overview of experimental features
  2. we get more documentation on what they are about
  3. the cross-linking exposes powerful new capabilities to users which would otherwise go unnoticed

Because I think this will have quite some impact, I'd prefer that we take the time to get the added information right. @peeley if implementing my suggestions feels like too much work for you, we can lift this to the @NixOS/documentation-team to get more eyes and hands on it. Would be great if we can move this forward and merge soon.

@fricklerhandwerk Thank you for the feedback! I've performed some of the requested revisions. For some of the more inscrutable features like recursive-nix, I may have gone overboard with the verbosity/examples. Please let me know if further revisions are necessary or if the docs could be more terse!

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.

Thanks a lot, that pushes the whole thing to the next level. Please consider the suggestions, trying to simplify things and keep potential confusion low.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2023-04-06-documentation-team-meeting-notes-39/27048/1

@peeley peeley force-pushed the list-experimental-features branch from 8a6e354 to c654e0a Compare April 6, 2023 21:50
Adds examples and additional information to the `impure-derivations`,
`recursive-nix`, and `no-url-literals` experimental feature
documentation.
@peeley peeley force-pushed the list-experimental-features branch from c654e0a to 8a7790f Compare April 6, 2023 21:52
@Ericson2314
Copy link
Member

@peeley Sorry we've been half-commandeering your PR, but while we do it would be nice if no one force-pushes to it. We lost the last round of changes I did I believe unintentionally, for example.

peeley and others added 4 commits April 6, 2023 15:02
They are put in the manual separate pages under the new overarching
description of experimental features.

The settings page just lists the valid experimental feature names (so
people know what a valid setting entry looks like), with links to those
pages. It doesn't attempt to describe each experimental feature as that
is too much information for the configuration settings section.
@Ericson2314
Copy link
Member

(I merged master and cherry-picked the lost commits again, so we are all good now.)

@peeley
Copy link
Contributor Author

peeley commented Apr 6, 2023

@Ericson2314 Ah, I'm sorry! Hadn't been keeping my local branch up to date, did not mean to lose history.

@Ericson2314
Copy link
Member

All good, these things happen.

@edolstra edolstra enabled auto-merge April 11, 2023 09:31
@edolstra edolstra merged commit 60a1bf0 into NixOS:master Apr 11, 2023
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/tweag-nix-dev-update-47/27387/1

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/this-month-in-nix-docs-2-april-2023/27899/1

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

Labels

documentation idea approved The given proposal has been discussed and approved by the Nix team. An implementation is welcome.

Projects

Status: Done
Archived in project

Development

Successfully merging this pull request may close these issues.

7 participants