mirror of
https://github.com/NixOS/nix
synced 2025-07-06 09:11:47 +02:00
Fix various typos in source code
This only touches code comments, class names, documentation, enumeration names and tests.
This commit is contained in:
parent
9e97ecabb6
commit
114de63d88
63 changed files with 104 additions and 104 deletions
|
@ -329,7 +329,7 @@ Goal::Co DerivationBuildingGoal::gaveUpOnSubstitution()
|
|||
auto take1 = get(resolvedResult.builtOutputs, outputName);
|
||||
if (take1) return *take1;
|
||||
|
||||
/* The above `get` should work. But sateful tracking of
|
||||
/* The above `get` should work. But stateful tracking of
|
||||
outputs in resolvedResult, this can get out of sync with the
|
||||
store, which is our actual source of truth. For now we just
|
||||
check the store directly if it fails. */
|
||||
|
@ -1150,7 +1150,7 @@ std::pair<bool, SingleDrvOutputs> DerivationBuildingGoal::checkPathValidity()
|
|||
for (auto & i : queryPartialDerivationOutputMap()) {
|
||||
auto initialOutput = get(initialOutputs, i.first);
|
||||
if (!initialOutput)
|
||||
// this is an invalid output, gets catched with (!wantedOutputsLeft.empty())
|
||||
// this is an invalid output, gets caught with (!wantedOutputsLeft.empty())
|
||||
continue;
|
||||
auto & info = *initialOutput;
|
||||
info.wanted = true;
|
||||
|
|
|
@ -86,7 +86,7 @@ void DerivationGoal::addWantedOutputs(const OutputsSpec & outputs)
|
|||
{
|
||||
auto newWanted = wantedOutputs.union_(outputs);
|
||||
switch (needRestart) {
|
||||
case NeedRestartForMoreOutputs::OutputsUnmodifedDontNeed:
|
||||
case NeedRestartForMoreOutputs::OutputsUnmodifiedDontNeed:
|
||||
if (!newWanted.isSubsetOf(wantedOutputs))
|
||||
needRestart = NeedRestartForMoreOutputs::OutputsAddedDoNeed;
|
||||
break;
|
||||
|
@ -303,7 +303,7 @@ Goal::Co DerivationGoal::haveDerivation(StorePath drvPath)
|
|||
nrFailed = nrNoSubstituters = 0;
|
||||
|
||||
if (needRestart == NeedRestartForMoreOutputs::OutputsAddedDoNeed) {
|
||||
needRestart = NeedRestartForMoreOutputs::OutputsUnmodifedDontNeed;
|
||||
needRestart = NeedRestartForMoreOutputs::OutputsUnmodifiedDontNeed;
|
||||
co_return haveDerivation(std::move(drvPath));
|
||||
}
|
||||
|
||||
|
@ -458,7 +458,7 @@ std::pair<bool, SingleDrvOutputs> DerivationGoal::checkPathValidity(const StoreP
|
|||
for (auto & i : queryPartialDerivationOutputMap(drvPath)) {
|
||||
auto initialOutput = get(initialOutputs, i.first);
|
||||
if (!initialOutput)
|
||||
// this is an invalid output, gets catched with (!wantedOutputsLeft.empty())
|
||||
// this is an invalid output, gets caught with (!wantedOutputsLeft.empty())
|
||||
continue;
|
||||
auto & info = *initialOutput;
|
||||
info.wanted = wantedOutputs.contains(i.first);
|
||||
|
|
|
@ -412,7 +412,7 @@ Derivation parseDerivation(
|
|||
expect(str, "rvWithVersion(");
|
||||
auto versionS = parseString(str);
|
||||
if (*versionS == "xp-dyn-drv") {
|
||||
// Only verison we have so far
|
||||
// Only version we have so far
|
||||
version = DerivationATermVersion::DynamicDerivations;
|
||||
xpSettings.require(Xp::DynamicDerivations);
|
||||
} else {
|
||||
|
@ -553,7 +553,7 @@ static void unparseDerivedPathMapNode(const StoreDirConfig & store, std::string
|
|||
* derivation?
|
||||
*
|
||||
* In other words, does it on the output of derivation that is itself an
|
||||
* ouput of a derivation? This corresponds to a dependency that is an
|
||||
* output of a derivation? This corresponds to a dependency that is an
|
||||
* inductive derived path with more than one layer of
|
||||
* `DerivedPath::Built`.
|
||||
*/
|
||||
|
|
|
@ -775,7 +775,7 @@ void LocalStore::collectGarbage(const GCOptions & options, GCResults & results)
|
|||
deleteFromStore(path.to_string());
|
||||
referrersCache.erase(path);
|
||||
} catch (PathInUse &e) {
|
||||
// If we end up here, it's likely a new occurence
|
||||
// If we end up here, it's likely a new occurrence
|
||||
// of https://github.com/NixOS/nix/issues/11923
|
||||
printError("BUG: %s", e.what());
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ struct BuildResult
|
|||
{
|
||||
/**
|
||||
* @note This is directly used in the nix-store --serve protocol.
|
||||
* That means we need to worry about compatability across versions.
|
||||
* That means we need to worry about compatibility across versions.
|
||||
* Therefore, don't remove status codes, and only add new status
|
||||
* codes at the end of the list.
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
/**
|
||||
* @file Misc type defitions for both local building and remote (RPC building)
|
||||
* @file Misc type definitions for both local building and remote (RPC building)
|
||||
*/
|
||||
|
||||
#include "nix/util/hash.hh"
|
||||
|
|
|
@ -42,7 +42,7 @@ struct DerivationGoal : public Goal
|
|||
* The goal state machine is progressing based on the current value of
|
||||
* `wantedOutputs. No actions are needed.
|
||||
*/
|
||||
OutputsUnmodifedDontNeed,
|
||||
OutputsUnmodifiedDontNeed,
|
||||
/**
|
||||
* `wantedOutputs` has been extended, but the state machine is
|
||||
* proceeding according to its old value, so we need to restart.
|
||||
|
@ -59,7 +59,7 @@ struct DerivationGoal : public Goal
|
|||
/**
|
||||
* Whether additional wanted outputs have been added.
|
||||
*/
|
||||
NeedRestartForMoreOutputs needRestart = NeedRestartForMoreOutputs::OutputsUnmodifedDontNeed;
|
||||
NeedRestartForMoreOutputs needRestart = NeedRestartForMoreOutputs::OutputsUnmodifiedDontNeed;
|
||||
|
||||
/**
|
||||
* The derivation stored at `drvReq`.
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* Template implementations (as opposed to mere declarations).
|
||||
*
|
||||
* This file is an exmample of the "impl.hh" pattern. See the
|
||||
* This file is an example of the "impl.hh" pattern. See the
|
||||
* contributing guide.
|
||||
*/
|
||||
|
||||
|
|
|
@ -89,12 +89,12 @@ DECLARE_COMMON_SERIALISER(std::map<K COMMA_ V>);
|
|||
* that the underlying types never serialize to the empty string.
|
||||
*
|
||||
* We do this instead of a generic std::optional<T> instance because
|
||||
* ordinal tags (0 or 1, here) are a bit of a compatability hazard. For
|
||||
* ordinal tags (0 or 1, here) are a bit of a compatibility hazard. For
|
||||
* the same reason, we don't have a std::variant<T..> instances (ordinal
|
||||
* tags 0...n).
|
||||
*
|
||||
* We could the generic instances and then these as specializations for
|
||||
* compatability, but that's proven a bit finnicky, and also makes the
|
||||
* compatibility, but that's proven a bit finnicky, and also makes the
|
||||
* worker protocol harder to implement in other languages where such
|
||||
* specializations may not be allowed.
|
||||
*/
|
||||
|
|
|
@ -170,7 +170,7 @@ struct DerivationOptions
|
|||
/**
|
||||
* Parse this information from its legacy encoding as part of the
|
||||
* environment. This should not be used with nice greenfield formats
|
||||
* (e.g. JSON) but is necessary for supporing old formats (e.g.
|
||||
* (e.g. JSON) but is necessary for supporting old formats (e.g.
|
||||
* ATerm).
|
||||
*/
|
||||
static DerivationOptions
|
||||
|
|
|
@ -214,7 +214,7 @@ struct DerivationType {
|
|||
/**
|
||||
* Impure derivation type
|
||||
*
|
||||
* This is similar at buil-time to the content addressed, not standboxed, not fixed
|
||||
* This is similar at build-time to the content addressed, not standboxed, not fixed
|
||||
* type, but has some restrictions on its usage.
|
||||
*/
|
||||
struct Impure {
|
||||
|
|
|
@ -89,7 +89,7 @@ struct GCResults
|
|||
* Some views have only a no-op temp roots even though others to the
|
||||
* same store allow triggering GC. For instance one can't add a root
|
||||
* over ssh, but that doesn't prevent someone from gc-ing that store
|
||||
* accesed via SSH locally).
|
||||
* accessed via SSH locally).
|
||||
*
|
||||
* - The derived `LocalFSStore` class has `LocalFSStore::addPermRoot`,
|
||||
* which is not part of this class because it relies on the notion of
|
||||
|
|
|
@ -13,13 +13,13 @@ namespace nix {
|
|||
|
||||
/**
|
||||
* An (owned) output name. Just a type alias used to make code more
|
||||
* readible.
|
||||
* readable.
|
||||
*/
|
||||
typedef std::string OutputName;
|
||||
|
||||
/**
|
||||
* A borrowed output name. Just a type alias used to make code more
|
||||
* readible.
|
||||
* readable.
|
||||
*/
|
||||
typedef std::string_view OutputNameView;
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ struct UnkeyedValidPathInfo
|
|||
Hash narHash;
|
||||
|
||||
/**
|
||||
* Other store objects this store object referes to.
|
||||
* Other store objects this store object refers to.
|
||||
*/
|
||||
StorePathSet references;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* Template implementations (as opposed to mere declarations).
|
||||
*
|
||||
* This file is an exmample of the "impl.hh" pattern. See the
|
||||
* This file is an example of the "impl.hh" pattern. See the
|
||||
* contributing guide.
|
||||
*/
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ public:
|
|||
*
|
||||
* Current implementation is to use `fcntl` with `F_SETPIPE_SZ`,
|
||||
* which is Linux-only. For this implementation, `size` must
|
||||
* convertable to an `int`. In other words, it must be within
|
||||
* convertible to an `int`. In other words, it must be within
|
||||
* `[0, INT_MAX]`.
|
||||
*/
|
||||
void trySetBufferSize(size_t size);
|
||||
|
|
|
@ -382,7 +382,7 @@ public:
|
|||
|
||||
/**
|
||||
* Query the mapping outputName => outputPath for the given
|
||||
* derivation. All outputs are mentioned so ones mising the mapping
|
||||
* derivation. All outputs are mentioned so ones missing the mapping
|
||||
* are mapped to `std::nullopt`.
|
||||
*/
|
||||
virtual std::map<std::string, std::optional<StorePath>> queryPartialDerivationOutputMap(
|
||||
|
@ -809,7 +809,7 @@ protected:
|
|||
|
||||
/**
|
||||
* Helper for methods that are not unsupported: this is used for
|
||||
* default definitions for virtual methods that are meant to be overriden.
|
||||
* default definitions for virtual methods that are meant to be overridden.
|
||||
*
|
||||
* @todo Using this should be a last resort. It is better to make
|
||||
* the method "virtual pure" and/or move it to a subclass.
|
||||
|
|
|
@ -89,7 +89,7 @@ struct MixStoreDirMethods
|
|||
|
||||
/**
|
||||
* Read-only variant of addToStore(). It returns the store
|
||||
* path for the given file sytem object.
|
||||
* path for the given file system object.
|
||||
*/
|
||||
std::pair<StorePath, Hash> computeStorePath(
|
||||
std::string_view name,
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace nix {
|
|||
|
||||
/**
|
||||
* A parsed Store URI (URI is a slight misnomer...), parsed but not yet
|
||||
* resolved to a specific instance and query parms validated.
|
||||
* resolved to a specific instance and query params validated.
|
||||
*
|
||||
* Supported values are:
|
||||
*
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* those implementations.
|
||||
*
|
||||
* Consumers of an arbitrary store from a URL/JSON configuration instead
|
||||
* just need the defintions `nix/store/store-open.hh`; those do use this
|
||||
* just need the definitions `nix/store/store-open.hh`; those do use this
|
||||
* but only as an implementation. Consumers of a specific extra type of
|
||||
* store can skip both these, and just use the definition of the store
|
||||
* in question directly.
|
||||
|
@ -71,7 +71,7 @@ struct Implementations
|
|||
};
|
||||
auto [it, didInsert] = registered().insert({TConfig::name(), std::move(factory)});
|
||||
if (!didInsert) {
|
||||
throw Error("Already registred store with name '%s'", it->first);
|
||||
throw Error("Already registered store with name '%s'", it->first);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -97,7 +97,7 @@ struct WorkerProto::BasicClientConnection : WorkerProto::BasicConnection
|
|||
|
||||
/**
|
||||
* After calling handshake, must call this to exchange some basic
|
||||
* information abou the connection.
|
||||
* information about the connection.
|
||||
*/
|
||||
ClientHandshakeInfo postHandshake(const StoreDirConfig & store);
|
||||
|
||||
|
@ -157,7 +157,7 @@ struct WorkerProto::BasicServerConnection : WorkerProto::BasicConnection
|
|||
|
||||
/**
|
||||
* After calling handshake, must call this to exchange some basic
|
||||
* information abou the connection.
|
||||
* information about the connection.
|
||||
*/
|
||||
void postHandshake(const StoreDirConfig & store, const ClientHandshakeInfo & info);
|
||||
};
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* Template implementations (as opposed to mere declarations).
|
||||
*
|
||||
* This file is an exmample of the "impl.hh" pattern. See the
|
||||
* This file is an example of the "impl.hh" pattern. See the
|
||||
* contributing guide.
|
||||
*/
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ struct WorkerProto
|
|||
struct BasicServerConnection;
|
||||
|
||||
/**
|
||||
* Extra information provided as part of protocol negotation.
|
||||
* Extra information provided as part of protocol negotiation.
|
||||
*/
|
||||
struct ClientHandshakeInfo;
|
||||
|
||||
|
|
|
@ -331,7 +331,7 @@ Path getDefaultProfile()
|
|||
if (!pathExists(profileLink)) {
|
||||
replaceSymlink(profile, profileLink);
|
||||
}
|
||||
// Backwards compatibiliy measure: Make root's profile available as
|
||||
// Backwards compatibility measure: Make root's profile available as
|
||||
// `.../default` as it's what NixOS and most of the init scripts expect
|
||||
Path globalProfileLink = settings.nixStateDir + "/profiles/default";
|
||||
if (isRootUser() && !pathExists(globalProfileLink)) {
|
||||
|
|
|
@ -120,7 +120,7 @@ std::string MountedSSHStoreConfig::doc()
|
|||
* store.
|
||||
*
|
||||
* MountedSSHStore is very similar to UDSRemoteStore --- ignoring the
|
||||
* superficial differnce of SSH vs Unix domain sockets, they both are
|
||||
* superficial difference of SSH vs Unix domain sockets, they both are
|
||||
* accessing remote stores, and they both assume the store will be
|
||||
* mounted in the local filesystem.
|
||||
*
|
||||
|
|
|
@ -333,10 +333,10 @@ digraph graphname {
|
|||
node [shape=box]
|
||||
fileSource -> narSink
|
||||
narSink [style=dashed]
|
||||
narSink -> unsualHashTee [style = dashed, label = "Recursive && !SHA-256"]
|
||||
narSink -> unusualHashTee [style = dashed, label = "Recursive && !SHA-256"]
|
||||
narSink -> narHashSink [style = dashed, label = "else"]
|
||||
unsualHashTee -> narHashSink
|
||||
unsualHashTee -> caHashSink
|
||||
unusualHashTee -> narHashSink
|
||||
unusualHashTee -> caHashSink
|
||||
fileSource -> parseSink
|
||||
parseSink [style=dashed]
|
||||
parseSink-> fileSink [style = dashed, label = "Flat"]
|
||||
|
|
|
@ -1987,7 +1987,7 @@ void DerivationBuilderImpl::runChild()
|
|||
}
|
||||
|
||||
for (auto & i : ss) {
|
||||
// For backwards-compatibiliy, resolve all the symlinks in the
|
||||
// For backwards-compatibility, resolve all the symlinks in the
|
||||
// chroot paths
|
||||
auto canonicalPath = canonPath(i, true);
|
||||
pathsInChroot.emplace(i, canonicalPath);
|
||||
|
|
|
@ -127,7 +127,7 @@ bool PathLocks::lockPaths(const PathSet & paths, const std::string & waitMsg, bo
|
|||
}
|
||||
}
|
||||
|
||||
debug("lock aquired on '%1%'", lockPath);
|
||||
debug("lock acquired on '%1%'", lockPath);
|
||||
|
||||
struct _stat st;
|
||||
if (_fstat(fromDescriptorReadOnly(fd.get()), &st) == -1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue