summaryrefslogtreecommitdiff
path: root/src/buildtool/common
AgeCommit message (Collapse)Author
2025-06-16Avoid unnecessary work in accessing container entriesPaul Cristian Sarbu
- in sequence containers, use operator[] instead of .at() when accessing indices guaranteed to be in bound; - in associative containers, prefer .find() and reusing the returned const iterator to using .contains() and .at(); while there, make any so obtained iterators const if they are read-only.
2025-06-16Ensure equality operators are really noexcept.Klaus T. Aehlig
... by explicitly catching any possible exception. Mainly to make clang-tidy happy. ...
2025-06-12Add a flag to `gc` command: `--all`Maksim Denisov
2025-06-04RepositoryConfig: Ensure consistency in reading blobs and treesPaul Cristian Sarbu
...with respect to rejecting invalid entries such as upwards symlinks. Also ensure that valid trees are only checked once by remebering known valid tress though marker files in local storage.
2025-06-04RepositoryConfig: Give access to a persistent storage config...Paul Cristian Sarbu
...whenever it is given access to a Git repository. The referenced storage config needs to outlive the repository config instance.
2025-06-04git_cas read object: allow validation of individual blobsPaul Cristian Sarbu
This allows individual blobs read to be checked, e.g., for upwards symlinks, also when not part of a tree, which performs such a validation for its entries during its parsing into a GitTree.
2025-05-22just-mr: Fix wrong setup root being picked upPaul Cristian Sarbu
This fixes a bug in which the setup root was falsely being changed by unconditionally searching early for a default configuration files, despite one being explicitly provided at the command line.
2025-05-15Make --dump-artifacts-to-build act cummulativelyKlaus Aehlig
2025-04-25just: make --dump-artifacts act cummulativelyKlaus Aehlig
2025-04-22Remove redundant calls to std::filesystem::absoluteMaksim Denisov
...when calling std::filesystem::weakly_canonical, since the latter converts the argument path to an absolute path internally.
2025-04-08Keep identifiers for actions, trees, and tree_overlays disjointKlaus Aehlig
While our traverser correctly keeps separate identifier spaces for those entities, having disjoint identifiers allows easier reading of log messages and more simple reporting of origins of actions.
2025-04-07Add a class describing a tree defined as an overlayKlaus Aehlig
2025-04-07Action: support tree-overlay actionsKlaus Aehlig
2025-04-07ArtifactDescription: support tree overlaysKlaus Aehlig
... that, like trees, are given by their identifier.
2025-03-24ArtifactBlob: Return file pathMaksim Denisov
2025-03-24ArtifactBlob: Support construction from temporary filesMaksim Denisov
2025-03-10Add basic --profile option to justKlaus Aehlig
... so far only keeping track basic properties of the invocation. Still, the code is already organized to support future extensions; in particular, we do not have to rely on the Profile class being copyable.
2025-03-10Make graph-dumping options cummulativeKlaus Aehlig
If --dump-graph or --dump-plain-graph is given several times, the action graph wil also be written several times. In this way, regular use of those options will not be affected by adding them implicitly through invocation-logging options in the rc file.
2025-02-28Make statistics a separate libraryMaksim Denisov
2025-02-28Artifact: Use ArtifactDigestFactoryMaksim Denisov
...to remove code duplication.
2025-02-28Include ArtifactDigestFactory into "common" libraryMaksim Denisov
2025-02-27ArtifactBlob: Support construction from an existing fileMaksim Denisov
2025-02-27ArtifactBlob: Allow different content sourcesMaksim Denisov
2025-02-27ArtifactBlob: Remove public constructor.Maksim Denisov
2025-02-27ArtifactBlob: Support construction in memoryMaksim Denisov
2025-02-27ArtifactBlob: Support incremental readingMaksim Denisov
2025-02-27ArtifactBlob: Add cpp fileMaksim Denisov
2025-02-27ArtifactBlob: Convert to a classMaksim Denisov
2025-02-27ArtifactBlob: Move from execution_api/common to commonMaksim Denisov
2025-02-25just serve: allow clients to access execution endpoint with a different addressAlberto Sartori
To properly use `just serve`, both the client and the serve instance must talk to the very same execution endpoint. Typically, both the client and serve can reach out to the execution endpoint via the same IP address. However, it might be possible that the client and a serve instance know the same execution endpoint by means of differnet IP addresses. For example, the client knows the execution endpoint address through an _external_ IP address, while the serve instance, deployed within the same network infrastructure, only knows the _internal_ IP address. This patch adds the subkey `"client address"` -- of the key `"execution endpoint"` -- in the serve configuration file, to specify the alternative pair `address:port` used by the client.
2025-02-14just add-to-cas: Enable --resolve-special optionPaul Cristian Sarbu
2025-02-11Implement IsReasonableToRetryMaksim Denisov
2025-01-22Git CAS access: reduce log levelKlaus Aehlig
Trying to access a git object return a recoverable failure, hence the failure to find the object in the git object database should be logged at warning level at most. Moreover, in some cases we should log that event at an even lower level, e.g., if we're just checking the presence of the object in the local git cas to avoid unnecessary network access.
2025-01-09just build: add new option -pKlaus Aehlig
... allowing to print the unique artifact built (if any). This allows convenient inspection of the build result of targets that define precisely one artifact.
2024-12-19Remove FileRoot::ComputedRootMaksim Denisov
2024-12-19Support substitution of precomputed roots in RepositoryConfigMaksim Denisov
2024-12-19Fix cause of minor warningsOliver Reiche
2024-12-19Fix struct member initializationOliver Reiche
2024-12-11RepositoryConfig::SetGitCAS: allow setting log_levelKlaus Aehlig
... as there might be cases where it is expected that setting the git CAS fails, e.g., if referring to the implict git repository in the local build root as a fallback CAS.
2024-12-09analysis: Support artifact build argumentsPaul Cristian Sarbu
As analysis now can compute roots, i.e., can build artifacts, it needs to support setting the local launcher, action timeout, and the build jobs. The stage and rebuild arguments, which are also needed by the graph traversal, as well as other build-related arguments, remain not supported for the analysis subcomamnd, however they remain honored if set by subcommands that trigger an implicit analysis (e.g., build or install).
2024-11-21RepositoryConfig: support setting a computed rootKlaus Aehlig
2024-11-14common: Implement IWYU suggestionsPaul Cristian Sarbu
2024-11-13RepositoryConfig: get rid of implict usage assumptionKlaus Aehlig
The class RepositoryConfig is mutable, but has a set-once derived value, the largest bisimulation of the repositories described. This construction is problematic in that it assumes that all modifications be done before the first inspection of a value happens that implicitly triggers the setting of the derived value. Therefore, at the very least reset this derived value if a repository is modified.
2024-10-29Clean up unused dependenciesKlaus Aehlig
2024-10-28WithRetry: Support reduced log level for failuresKlaus Aehlig
In some situations, we use a retry strategy, but in case of complete failure have another way of attempting that task. In this case, we should not emmit an error message right away. Add support for this.
2024-10-25Add dependencies explicitly that are included directlyKlaus Aehlig
... instead of relying on those dependencies being pulled in indirectly.
2024-10-25ArtifactDigest: Add getter for hash function typePaul Cristian Sarbu
2024-10-25ObjectInfo: Fix digest creation in FromStringPaul Cristian Sarbu
The digest tree check should take into account the protocol. Also add a TODO to point out the currently needed code duplication.
2024-10-08just analyse: support dumping the action graph without originsKlaus Aehlig
The origins of actions are useful for understanding the action graph; if, however, the action graph is only to be used for further computaiton, this is unnecessary information. Therefore, add an option to dump the action graph without origins.
2024-10-08Name local variables using lower_caseMaksim Denisov
...and private members using lower_case_