Switch comment format from '// ...' to '/* ... */' for consistency.

This commit is contained in:
Kevin Quick 2020-09-28 09:37:26 -07:00
parent 128c98ab09
commit 887be7b6f2
No known key found for this signature in database
GPG key ID: E6D7733599CC0A21
3 changed files with 57 additions and 53 deletions

View file

@ -17,25 +17,26 @@ struct FlakeInput;
typedef std::map<FlakeId, FlakeInput> FlakeInputs; typedef std::map<FlakeId, FlakeInput> FlakeInputs;
// FlakeInput is the 'Flake'-level parsed form of the "input" entries in /* FlakeInput is the 'Flake'-level parsed form of the "input" entries
// the flake file. * in the flake file.
// *
// A FlakeInput is normally constructed by the 'parseFlakeInput' * A FlakeInput is normally constructed by the 'parseFlakeInput'
// function which parses the input specification in the '.flake' file * function which parses the input specification in the '.flake' file
// to create a 'FlakeRef' (a fetcher, the fetcher-specific * to create a 'FlakeRef' (a fetcher, the fetcher-specific
// representation of the input specification, and possibly the fetched * representation of the input specification, and possibly the fetched
// local store path result) and then creating this FlakeInput to hold * local store path result) and then creating this FlakeInput to hold
// that FlakeRef, along with anything that might override that * that FlakeRef, along with anything that might override that
// FlakeRef (like command-line overrides or "follows" specifications). * FlakeRef (like command-line overrides or "follows" specifications).
// *
// A FlakeInput is also sometimes constructed directly from a FlakeRef * A FlakeInput is also sometimes constructed directly from a FlakeRef
// instead of starting at the flake-file input specification * instead of starting at the flake-file input specification
// (e.g. overrides, follows, and implicit inputs). * (e.g. overrides, follows, and implicit inputs).
// *
// A FlakeInput will usually have one of either "ref" or "follows" * A FlakeInput will usually have one of either "ref" or "follows"
// set. If not otherwise specified, a "ref" will be generated to a * set. If not otherwise specified, a "ref" will be generated to a
// 'type="indirect"' flake, which is treated as simply the name of a * 'type="indirect"' flake, which is treated as simply the name of a
// flake to be resolved in the registry. * flake to be resolved in the registry.
*/
struct FlakeInput struct FlakeInput
{ {

View file

@ -12,32 +12,33 @@ class Store;
typedef std::string FlakeId; typedef std::string FlakeId;
// A flake reference specifies how to fetch a flake or raw source /* A flake reference specifies how to fetch a flake or raw source
// (e.g. from a Git repository). It is created from a URL-like syntax * (e.g. from a Git repository). It is created from a URL-like syntax
// (e.g. 'github:NixOS/patchelf'), an attrset representation (e.g. '{ * (e.g. 'github:NixOS/patchelf'), an attrset representation (e.g. '{
// type="github"; owner = "NixOS"; repo = "patchelf"; }'), or a local * type="github"; owner = "NixOS"; repo = "patchelf"; }'), or a local
// path. * path.
// *
// Each flake will have a number of FlakeRef objects: one for each * Each flake will have a number of FlakeRef objects: one for each
// input to the flake. * input to the flake.
// *
// The normal method of constructing a FlakeRef is by starting with an * The normal method of constructing a FlakeRef is by starting with an
// input description (usually the attrs or a url from the flake file), * input description (usually the attrs or a url from the flake file),
// locating a fetcher for that input, and then capturing the Input * locating a fetcher for that input, and then capturing the Input
// object that fetcher generates (usually via * object that fetcher generates (usually via
// FlakeRef::fromAttrs(attrs) or parseFlakeRef(url) calls). * FlakeRef::fromAttrs(attrs) or parseFlakeRef(url) calls).
// *
// The actual fetch not have been performed yet (i.e. a FlakeRef may * The actual fetch not have been performed yet (i.e. a FlakeRef may
// be lazy), but the fetcher can be invoked at any time via the * be lazy), but the fetcher can be invoked at any time via the
// FlakeRef to ensure the store is populated with this input. * FlakeRef to ensure the store is populated with this input.
*/
struct FlakeRef struct FlakeRef
{ {
// fetcher-specific representation of the input, sufficient to /* fetcher-specific representation of the input, sufficient to
// perform the fetch operation. perform the fetch operation. */
fetchers::Input input; fetchers::Input input;
// sub-path within the fetched input that represents this input /* sub-path within the fetched input that represents this input */
Path subdir; Path subdir;
bool operator==(const FlakeRef & other) const; bool operator==(const FlakeRef & other) const;

View file

@ -21,12 +21,13 @@ struct Tree
struct InputScheme; struct InputScheme;
// The Input object is generated by a specific fetcher, based on the /* The Input object is generated by a specific fetcher, based on the
// user-supplied input attribute in the flake.nix file, and contains * user-supplied input attribute in the flake.nix file, and contains
// the information that the specific fetcher needs to perform the * the information that the specific fetcher needs to perform the
// actual fetch. The Input object is most commonly created via the * actual fetch. The Input object is most commonly created via the
// "fromURL()" or "fromAttrs()" static functions which are provided the * "fromURL()" or "fromAttrs()" static functions which are provided
// url or attrset specified in the flake file. * the url or attrset specified in the flake file.
*/
struct Input struct Input
{ {
@ -90,13 +91,14 @@ public:
}; };
// The InputScheme represents a type of fetcher. Each fetcher /* The InputScheme represents a type of fetcher. Each fetcher
// registers with nix at startup time. When processing an input for a * registers with nix at startup time. When processing an input for a
// flake, each scheme is given an opportunity to "recognize" that * flake, each scheme is given an opportunity to "recognize" that
// input from the url or attributes in the flake file's specification * input from the url or attributes in the flake file's specification
// and return an Input object to represent the input if it is * and return an Input object to represent the input if it is
// recognized. The Input object contains the information the fetcher * recognized. The Input object contains the information the fetcher
// needs to actually perform the "fetch()" when called. * needs to actually perform the "fetch()" when called.
*/
struct InputScheme struct InputScheme
{ {