From fefa3a49ce67998923af0b6c927cb9cea1f4ceaa Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Tue, 3 Jan 2023 11:21:21 +0100 Subject: [PATCH] doc/manual: Apply suggestions from code review Co-authored-by: Valentin Gagarin --- doc/manual/src/contributing/hacking.md | 16 +++++++++++----- src/libexpr/primops.cc | 2 +- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/doc/manual/src/contributing/hacking.md b/doc/manual/src/contributing/hacking.md index cd3788efc..fe24294f8 100644 --- a/doc/manual/src/contributing/hacking.md +++ b/doc/manual/src/contributing/hacking.md @@ -250,16 +250,19 @@ The installer now supports a `--tarball-url-prefix` flag which _may_ have solved this need? --> -### Checking the manual links +### Checking links in the manual -The build checks for broken internal links, but this happens late in the process, -so `nix build .` is not suitable for iterating. To check the manual incrementally, run: +The build checks for broken internal links. +This happens late in the process, so `nix build` is not suitable for iterating. +To build the manual incrementally, run: ```console make html -j $NIX_BUILD_CORES ``` -When iterating on the makefile, run: +In order to reflect changes to the [Makefile], clear all generated files before re-building: + +[Makefile]: https://github.com/NixOS/nix/blob/master/doc/manual/local.mk ```console rm $(git ls-files doc/manual/ -o | grep -F '.md') && rmdir doc/manual/src/command-ref/new-cli && make html -j $NIX_BUILD_CORES @@ -267,4 +270,7 @@ rm $(git ls-files doc/manual/ -o | grep -F '.md') && rmdir doc/manual/src/comman If a broken link occurs in a snippet that was inserted into multiple generated files in different directories, use `@docroot@` to reference the `doc/manual/src` directory. -`mdbook-linkcheck` does not implement fragment checking yet. +[`mdbook-linkcheck`] does not implement checking [URI fragments] yet. + +[`mdbook-linkcheck`]: https://github.com/Michael-F-Bryan/mdbook-linkcheck +[URI fragments]: https://en.m.wikipedia.org/wiki/URI_fragment diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 23ddd607c..fc1524599 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -254,7 +254,7 @@ static RegisterPrimOp primop_import({ > > Unlike some languages, `import` is a regular function in Nix. > Paths using the angle bracket syntax (e.g., `import` *\*) - > are normal path values. + > are normal [path values](@docroot@/language/values.md#type-path). A Nix expression loaded by `import` must not contain any *free variables* (identifiers that are not defined in the Nix expression