summaryrefslogtreecommitdiff
path: root/src/other_tools/root_maps/fpath_git_map.cpp
AgeCommit message (Collapse)Author
2025-04-22FileSystemManager: Always copy directories recursivelyMaksim Denisov
2025-01-23JustMr: Replace calls to CheckServeHasAbsentRoot with direct calls to serveMaksim Denisov
2025-01-23JustMr: FilePathGitMap: Remove unused arguments.Maksim Denisov
2025-01-23JustMr: FilePathGitMap: Use serve callsMaksim Denisov
...instead of EnsureAbsentRootOnServe
2024-12-19Remove unneeded compat_storageOliver Reiche
2024-11-14other_tools/repo_map,root_maps: Implement IWYU suggestionsPaul Cristian Sarbu
2024-10-25just-mr and SourceTree: Use new Git execution api instancePaul Cristian Sarbu
In just-mr: to instantiate the new Git api instance, both storage configs, as well as the compatible storage, need to be passed to the maps. While there, use more explicit naming schemes for the storage and CAS instances used. In serve: also acquire gc locks for the local storages when needed to instantiate the new Git api, which now has access to the CAS. In all these instances we also pass, as needed, the local api, which currently still operates only in native mode. This makes no difference currently, but will ensure less changes needed when the future compatible-aware local api will be used instead.
2024-10-25just-mr: Small fixesPaul Cristian Sarbu
2024-08-29just-mr maps: Properly check for missing values in map chainPaul Cristian Sarbu
The root async map in a chain of calls should always be checked for missing value, which can happen if, e.g., a cycle happens or a thread gets killed by the system. Properly handle this by checking explicitly if a value has been posted. If not, check for cycles where it makes sense (for example, in the resolving of symlinks), otherwise report any pending map keys not yet processed. This is done for all just-mr commands working with async maps.
2024-08-26GitOps: Pass source directory to GitInitialCommit operationPaul Cristian Sarbu
While there, ensure optional Git operation parameters are checked before use for the operations that require them.
2024-08-26GitOpParams: Remove unneeded branch fieldPaul Cristian Sarbu
The 'branch' field is deprecated, not being used by any of the critical Git operations, thus it can be removed.
2024-07-05Pass StorageConfig and Storage to just-mr mapsMaksim Denisov
2024-07-05Pass Storage and StorageConfig to StorageUtils by referenceMaksim Denisov
2024-07-05Use StorageConfig functionality via Instance()Maksim Denisov
...to track changes during refactoring easier.
2024-06-27Pass ServeApi to just-mr maps by raw pointerMaksim Denisov
...since it is used for capturing in lambdas for AsyncMaps and mustn't be temporary.
2024-06-27Use a raw pointer for passing optional IExecutionApiMaksim Denisov
...instead of std::optional<gsl::not_null<IExecutionApi const*>>
2024-06-25Introduce a type allias for an optional ptr to IExecutionApiMaksim Denisov
...and replace verbose constructions.
2024-06-25Use constant IExecutionApi in just-mr mapsMaksim Denisov
2024-06-18Make ServeApi a general class, not a singletonMaksim Denisov
...and adjust interfaces.
2024-06-18Pass ServeApi to just-mr maps by referenceMaksim Denisov
...instead of using singleton calls.
2024-05-02Small changes to allow gsl-lite supportPaul Cristian Sarbu
The gsl-lite implementation is slightly more picky in terms of type conversions and constness resolution in initializers, therefore small changes were needed.
2024-04-10just-mr: Ensure resolved trees are kept alive in Git cachePaul Cristian Sarbu
The association map file for a resolved tree was supposed to guarantee that the respective tree is kept alive in a Git repository as part of a tagged commit. This commit fixes this issue by tagging the tree (found in the Git cache after resolution) before writing its association file.
2024-04-10resolve_symlinks_map: Allow separate source and target repositoriesPaul Cristian Sarbu
In certain cases, e.g., on the serve endpoint, an unresolved tree might lie in a repository other than the Git cache, therefore we cannot create any new entries there, as it would violate our guarantee that we only write under our local build root. Therefore, the resolve_symlinks_map now receives pointers to both the source and target Git databases and ensures that: 1. any tree created on-the-fly is stored exclusively in the target repository, and 2. any other entry required for those trees is made available in the target repository by copying it from the source repository. Note that in our use case the target repository is always our Git cache and passing a pointer to that object database is done to avoid the overhead of otherwise opening the database very often.
2024-03-26Add missing system includesPaul Cristian Sarbu
Main culprits: - std::size_t, std::nullptr_t, and NULL require <cstddef> - std::move and std::forward require <utility> - unordered maps and sets require respective includes - std::for_each and std::all_of require <algorithm>
2024-03-13Move storage-aware tmpdir creation to configKlaus Aehlig
... as the fs_utils have a lot more dependencies making them usable in less places. Moreover, this function also serves to shape the layout of the local build root and hence is more appropriately placed in the config anyway.
2024-02-27just-mr: Correct handling of remotes with respect to compatibility modePaul Cristian Sarbu
In order to set up roots, just-mr is able to interrogate, if given, serve and/or remote-execution endpoints. However, just-mr operates only with Git hashes, i.e., with a native mode CAS. This commit ensures the correct interactions occur between just-mr and the provided endpoints not only in native mode, but also in comaptible mode, where a serve endpoint might be present even if one cannot make use of its associated remote-exection endpoint. The user always gets informed if any incompatibilities are detected.
2024-02-16async maps: Create utility library to handle cycle detectionPaul Cristian Sarbu
2024-01-31just-mr: Serve endpoint always implies a remote-execution endpointPaul Cristian Sarbu
As the serve service always has an associated remote-execution endpoint, when just-mr gets passed only a serve endpoint address it will now default to implying a remote-execution endpoint exists too at that address. Additionally, now the implementation of the --backup-to-remote option more clearly shows that it can only be done in native mode.
2024-01-26fpath_git_map: Sync pragma 'to_git' root trees with serve endpointPaul Cristian Sarbu
Marking a file-type repository as 'to_git' results in a Git-tree type root, which are of course content fixed and can be (and usually are) used by export targets. Therefore, it is beneficial for a serve endpoint, if one is provided, to be aware of such a root and be able to build against it if needed. If the root is marked as absent, this condition becomes mandatory. Generating an absent Git-tree root without being provided a serve endpoint is still allowed, but results in a warning.
2024-01-24just-mr: in to_git warning, report actual tool namesKlaus Aehlig
... instead of some hard-coded strings, as that can be confusing when the tool is packaged under a different name.
2023-12-19other_tools: Fix missing includes of direct dependenciesPaul Cristian Sarbu
This fixes the multiple instances of (mainly) missing or wrong includes of standard, third-party, and own headers in the other_tools source folder.
2023-11-02Decoupling symlinks map and CAS utilities from just-mrPaul Cristian Sarbu
This is required in order to make them available to 'just serve' in a minimal just installation.
2023-09-22fpath git map: Remove redundancy in warning messagePaul Cristian Sarbu
2023-09-13just-mr: Implement 'absent' rootsPaul Cristian Sarbu
...via an 'absent' pragma in repository descriptions. For 'git'-type repositories, first interrogates a 'just serve' remote, if given, before reverting to fetching from the network.
2023-08-07just-mr maps: Add logic for resolving symlinks in file repositoriesPaul Cristian Sarbu
2023-08-07just-mr: Update async map keys with the 'special' pragma valuePaul Cristian Sarbu
For 'file' and 'archive' checkouts we will handle more than just the 'ignore' value.
2023-06-06style: Use designated initializersPaul Cristian Sarbu
This feature has been introduced with C++20.
2023-05-31file repos: Add option for ignore-special rootPaul Cristian Sarbu
2023-04-04Make git root part of the storage configKlaus Aehlig
In this way, we have the whole layout of the local build root consolidated in one place. Moreover, in this way, the location of the git root is also available to the build tool itself and can, e.g., be used as fallback CAS.
2023-02-27Just-MR: Whitespace fixesSascha Roloff
2023-02-17structure cleanup: move remote operations of GitRepo to other_tools...Paul Cristian Sarbu
...in order to not include unwanted dependencies in just proper. The new class extends the GitRepo class used for just's Git tree operations and gets used in all of just-mr's async maps.
2023-01-16fpath_git_map: Fix wrong log messagePaul Cristian Sarbu
2022-12-23Just-MR: Remove wrong pass-by-reference when wrapping loggersPaul Cristian Sarbu
Passing the logger by reference would require the caller to be kept alive. Also, being a shared_ptr, the logger can be passed by value at almost no cost.
2022-12-21Just-MR: Add file path to WS root git mapPaul Cristian Sarbu