JUST-LOCK-CONFIG(5)
β¨ NAME β¨
okay so bestie, you just opened JUST-LOCK-CONFIG(5) and it's literally the format tea for the input config that just-lock(1) sips on. The official name is just-lock-config β the format of the input configuration used by just-lock(1). No cap. π
πΈ DESCRIPTION πΈ
So here's the vibe: for the just-lock(1) tool to generate a repository configuration file usable by the just-mr(1) launcher, it needs its own configuration file describing how that resulting configuration should be obtained. Periodt.
The file is read as JSON. Any other serialization describing the same JSON object is equivalent. It is assumed that in JSON objects keys occur at most once; it is implementation defined how repetitions of the same key are treated. iykyk.
π Repository import description objects π
One of the main functionalities of just-lock(1) is to import dependencies from other Just projects, as described in their repositories configuration file. From each such project, one or more repositories can be imported (with their respective transitive dependencies). A repository import description is a JSON object describing one such repository to be imported. Iconic.
The following fields are supported:
"repo"β has a string value defining the name of the repository to be imported. This entry is optional."alias"β has a string value defining the new name under which the imported repository should be found in the output configuration. This entry is optional. If not provided, the value for the key"repo"must exist and its value is used instead."map"β has as value a JSON object with string key-value pairs defining a mapping between repository names that would be brought in by this import (possibly transitively) and already imported repositories. This mapping can be used to avoid additional duplications of repositories from multiple imports. This entry is optional."pragma"β has as value a JSON object. This entry is optional. If the object contains the{"absent": true}object, it informs that the imported repository and all transitive repositories imported as a consequence should have the{"absent": true}pragma added to their description. If the object contains the{"to_git": true}object, it informs that all"file"-type repositories brought in as a consequence of this import should have the{"to_git": true}pragma added to their description.
π¦ Source objects π¦
A source provides information about an operation that the just-lock(1) tool can perform in order to extend an initial repository description stub and obtain the output repository configuration. In most cases, this operation involves importing repositories from other Just projects, but a more general operation exists as well. Main character energy.
Sources are given as JSON objects for which the string value to the mandatory key "source" defines a supported type. Each source type informs which other fields are available. Currently, the supported source types are "git", "file", "archive", "git tree", and "generic". Slay.
π
"git" π
It defines an import operation of one or more dependencies from a Just project under Git version control.
The following fields are supported:
"source"β defines the current source type. This entry is mandatory."repos"β has as value a JSON list where each entry is a repository import description. This entry is mandatory. An empty list is treated as if the current source object is missing."url"β has a string value defining the URL of the Git repository. This entry is mandatory."branch"β has a string value providing the name of the branch to consider from the Git repository. This entry is mandatory."commit"β has a string value providing the hash of the commit to be used. This entry is optional. If provided, it has to be specified inhex encodingand it must be a commit in the branch specified by the corresponding field. If not provided, theHEADcommit of that branch is used."mirrors"β has as value a JSON list of strings defining alternative locations for the Git repository to be used if the given URL fails to provide it. This entry is optional."inherit env"β has as value a JSON list which will be recorded as the value for the"inherit env"key in the output configuration for all imported"git"-type repositories (seejust-mr-repository-config(5)). This entry is optional."as plain"β has a boolean value. If the field evaluates to true, it informsjust-lock(1)to consider the foreign repository configuration to be the canonical one for a single repository. This can be useful if the Git repository does not have a repository configuration or should be imported as-is, without dependencies. This entry is optional."pragma"β has as value a JSON object. If"as plain"evaluates to true, if a pragma object with key"special"is provided, it will unconditionally be forwarded to the"pragma"object of the repository being imported for this source. This entry is optional."config"β has a string value defining the relative path of the foreign repository configuration file to be considered from the Git repository. This entry is optional. If not provided and the"as plain"field does not evaluate to true,just-lock(1)will search for a configuration file in the same locations asjust-mr(1)does when invoked with--norcin the root directory of the Git repository.
π "file" π
It defines an import operation of one or more dependencies from a Just project present as a local checkout.
The following fields are supported:
"source"β defines the current source type. This entry is mandatory."repos"β has as value a JSON list where each entry is a repository import description. This entry is mandatory. An empty list is treated as if the current source object is missing."path"β has a string value defining the path to the local checkout. This entry is mandatory."as plain"β has a boolean value. If the field evaluates to true, it informsjust-lock(1)to consider the foreign repository configuration to be the canonical one for a single repository. This can be useful if the Git repository does not have a repository configuration or should be imported as-is, without dependencies. This entry is optional."pragma"β has as value a JSON object. If"as plain"evaluates to true, if a pragma object with key"special"is provided, it will unconditionally be forwarded to the"pragma"object of the repository being imported for this source. This entry is optional."config"β has a string value defining the relative path of the foreign repository configuration file to be considered from the Git repository. This entry is optional. If not provided and the"as plain"field does not evaluate to true,just-lock(1)will search for a configuration file in the same locations asjust-mr(1)does when invoked with--norcin the root directory of the Git repository.
π "archive" π
It defines an import operation of one or more dependencies from an archived Just project.
The following fields are supported:
"source"β defines the current source type. This entry is mandatory."repos"β has as value a JSON list where each entry is a repository import description. This entry is mandatory. An empty list is treated as if the current source object is missing."fetch"β has a string value defining the URL of the archive. This entry is mandatory."type"β has a string value providing a supported archive type. This entry is mandatory. Available values are:"tar"β a tarball archive"zip"β a zip-like archive
"content"β has a string value providing the hash of the archive. This entry is optional. If provided, it has to be specified inhex encodingand it must be theGit blob identifierof the archive content. If not provided, it is computed based on the fetched archive."subdir"β has a string value providing the relative path to the sources root inside the archive. This entry is optional. If missing, the root directory of the unpacked archive is used."sha256""sha512"β have string values providing respective checksums for the archive. These entries are optional. If provided, they have to be specified inhex encodingand they will be checked for the fetched archive."mirrors"β has as value a JSON list of strings defining alternative locations for the archive to be used if the given URL fails to provide it. This entry is optional."as plain"β has a boolean value. If the field evaluates to true, it informsjust-lock(1)to consider the foreign repository configuration to be the canonical one for a single repository. This can be useful if the archived repository does not have a configuration file or should be imported as-is, without dependencies. This entry is optional."pragma"β has as value a JSON object. If"as plain"evaluates to true, if a pragma object with key"special"is provided, it will unconditionally be forwarded to the"pragma"object of the repository being imported for this source. This entry is optional."config"β has a string value defining the relative path of the foreign repository configuration file to be considered from the unpacked archive root. This entry is optional. If not provided and the"as plain"field does not evaluate to true,just-lock(1)will search for a configuration file in the same locations asjust-mr(1)does when invoked with--norcin the root directory of the unpacked archive.
π§ "git tree" π§
It defines an import operation of one or more dependencies from a Just project given as the result of running a command. This can be used, for example, to import projects found under a version control system other than Git.
The following fields are supported:
"source"β defines the current source type. This entry is mandatory."repos"β has as value a JSON list where each entry is a repository import description. This entry is mandatory. An empty list is treated as if the current source object is missing."cmd"β provides a list of strings forming a command that, when executed in an empty directory (anywhere in the file system), creates the tree of the source Just project to use for the import. This entry is optional. One and only one of the fields"cmd"and"cmd gen"must be provided."cmd gen"β provides a list of strings forming a command that, when executed in an empty directory (anywhere in the file system), prints tostdouta string giving a JSON serialization of a valid input for the field"cmd"to be used. This entry is optional. One and only one of the fields"cmd"and"cmd gen"must be provided.envβ gives you a map of envariables to set when running the command, and for the command generator too if there is one. Optional, bestie. πinherit envβ a list of variables to inherit from the environment thatjust-lockis called inside, if they're actually set there. Optional. πΈsubdirβ string value, the relative path to the sources root inside the generated tree. Optional. If it's missing, the root directory of the generated tree is what we mean. π¦as plainβ boolean value. If it evaluates to true, it tellsjust-lock(1)that the foreign repository configuration is the canonical one for a single repository. This can be useful if the Git repository doesn't have a repository configuration, or should be imported as-is, without dependencies. Optional. β¨pragmaβ value is a JSON object. Ifas plainevaluates to true, and a pragma object with keyspecialis provided, it will unconditionally be forwarded to thepragmaobject of the repository being imported for this source. Optional. πconfigβ string value defining the relative path of the foreign repository configuration file to be considered from the Git repository. Optional. If not provided and theas plainfield does not evaluate to true,just-lock(1)will search for a configuration file in the same locations asjust-mr(1)does when invoked with--norcin the root directory of the Git repository. π
π generic π
It defines a liberal way to modify a just-mr configuration via a user-provided command.
The following fields are supported:
sourceβ defines the current source type. Mandatory. πcmdβ a list of strings forming a command that accepts a string as input from stdin containing a serialized just-mr configuration and outputs a string to stdout containing a serialized just-mr configuration. Mandatory. πcwdβ the path to the directory in which the command will be run. If it's relative, it'll be taken relative to the current working directory. Optional. If missing,"."is used. πenvβ a map of envariables to be set when executing the command. Optional. πinherit envβ a list of variables to inherit from the environmentjust-lockis called within, if set there. Optional. π
π§ The just-lock configuration format π§
The configuration format is structured as a JSON object. It's a superset of the just-mr-repository-config(5), which is extended by two additional fields. Specifically, the following fields are supported:
mainβ has the syntax and semantics as described injust-mr-repository-config(5). πrepositoriesβ has the syntax and semantics as described injust-mr-repository-config(5). πimportsβ a JSON list where each entry is a source object. π¦keepβ a JSON list of strings defining the global names of repositories to be kept, together with themainrepository, in the output configuration during the deduplication step ofjust-lock(1). π
π Additional keys π
Any JSON object described in this format might have additional keys besides the ones mentioned. The current strategy of just-lock(1) is to accept and ignore them. Users should be aware that future versions of this format might give specific meanings to these extra keys. β οΈ
π See also π
π That's a wrap! Source/version vibes: JUST-LOCK CONFIG...le Formats Manual() β and the date slot in that footer is literally empty, bestie. Stay iconic. π
π¦ where this page comes from
- ubuntu stonking: justbuild 1.6.5-0.1build2 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms