summaryrefslogtreecommitdiff
path: root/bin
AgeCommit message (Collapse)Author
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
2025-01-16just-lock: Do not use temp dirs outside local build rootPaul Cristian Sarbu
2025-01-13import tools: Fix rewrite of unneeded fieldsPaul Cristian Sarbu
The rewrite logic assumes that for repositories taken as layers we will not have certain fields and so they are unconditionally reassigned. Fix this by extending the existing check for bindings to include also alternative roots and root files.
2025-01-10just-lock: Implement 'archive' import sourcePaul Cristian Sarbu
Use local CAS to cache fetched archives. Take the storage garbage collector shared lock to guard against unwanted generation rotations.
2025-01-10just-lock: Use the GitCAS during 'git' source importsPaul Cristian Sarbu
Add file locking logic; guard critical Git operations with the same approach as in Just and also take the repositories garbage collector shared lock to guard against unwanted generation rotations.
2025-01-10just-lock: Try also mirrors when importing known commit from Git reposPaul Cristian Sarbu
When commit to fetch is known, check mirrors before going to the main URL. While there, ensure the context for logging in the checkout method is not replaced, but appended to.
2025-01-10just-lock: Add attempts argument to method running commandsPaul Cristian Sarbu
2025-01-10just-lock: Improve docstrings and method signaturesPaul Cristian Sarbu
...to better reflect intent. In particular, improve the name of the variable storing the partial description to be used during rewrite of dependent 'file'-type repositories brought in by an import.
2025-01-10just-lock: Improve directory tree removalPaul Cristian Sarbu
2025-01-10just-lock: Fix 'repositories' field not updated in import loopPaul Cristian Sarbu
2025-01-09Support deduplication of "tree structure" rootsMaksim Denisov
2025-01-09Support import of "tree structure" rootsMaksim Denisov
2025-01-08Fix deduplication of target repos in precomputed rootsMaksim Denisov
2024-12-17just-lock: Implement import source type 'file'Paul Cristian Sarbu
2024-12-17just-lock: Improve error handling of command line parsingPaul Cristian Sarbu
2024-12-17just-lock: Match logging style of just-mr, including colorsPaul Cristian Sarbu
Use the RGB values of the predefined fmt library colors that both just and just-mr use.
2024-12-17just-lock: Fix plain configuration map for 'git' importsPaul Cristian Sarbu
While there, also improve check for early return from import method.
2024-12-11Initial implementation of just-lockPaul Cristian Sarbu
Able to handle imports from Git repositories and deduplicate the resulting configuration.
2024-12-10just-deduplicate-repos: Add support for computed repositoriesPaul Cristian Sarbu
2024-12-10just-import-git: Add support for computed repositoriesPaul Cristian Sarbu
2024-11-29just-import-git: Fix foreign config locationPaul Cristian Sarbu
As per documentation, if a location is given for the configuration file in the foreign repository then it must be taken relative to its root. However, in our implementation this location is taken relative to the current directory. Fix this.
2024-11-28bin scripts: Use the NoReturn type hintPaul Cristian Sarbu
The NoReturn type hint should be used to ensure the return type of methods calling no-return methods are not falsely enforced to an Optional return type. Add the NoReturn type hint as needed and clear up existing Optional returns together with any corresponding casts affected by the above. While there, also fix formatting.
2024-11-21Materialize computed roots before top-level analysisKlaus Aehlig
Add a basic implementation of computed roots. So far we neither enforce nor make good use of the fact that the underlying target of a computed root has to be an export target of a content-fixed repository; instead, we always install the root to a temporary directory and pick it up from there. Still, the basic functionality is there, and it is minimally useful.
2024-11-06Make bootstrap-traverser aware of the "cwd" property of actionsKlaus Aehlig
2024-10-10bootstrap traversing: for explicit trees, create closed directoriesKlaus Aehlig
... by recursively copying and resolving sybolic links. In this way, references within a tree (e.g., #include "../Something.hpp") do not confuse the compiler, as opposed to directory symlinks. Neverthess, by doing this copying only for tree constructors, we still keep the overhead acceptable.
2024-08-26just-mr.py: Accept all tree entries for bootstrapped justPaul Cristian Sarbu
The Python script used for the first stage of bootstrapping just uses the Git index to create trees from directories (be it file repositories, unpacked archives, or distfiles), therefore it has the limitations of Git itself in committing trees that contain entries ignored by Git, such as empty directories, the .git folder, .gitignore files and files referenced there, or other entries with Git-specific magic names. This commit updates the Python script to replace the use of the Git index for importing directories to directly writing the needed blobs and trees to the object database, then commit the resulting top tree explicitly. While there, fix a typing issue from our relaxed approach in using os.environ to set the subprocess env when running commands. As on POSIX the type is _Environ, not simple Dict[str, str], use implicit dictionary merging (Python v3.5+) to set the Git envars. The issue was initially flagged by pyright.
2024-07-19Storage config: change layout to support several storage generationsKlaus Aehlig
2024-06-18Use ServeApi during bootstrapMaksim Denisov
...with a default implementation. Although it is not used directly, it will be needed for instantiation of std::optional.
2024-04-25just-deduplicate-repos: merge pragma of identified repositoriesKlaus Aehlig
While just-deduplcate-repos only identifies repositories that are semantically indistinguishable, there still is the pragma to consider. - If the repository in one use requires to be present, we have to fetch it, hence cannot treat it as absent. - If a repository in one place has to be transformed to a git root, this also has to happen for the copy we keep.
2024-04-25just-import-git: support importing repositories as absentKlaus Aehlig
This allows to simply specify the direct dependencies desired to be absent at import where the dependency structure is handled anyway, rather than afterwards reconstructing which repositories should be absent.
2024-02-21just-import-git: support setting "inherit env"Klaus Aehlig
When importing a repository via just-import-git, allow to specify the value for the "inherit env" property for the repository just being imported.
2024-01-08bootstrap: accept a build dir inside the source treeKlaus Aehlig
While it is best practise to build outside the source tree, some package formats require that a build be carried out inside the source tree. As there are no principle obstacles, as long as a non-existing directory is requested as build dir, support it by ignoring the destination in the recursive copy.
2023-11-14just-import-git: Add --mirror optionPaul Cristian Sarbu
This allows to specify upfront alternative locations from where the imported repository may be fetched. No action is taken in the import, instead the argument gets passed intot he resulting just-mr configuration.
2023-11-14test: Add check for 'mirrors' field in just-mr repositoriesPaul Cristian Sarbu
2023-11-02bootstrap: Add libarchive dependencyPaul Cristian Sarbu
This is brought in by the tree-of-archive rpc of just serve. Also adds lzma and bzip2 as transitive dependencies.
2023-09-19bootstrap: for package builds use -Wno-pedanticKlaus Aehlig
... as well as the already present -Wno-error. In this way, packagebuilding should work out of the box on more systems.
2023-09-13just serve: Basic service implementation with commit-of-tree RPCPaul Cristian Sarbu
Initial version, to be extended later with other RPCs.
2023-09-01Add a utility tool to deduplicate internal repositoriesKlaus Aehlig
Together with just-import-git that allows a work flow of easily importing dependencies without exponential blow up of the resulting repos.json files.
2023-08-31just-mr.py: Fix None checksPaul Cristian Sarbu
2023-08-31just-mr.py: Fix wrong check added by type annotation changesPaul Cristian Sarbu
The checkout locations keys can, of course, include the empty string, so key check should be explicitly typed.
2023-08-31just-import-git: fix fallout of type annotationsKlaus Aehlig
In order to get the type checker happy, some wrong type annotations were added and, as a consequence, an unwarrented conditional as well. To make things worse, this as checking for the non-None-ness of a value by inspecting the truth value, ignoring that the non-None value "" also has truth value False. Remove this conditional alltogether and fix the type annotations.
2023-08-29just-import-git.py: Add type hints and fix stylePaul Cristian Sarbu
For maximum compatibility, we use the uppercase types from the typing package instead of the built-in types, therefore compliant with PEP 484 and PEP 526. As unfortunately there is no proper JSON typing option that requires many casts, we use a more lax typing for JSON inputs, but enforce return types in order to implicitly infer the actual format of an input JSON variable (dict, list, string etc.).
2023-08-29bootstrap.py: Add type hints and fix stylePaul Cristian Sarbu
For maximum compatibility, we use the uppercase types from the typing package instead of the built-in types, therefore compliant with PEP 484 and PEP 526.
2023-08-29parallel-bootstrap-traverser.py: Add type hints and fix stylePaul Cristian Sarbu
For maximum compatibility, we use the uppercase types from the typing package instead of the built-in types, therefore compliant with PEP 484 and PEP 526. As unfortunately there is no proper JSON typing option that requires many casts, we use a more lax typing for JSON inputs, but enforce return types in order to implicitly infer the actual format of an input JSON variable (dict, list, string etc.).
2023-08-29bootstrap-traverser.py: Add type hints and fix stylePaul Cristian Sarbu
For maximum compatibility, we use the uppercase types from the typing package instead of the built-in types, therefore compliant with PEP 484 and PEP 526.
2023-08-29just-mr.py: Add type hints, fix style, and improve readabilityPaul Cristian Sarbu
For maximum compatibility, we use the uppercase types from the typing package instead of the built-in types, therefore compliant with PEP 484 and PEP 526. As unfortunately there is no proper JSON typing option that requires many casts, we use a more lax typing for JSON inputs, but enforce return types in order to implicitly infer the actual format of an input JSON variable (dict, list, string etc.).