summaryrefslogtreecommitdiff
path: root/bin
AgeCommit message (Collapse)Author
2025-06-18Add auto-formatting of json fileKlaus Aehlig
Given the just added json-file formatter, we can generate a diff formatting properly all json files, i.e., all target, rules, and expression files, by applying that formatter to every target file and combining the patches. A target description doing precisely this can easily be obtained as computed root. In this way, we also make good use of caching. To avoid doing recomputing the target description unnecessarily, we factor through the tree structure of the repository tree; the latter, we obtain from the to-git view of the top-level directory, whereas for computing the diff we use the actual (not necessarily committed) files.
2025-06-18Add json formater for target filesKlaus Aehlig
... that is aware of the order-independent fields in our C++ rules. Co-authored-by: Maksim Denisov <denisov.maksim@huawei.com> Co-authored-by: Oliver Reiche <oliver.reiche@huawei.com> Co-authored-by: Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> Co-authored-by: Alberto Sartori <alberto.sartori@huawei.com>
2025-06-18Add script applying the clang-format diffKlaus Aehlig
Our lint target already provides a target for the diff obtained from clang format. Add a convenience script computing and applying that patch.
2025-06-13bootstrap: use etc/repos.in.jsonKlaus Aehlig
... as repository configuration. We know that everything imported is not needed for the bootstrap process. Hence, by taking the description before import, we can avoid fetching unnecessary archives.
2025-04-07bootstrap.py: ignore tree operationsKlaus Aehlig
2025-03-03just-lock: follow indirection when checking for computed rootsPaul Cristian Sarbu
When deciding if a repository is a computed root (i.e., of type "computed" or "tree structure"), first follow indirections. Otherwise we would try to read of the "type" entry of a string which, of course, crashes. Based on the similar fix for just-import-git.
2025-03-03just-import-git: follow indirection when checking for computed rootsKlaus T. Aehlig
When deciding if a repository is a computed root (i.e., of type "computed" or "tree structure"), first follow indirections. Otherwise we would try to read of the "type" entry of a string which, of course, crashes.
2025-02-28just-lock: Parallelize cloning, subject to GILPaul Cristian Sarbu
Python's Global Interpreter Lock (GIL) hugely reduces the amount of parallelism one can achieve. However, as cloning repositories is I/O bound, the total runtime is improved by running it in parallel.
2025-02-28just-lock imports: Parallelize checkouts, subject to GILPaul Cristian Sarbu
Python's Global Interpreter Lock (GIL) hugely reduces the amount of parallelism one can achieve. However, as the checkout methods are I/O bound, the total runtime is improved by running them in parallel.
2025-02-28just-lock git-tree imports: Separate checkout logic into own methodPaul Cristian Sarbu
This will allow it to be run mostly asynchronously with other checkouts in the future.
2025-02-28just-lock archive imports: Separate checkout logic into own methodPaul Cristian Sarbu
This will allow it to be run mostly asynchronously with other checkouts in the future.
2025-02-28just-lock git imports: Separate checkout logic into own methodPaul Cristian Sarbu
This will allow it to be run mostly asynchronously with other checkouts in the future.
2025-02-28just-lock: Improve thread safety in Git operationsPaul Cristian Sarbu
Similarly to how it is done in just-mr: - lock against concurrent git-tag calls; - extend git-fetch call with arguments that ensure thread-safe operation.
2025-02-28just-lock: Always use os.environ.copy()Paul Cristian Sarbu
2025-02-28just-lock git imports: Improve cache hit ratePaul Cristian Sarbu
...by first retrieving only the desired commit id from the definitive remote in order to allow it to be checked against the local Git cache. This massively reduces the average network traffic from regenerating the just-mr configuration in justbuild projects that always require the latest version of their dependencies.
2025-02-28just-lock: Allow stderr capture and reporting when running commandsPaul Cristian Sarbu
2025-02-28just-lock: Properly format multi-line logsPaul Cristian Sarbu
2025-02-28just-lock: Fix missing fail conditionPaul Cristian Sarbu
2025-02-28just-lock clone: Fix wrong order in resolving treesPaul Cristian Sarbu
Match correctly the behavior of just-mr, i.e., resolve the special entries of the relevant subtree of the original tree instead of taking the subtree of the resolved original tree. This also means that the clones of archives can directly stage the relevant subdir of the unpacked content and forward any 'special' pragma (same as for other cloned repository types).
2025-02-24just-lock: Implement 'generic' source typePaul Cristian Sarbu
2025-02-24just-lock: Allow input argument for method running commandsPaul Cristian Sarbu
2025-02-24just-lock: Avoid unnecessary chances for unwanted side-effectsPaul Cristian Sarbu
...in handling mutable objects. In particular, treat mutable function variables, as well as any references they might contain, as constant.
2025-02-24just-lock: Fix parsing of optional container fieldsPaul Cristian Sarbu
...with not-None defaults. While there, fix wrong command environment set in 'git tree' imports.
2025-02-20just-lock: Add support for cloning 'git tree' repositoriesPaul Cristian Sarbu
2025-02-20just-lock: Add test for cloning archive-related repositoriesPaul Cristian Sarbu
...such as 'archive', 'zip', 'foreign file', and 'distdir'.
2025-02-20just-lock: Add support for cloning 'distdir' repositoriesPaul Cristian Sarbu
2025-02-20just-lock: Add support for cloning 'foreign file' repositoriesPaul Cristian Sarbu
2025-02-20just-lock: Add support for cloning 'archive' and 'zip' repositoriesPaul Cristian Sarbu
For these repositories the clone will contain only the subdir of the resolved unpacked archive.
2025-02-20just-lock: Add support for cloning 'git' repositoriesPaul Cristian Sarbu
2025-02-20just-lock: Initial implementation of --clone optionPaul Cristian Sarbu
This option stages locally the sources (i.e., workspace root) of a target repository found by following a list of bindings from a known starting repository. The final configuration will keep during deduplication the names of each starting repository and each target repository, with the output configuration updated to point to these local clones. Precomputed repositories cannot be cloned. Implementation is split in multiple commits. This commit contains the main logic for handling cloning. Currently only support for 'file' repositories is implemented. The code structure allows it to be subsequently extended to all other repository types.
2025-02-20just-lock: Add utility doing own parsing before fetching archivePaul Cristian Sarbu
Preparatory commit for implementation of '--clone' option.
2025-02-20just-lock: Add option to set a just binary to usePaul Cristian Sarbu
2025-02-20just-lock: Support special pragma for plain importsPaul Cristian Sarbu
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.
2025-02-20just-lock: Improve handling of pragmas in 'repos' import descriptionPaul Cristian Sarbu
In particular, any transitive 'file'-type repository will inherit any given '{to_git: true}' pragma in the import description objects. Note that this technically can only happen for transitive 'file' repositories imported from a 'file' source, so in all other cases such a pragma would not have any effect. Document change and extend the import from 'file' source test to check this feature.
2025-02-20just-import-git: Fix missing inherited pragmasPaul Cristian Sarbu
Update CHANGELOG accordingly.
2025-02-20just-lock: Fix missing inherited pragmasPaul Cristian Sarbu
Transitive 'file'-type repositories should inherit any pragmas suported by the new repository type they are rewritten as. Extend import tests to avoid regressing on this issue in the future.
2025-01-29just-lock: Search for archives to fetch also in Git cachePaul Cristian Sarbu
...before trying remotes.
2025-01-29just-lock: Run commit check command only on existing repositoriesPaul Cristian Sarbu
While there, improve docstrings of methods operating on Git repositories to specify when the underlying Git repositories are expected to be present.
2025-01-29just-lock: Add support for 'tree structure' rootsPaul Cristian Sarbu
Based on f0473730 and 22ef0a16
2025-01-29just-lock: Fix deduplication of 'computed' rootsPaul Cristian Sarbu
Based on 76ce2123
2025-01-29just-lock: Normalize subdir before checking if non-upwardPaul Cristian Sarbu
2025-01-29just-lock: Improve error handling for importing to GitPaul Cristian Sarbu
2025-01-29just-lock: Ensure all commands use the run_cmd methodPaul Cristian Sarbu
2025-01-29just-deduplicate-repos: Fix formattingPaul Cristian Sarbu
2025-01-29just-lock config: Make field names consistent with just-mrPaul Cristian Sarbu
2025-01-21Exclude 'tree_structure' directory from bootstrappingMaksim Denisov
2025-01-20just-lock: Implement import source 'git-tree'Paul Cristian Sarbu
2025-01-17just-lock: Move import utilities code sectionPaul Cristian Sarbu
...below the GitCAS and CAS utilities, in order for those to be available for use when implementing the other import source types.
2025-01-17just-lock: Improve handling of 'subdir' pathsPaul Cristian Sarbu
Enforce 'subdir' field of 'archive' import source to also be non-upward. Normalize subdirs during rewrite of dependent 'file'-type repositories.
2025-01-17just-import-git: Normalize 'subdir' path during repository rewritePaul Cristian Sarbu