Skip to content

Commit 2775516

Browse files
authored
Merge pull request #92 from DeterminateSystems/lucperkins/fh-864-fix-error-messages-to-avoid-fake-future-tense
Fix some instances of 'will'
2 parents e9c6002 + c6f8737 commit 2775516

22 files changed

Lines changed: 141 additions & 142 deletions

File tree

src/libcmd/installables.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ SourceExprCommand::SourceExprCommand()
199199
.shortName = 'f',
200200
.description =
201201
"Interpret [*installables*](@docroot@/command-ref/new-cli/nix.md#installables) as attribute paths relative to the Nix expression stored in *file*. "
202-
"If *file* is the character -, then a Nix expression will be read from standard input. "
202+
"If *file* is the character -, then a Nix expression is read from standard input. "
203203
"Implies `--impure`.",
204204
.category = installablesCategory,
205205
.labels = {"file"},

src/libexpr/include/nix/expr/eval-settings.hh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ struct EvalSettings : Config
131131
Setting<bool> restrictEval{
132132
this, false, "restrict-eval",
133133
R"(
134-
If set to `true`, the Nix evaluator will not allow access to any
134+
If set to `true`, the Nix evaluator doesn't allow access to any
135135
files outside of
136-
[`builtins.nixPath`](@docroot@/language/builtins.md#builtins-nixPath),
136+
[`builtins.nixPath`](@docroot@/language/builtins.md#builtins-nixPath)
137137
or to URIs outside of
138138
[`allowed-uris`](@docroot@/command-ref/conf-file.md#conf-allowed-uris).
139139
)"};
@@ -156,7 +156,7 @@ struct EvalSettings : Config
156156
R"(
157157
By default, Nix allows [Import from Derivation](@docroot@/language/import-from-derivation.md).
158158
159-
When this setting is `true`, Nix will log a warning indicating that it performed such an import.
159+
When this setting is `true`, Nix logs a warning indicating that it performed such an import.
160160
This option has no effect if `allow-import-from-derivation` is disabled.
161161
)"
162162
};
@@ -166,9 +166,9 @@ struct EvalSettings : Config
166166
R"(
167167
By default, Nix allows [Import from Derivation](@docroot@/language/import-from-derivation.md).
168168
169-
With this option set to `false`, Nix will throw an error when evaluating an expression that uses this feature,
169+
With this option set to `false`, Nix throws an error when evaluating an expression that uses this feature,
170170
even when the required store object is readily available.
171-
This ensures that evaluation will not require any builds to take place,
171+
This ensures that evaluation doesn't require any builds to take place,
172172
regardless of the state of the store.
173173
)"};
174174

@@ -187,8 +187,8 @@ struct EvalSettings : Config
187187

188188
Setting<bool> traceFunctionCalls{this, false, "trace-function-calls",
189189
R"(
190-
If set to `true`, the Nix evaluator will trace every function call.
191-
Nix will print a log message at the "vomit" level for every function
190+
If set to `true`, the Nix evaluator traces every function call.
191+
Nix prints a log message at the "vomit" level for every function
192192
entrance and function exit.
193193
194194
function-trace entered undefined position at 1565795816999559622
@@ -213,7 +213,7 @@ struct EvalSettings : Config
213213
Setting<bool> ignoreExceptionsDuringTry{this, false, "ignore-try",
214214
R"(
215215
If set to true, ignore exceptions inside 'tryEval' calls when evaluating nix expressions in
216-
debug mode (using the --debugger flag). By default the debugger will pause on all exceptions.
216+
debug mode (using the --debugger flag). By default, the debugger pauses on all exceptions.
217217
)"};
218218

219219
Setting<bool> traceVerbose{this, false, "trace-verbose",
@@ -225,7 +225,7 @@ struct EvalSettings : Config
225225
Setting<bool> builtinsTraceDebugger{this, false, "debugger-on-trace",
226226
R"(
227227
If set to true and the `--debugger` flag is given, the following functions
228-
will enter the debugger like [`builtins.break`](@docroot@/language/builtins.md#builtins-break).
228+
enter the debugger like [`builtins.break`](@docroot@/language/builtins.md#builtins-break).
229229
230230
* [`builtins.trace`](@docroot@/language/builtins.md#builtins-trace)
231231
* [`builtins.traceVerbose`](@docroot@/language/builtins.md#builtins-traceVerbose)
@@ -238,7 +238,7 @@ struct EvalSettings : Config
238238
Setting<bool> builtinsDebuggerOnWarn{this, false, "debugger-on-warn",
239239
R"(
240240
If set to true and the `--debugger` flag is given, [`builtins.warn`](@docroot@/language/builtins.md#builtins-warn)
241-
will enter the debugger like [`builtins.break`](@docroot@/language/builtins.md#builtins-break).
241+
enter the debugger like [`builtins.break`](@docroot@/language/builtins.md#builtins-break).
242242
243243
This is useful for debugging warnings in third-party Nix code.
244244
@@ -247,9 +247,9 @@ struct EvalSettings : Config
247247

248248
Setting<bool> builtinsAbortOnWarn{this, false, "abort-on-warn",
249249
R"(
250-
If set to true, [`builtins.warn`](@docroot@/language/builtins.md#builtins-warn) will throw an error when logging a warning.
250+
If set to true, [`builtins.warn`](@docroot@/language/builtins.md#builtins-warn) throws an error when logging a warning.
251251
252-
This will give you a stack trace that leads to the location of the warning.
252+
This gives you a stack trace that leads to the location of the warning.
253253
254254
This is useful for finding information about warnings in third-party Nix code when you can not start the interactive debugger, such as when Nix is called from a non-interactive script. See [`debugger-on-warn`](#conf-debugger-on-warn).
255255

src/libexpr/primops.cc

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ static RegisterPrimOp primop_import({
352352
> }
353353
> ```
354354
>
355-
> then the following `foo.nix` will give an error:
355+
> then the following `foo.nix` throws an error:
356356
>
357357
> ```nix
358358
> # foo.nix
@@ -936,7 +936,7 @@ static RegisterPrimOp primop_ceil({
936936
a NixInt and if `*number* < -9007199254740992` or `*number* > 9007199254740992`.
937937
938938
If the datatype of *number* is neither a NixInt (signed 64-bit integer) nor a NixFloat
939-
(IEEE-754 double-precision floating-point number), an evaluation error will be thrown.
939+
(IEEE-754 double-precision floating-point number), an evaluation error is thrown.
940940
)",
941941
.fun = prim_ceil,
942942
});
@@ -977,7 +977,7 @@ static RegisterPrimOp primop_floor({
977977
a NixInt and if `*number* < -9007199254740992` or `*number* > 9007199254740992`.
978978
979979
If the datatype of *number* is neither a NixInt (signed 64-bit integer) nor a NixFloat
980-
(IEEE-754 double-precision floating-point number), an evaluation error will be thrown.
980+
(IEEE-754 double-precision floating-point number), an evaluation error is thrown.
981981
)",
982982
.fun = prim_floor,
983983
});
@@ -1023,15 +1023,15 @@ static RegisterPrimOp primop_tryEval({
10231023
Try to shallowly evaluate *e*. Return a set containing the
10241024
attributes `success` (`true` if *e* evaluated successfully,
10251025
`false` if an error was thrown) and `value`, equalling *e* if
1026-
successful and `false` otherwise. `tryEval` will only prevent
1026+
successful and `false` otherwise. `tryEval` only prevents
10271027
errors created by `throw` or `assert` from being thrown.
1028-
Errors `tryEval` will not catch are for example those created
1028+
Errors that `tryEval` doesn't catch are, for example, those created
10291029
by `abort` and type errors generated by builtins. Also note that
10301030
this doesn't evaluate *e* deeply, so `let e = { x = throw ""; };
1031-
in (builtins.tryEval e).success` will be `true`. Using
1031+
in (builtins.tryEval e).success` is `true`. Using
10321032
`builtins.deepSeq` one can get the expected result:
10331033
`let e = { x = throw ""; }; in
1034-
(builtins.tryEval (builtins.deepSeq e e)).success` will be
1034+
(builtins.tryEval (builtins.deepSeq e e)).success` is
10351035
`false`.
10361036
10371037
`tryEval` intentionally does not return the error message, because that risks bringing non-determinism into the evaluation result, and it would become very difficult to improve error reporting without breaking existing expressions.
@@ -1129,7 +1129,7 @@ static RegisterPrimOp primop_trace({
11291129
If the
11301130
[`debugger-on-trace`](@docroot@/command-ref/conf-file.md#conf-debugger-on-trace)
11311131
option is set to `true` and the `--debugger` flag is given, the
1132-
interactive debugger will be started when `trace` is called (like
1132+
interactive debugger is started when `trace` is called (like
11331133
[`break`](@docroot@/language/builtins.md#builtins-break)).
11341134
)",
11351135
.fun = prim_trace,
@@ -1173,12 +1173,12 @@ static RegisterPrimOp primop_warn({
11731173
[`debugger-on-trace`](@docroot@/command-ref/conf-file.md#conf-debugger-on-trace)
11741174
or [`debugger-on-warn`](@docroot@/command-ref/conf-file.md#conf-debugger-on-warn)
11751175
option is set to `true` and the `--debugger` flag is given, the
1176-
interactive debugger will be started when `warn` is called (like
1176+
interactive debugger is started when `warn` is called (like
11771177
[`break`](@docroot@/language/builtins.md#builtins-break)).
11781178
11791179
If the
11801180
[`abort-on-warn`](@docroot@/command-ref/conf-file.md#conf-abort-on-warn)
1181-
option is set, the evaluation will be aborted after the warning is printed.
1181+
option is set, the evaluation is aborted after the warning is printed.
11821182
This is useful to reveal the stack trace of the warning, when the context is non-interactive and a debugger can not be launched.
11831183
)",
11841184
.fun = prim_warn,
@@ -1670,7 +1670,7 @@ static RegisterPrimOp primop_placeholder({
16701670
.name = "placeholder",
16711671
.args = {"output"},
16721672
.doc = R"(
1673-
Return at
1673+
Return an
16741674
[output placeholder string](@docroot@/store/derivation/index.md#output-placeholder)
16751675
for the specified *output* that will be substituted by the corresponding
16761676
[output path](@docroot@/glossary.md#gloss-output-path)
@@ -1835,7 +1835,7 @@ static RegisterPrimOp primop_baseNameOf({
18351835
18361836
After this, the *base name* is returned as previously described, assuming `/` as the directory separator. (Note that evaluation must be platform independent.)
18371837
1838-
This is somewhat similar to the [GNU `basename`](https://www.gnu.org/software/coreutils/manual/html_node/basename-invocation.html) command, but GNU `basename` will strip any number of trailing slashes.
1838+
This is somewhat similar to the [GNU `basename`](https://www.gnu.org/software/coreutils/manual/html_node/basename-invocation.html) command, but GNU `basename` strips any number of trailing slashes.
18391839
)",
18401840
.fun = prim_baseNameOf,
18411841
});
@@ -2034,9 +2034,9 @@ static RegisterPrimOp primop_findFile(PrimOp {
20342034
> ]
20352035
> ```
20362036
>
2037-
> and a *lookup-path* value `"nixos-config"` will cause Nix to try `/home/eelco/Dev/nixos-config` and `/etc/nixos` in that order and return the first path that exists.
2037+
> and a *lookup-path* value `"nixos-config"` causes Nix to try `/home/eelco/Dev/nixos-config` and `/etc/nixos` in that order and return the first path that exists.
20382038
2039-
If `path` starts with `http://` or `https://`, it is interpreted as the URL of a tarball that will be downloaded and unpacked to a temporary location.
2039+
If `path` starts with `http://` or `https://`, it is interpreted as the URL of a tarball to be downloaded and unpacked to a temporary location.
20402040
The tarball must consist of a single top-level directory.
20412041
20422042
The URLs of the tarballs from the official `nixos.org` channels can be abbreviated as `channel:<channel-name>`.
@@ -2183,7 +2183,7 @@ static RegisterPrimOp primop_readDir({
21832183
Return the contents of the directory *path* as a set mapping
21842184
directory entries to the corresponding file type. For instance, if
21852185
directory `A` contains a regular file `B` and another directory
2186-
`C`, then `builtins.readDir ./A` will return the set
2186+
`C`, then `builtins.readDir ./A` returns the set
21872187
21882188
```nix
21892189
{ B = "regular"; C = "directory"; }
@@ -2218,8 +2218,8 @@ static RegisterPrimOp primop_outputOf({
22182218
[input placeholder string](@docroot@/store/derivation/index.md#input-placeholder)
22192219
if needed.
22202220
2221-
If the derivation has a statically-known output path (i.e. the derivation output is input-addressed, or fixed content-addresed), the output path will just be returned.
2222-
But if the derivation is content-addressed or if the derivation is itself not-statically produced (i.e. is the output of another derivation), an input placeholder will be returned instead.
2221+
If the derivation has a statically-known output path (i.e. the derivation output is input-addressed, or fixed content-addresed), the output path is returned.
2222+
But if the derivation is content-addressed or if the derivation is itself not-statically produced (i.e. is the output of another derivation), an input placeholder is returned instead.
22232223
22242224
*`derivation reference`* must be a string that may contain a regular store path to a derivation, or may be an input placeholder reference.
22252225
If the derivation is produced by a derivation, you must explicitly select `drv.outPath`.
@@ -2232,7 +2232,7 @@ static RegisterPrimOp primop_outputOf({
22322232
"out"
22332233
```
22342234
2235-
will return a input placeholder for the output of the output of `myDrv`.
2235+
returns an input placeholder for the output of the output of `myDrv`.
22362236
22372237
This primop corresponds to the `^` sigil for [deriving paths](@docroot@/glossary.md#gloss-deriving-paths), e.g. as part of installable syntax on the command line.
22382238
)",
@@ -2631,12 +2631,12 @@ static RegisterPrimOp primop_filterSource({
26312631
>
26322632
> `filterSource` should not be used to filter store paths. Since
26332633
> `filterSource` uses the name of the input directory while naming
2634-
> the output directory, doing so will produce a directory name in
2634+
> the output directory, doing so produces a directory name in
26352635
> the form of `<hash2>-<hash>-<name>`, where `<hash>-<name>` is
26362636
> the name of the input directory. Since `<hash>` depends on the
2637-
> unfiltered directory, the name of the output directory will
2638-
> indirectly depend on files that are filtered out by the
2639-
> function. This will trigger a rebuild even when a filtered out
2637+
> unfiltered directory, the name of the output directory
2638+
> indirectly depends on files that are filtered out by the
2639+
> function. This triggers a rebuild even when a filtered-out
26402640
> file is changed. Use `builtins.path` instead, which allows
26412641
> specifying the name of the output directory.
26422642
@@ -2651,8 +2651,8 @@ static RegisterPrimOp primop_filterSource({
26512651
}
26522652
```
26532653
2654-
However, if `source-dir` is a Subversion working copy, then all
2655-
those annoying `.svn` subdirectories will also be copied to the
2654+
However, if `source-dir` is a Subversion working copy, then all of
2655+
those annoying `.svn` subdirectories are also copied to the
26562656
store. Worse, the contents of those directories may change a lot,
26572657
causing lots of spurious rebuilds. With `filterSource` you can
26582658
filter out the `.svn` directories:
@@ -2672,8 +2672,8 @@ static RegisterPrimOp primop_filterSource({
26722672
`"regular"`, `"directory"`, `"symlink"` or `"unknown"` (for other
26732673
kinds of files such as device nodes or fifos — but note that those
26742674
cannot be copied to the Nix store, so if the predicate returns
2675-
`true` for them, the copy will fail). If you exclude a directory,
2676-
the entire corresponding subtree of *e2* will be excluded.
2675+
`true` for them, the copy fails). If you exclude a directory,
2676+
the entire corresponding subtree of *e2* is excluded.
26772677
)",
26782678
.fun = prim_filterSource,
26792679
});
@@ -2747,7 +2747,7 @@ static RegisterPrimOp primop_path({
27472747
27482748
- sha256\
27492749
When provided, this is the expected hash of the file at the
2750-
path. Evaluation will fail if the hash is incorrect, and
2750+
path. Evaluation fails if the hash is incorrect, and
27512751
providing a hash allows `builtins.path` to be used even when the
27522752
`pure-eval` nix config option is on.
27532753
)",
@@ -4849,7 +4849,7 @@ void EvalState::createBaseEnv(const EvalSettings & evalSettings)
48494849
.type = nInt,
48504850
.doc = R"(
48514851
Return the [Unix time](https://en.wikipedia.org/wiki/Unix_time) at first evaluation.
4852-
Repeated references to that name will re-use the initially obtained value.
4852+
Repeated references to that name re-use the initially obtained value.
48534853
48544854
Example:
48554855
@@ -4864,7 +4864,7 @@ void EvalState::createBaseEnv(const EvalSettings & evalSettings)
48644864
1683705525
48654865
```
48664866
4867-
The [store path](@docroot@/store/store-path.md) of a derivation depending on `currentTime` will differ for each evaluation, unless both evaluate `builtins.currentTime` in the same second.
4867+
The [store path](@docroot@/store/store-path.md) of a derivation depending on `currentTime` differs for each evaluation unless both evaluate `builtins.currentTime` in the same second.
48684868
)",
48694869
.impureOnly = true,
48704870
});

src/libexpr/primops/context.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ static RegisterPrimOp primop_getContext({
260260
The string context tracks references to derivations within a string.
261261
It is represented as an attribute set of [store derivation](@docroot@/glossary.md#gloss-store-derivation) paths mapping to output names.
262262
263-
Using [string interpolation](@docroot@/language/string-interpolation.md) on a derivation will add that derivation to the string context.
263+
Using [string interpolation](@docroot@/language/string-interpolation.md) on a derivation adds that derivation to the string context.
264264
For example,
265265
266266
```nix

src/libexpr/primops/fetchClosure.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ static RegisterPrimOp primop_fetchClosure({
214214
.doc = R"(
215215
Fetch a store path [closure](@docroot@/glossary.md#gloss-closure) from a binary cache, and return the store path as a string with context.
216216
217-
This function can be invoked in three ways, that we will discuss in order of preference.
217+
This function can be invoked in three ways that we will discuss in order of preference.
218218
219219
**Fetch a content-addressed store path**
220220

0 commit comments

Comments
 (0)