diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2025-02-18 17:33:15 +0100 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2025-02-20 15:33:53 +0100 |
commit | 2adc4915d42547fd71e4d8983dc50e33df251b53 (patch) | |
tree | 47a5f415fd19a9236f684269a0d751d3648587f8 /doc | |
parent | e749a97621d445de5e0dec89ab840dd61839d872 (diff) | |
download | justbuild-2adc4915d42547fd71e4d8983dc50e33df251b53.tar.gz |
just-lock: Support special pragma for plain imports
Marking a source repository 'as plain' means that the whole source
repository tree will get imported as a repository type
corresponding to the source type. In this case, additional pragmas
than those supported by the inndividual imports might need to be
set.
Solve this by supporting the just-mr-style 'pragma' field also in
the source description, for all sources also accepting the
'as plain' field. Currently support only the 'special' pragma.
Document change and add test for plain imports that checks this
feature.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/future-designs/just-lock.md | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/doc/future-designs/just-lock.md b/doc/future-designs/just-lock.md index 151625c1..61e3c900 100644 --- a/doc/future-designs/just-lock.md +++ b/doc/future-designs/just-lock.md @@ -230,6 +230,12 @@ The type of a _source_ is defined by the string value of the mandatory subfield that will be used in the resulting repository description corresponding to any imported `"file"`-type repositories (see `just-import-git`). + If `"as plain": true`, any provided `"special"` key for the `"pragma"` field + in the source description is unconditionally set in the imported repositories, + superseding any other config- or import-level treatment of pragmas during the + import. Note that `"as plain": true` results in only one repository + (containing the whole source repository tree) being imported. + Proposed format: ``` jsonc { "source": "git" @@ -254,6 +260,7 @@ The type of a _source_ is defined by the string value of the mandatory subfield , "inherit env": [...] // optional; corresponds to `inherit_env` var (option --inherit-env) , "config": "<foreign_repos.json>" // optional; corresponds to `foreign_repository_config` var (option -R) , "as plain": false // optional; corresponds to `plain` var (option --plain) + , "pragma": {"special": "<value>"} // optional; only considered if `"as plain": true` } ``` @@ -268,6 +275,12 @@ The type of a _source_ is defined by the string value of the mandatory subfield one can also set the `"to_git": true` pragma with a corresponding entry in the usual `"pragma"` field. + If `"as plain": true`, any provided `"special"` key for the `"pragma"` field + in the source description is unconditionally set in the imported repositories, + superseding any other config- or import-level treatment of pragmas during the + import. Note that `"as plain": true` results in only one repository + (containing the whole source repository tree) being imported. + Proposed format: ``` jsonc { "source": "file" @@ -289,6 +302,7 @@ The type of a _source_ is defined by the string value of the mandatory subfield , "path": "<source/repo/path>" // mandatory , "config": "<foreign_repos.json>" // optional; corresponds to `foreign_repository_config` var (option -R) , "as plain": false // optional; corresponds to `plain` var (option --plain) + , "pragma": {"special": "<value>"} // optional; only considered if `"as plain": true` } ``` @@ -301,6 +315,12 @@ The type of a _source_ is defined by the string value of the mandatory subfield A field `"subdir"` is provided to account for the fact that source repository root often is not the root directory of the unpacked archive. + If `"as plain": true`, any provided `"special"` key for the `"pragma"` field + in the source description is unconditionally set in the imported repositories, + superseding any other config- or import-level treatment of pragmas during the + import. Note that `"as plain": true` results in only one repository + (containing the whole source repository tree) being imported. + Proposed format: ``` jsonc { "source": "archive" @@ -327,6 +347,7 @@ The type of a _source_ is defined by the string value of the mandatory subfield , "sha512": "<HASH>" // optional checksum; if given, will be checked , "config": "<foreign_repos.json>" // optional; corresponds to `foreign_repository_config` var (option -R) , "as plain": false // optional; corresponds to `plain` var (option --plain) + , "pragma": {"special": "<value>"} // optional; only considered if `"as plain": true` } ``` @@ -358,6 +379,12 @@ The type of a _source_ is defined by the string value of the mandatory subfield such repositories will be translated to appropriate `"git tree"`-type repositories in the output configuration. + If `"as plain": true`, any provided `"special"` key for the `"pragma"` field + in the source description is unconditionally set in the imported repositories, + superseding any other config- or import-level treatment of pragmas during the + import. Note that `"as plain": true` results in only one repository + (containing the whole source repository tree) being imported. + Proposed format: ``` jsonc { "source": "git tree" @@ -381,6 +408,7 @@ The type of a _source_ is defined by the string value of the mandatory subfield , "config": "<foreign_repos.json>" // optional; corresponds to `foreign_repository_config` var (option -R) // searched for in the "subdir" tree , "as plain": false // optional; corresponds to `plain` var (option --plain) + , "pragma": {"special": "<value>"} // optional; only considered if `"as plain": true` } ``` |