summaryrefslogtreecommitdiff
path: root/src/buildtool/main/main.cpp
AgeCommit message (Collapse)Author
9 daysExecutionService: Use LocalApi directlyOliver Reiche
2025-06-12Add a flag to `gc` command: `--all`Maksim Denisov
2025-06-04FileRoot: Give git-based roots access to storage configPaul Cristian Sarbu
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-05-28profile: include also the end time of the buildKlaus Aehlig
... which might be quite ahead of the end time of the invocation if writing out of the action graph delays the end of the invocation.
2025-05-26profile: include time of build startKlaus Aehlig
When using a serve end point, the analysis phase might take quite long if serve has to actually build a delegated target or, at least, has to synchronize artifacts with the remote end point. Therefore, also record the time the build phase started (if building is requested) as an additional time stamp in the profile.
2025-05-15Make --dump-artifacts-to-build act cummulativelyKlaus Aehlig
2025-05-07profile: include remote-execution propertiesKlaus Aehlig
Include in the profile also the effective remote-execution endpoint, properties, and dispatch list. Software projects are often tested in a variety of environments or hardware configurations; as, obviously, the performance might differ significantly (especially depending on the used hardware) a proper analysis therefore requires the possibility to distinguish the various backends. Adding the effective configuration adds this posibility.
2025-05-06just: record analysis errors in profileKlaus Aehlig
2025-05-06Extend just exit codes to distinguish different kinds of failuresKlaus Aehlig
2025-04-17ServeFailureReporter: use const& to avoid copiesAlberto Sartori
2025-04-17main: ensure --profile is also honored for failed buildsKlaus Aehlig
We use a pointer to the actual Profile object to handle profiling, if requested. For this to work, actual object needs to stay in scope. However, we handle most of the operations, including parsing of arguments, in a global try-catch block. In order to be able to also correctly write a profile file outside this block, move the scope of the Profile object to top-level in main. While there, also improve the signature of the Profile class. That class is only meaningful, if a profile should eventually be writting to disk. So reflect this in the constructur. Also, once we know the file name to write the profile to (if any), we have already parsed the command line; so the making available of the command line to the profile can be enforced by adding this to the constructor as well. Co-authored-by: Denisov Maksim <denisov.maksim@huawei.com>
2025-04-16just profile: include subcommand and its argumentsKlaus Aehlig
As parsing the the command-line is non-trivial, we include all the relevant information about the command line in the profile. This should also include the subcommand. For sake of completeness, we also include the non-option arguments of the subcommand.
2025-04-07interfaces: extend signatures to be aware of tree overlaysKlaus Aehlig
In order to stay backwards compatible, the "tree_overlays" entry in action-graph descriptions is optional.
2025-04-04just: Interleave graph dumping with other tasksKlaus Aehlig
... and only as late as possible wait for that parallel task. Serializing a large task to JSON can take several seconds and as building does not depend on it, we shouldn't delay the build for with extra information.
2025-03-10Profiling: start collecting informations per actionsKlaus Aehlig
... so far, which actions where considered, and which of those were cached.
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-28GraphTraverser: Pass artifacts, blobs and trees to BuildAndStage by rvalueMaksim 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-01-22Source-tree service: accept lock referenceKlaus Aehlig
... so that tagging in the associated git root can be synchronized with other services provided by just serve.
2025-01-07Implement rebuilding of StorageConfigMaksim Denisov
2025-01-07Add backend description to CAS in a ctor of TargetCacheMaksim Denisov
...instead of adding it preliminarily.
2025-01-07Pass BackendDescription to StorageConfig from the outsideMaksim Denisov
2025-01-07Pack BackendDescription to a classMaksim Denisov
...to let it be stored as an independent instance.
2024-12-19Use PrecomputedRoots during evaluationMaksim Denisov
2024-12-19Fix cause of minor warningsOliver Reiche
2024-12-11main: avoid spourious warningsKlaus Aehlig
... given that a proper reporting of the return code if repo_config.SetGitCAS is contained in main anyway. Therefore, log the details trying to set the git cas to a level less than that of the final reporting.
2024-12-10Computed Roots: be aware of the serve end pointKlaus Aehlig
... as the base repository of a computed root might be absent.
2024-12-09Use expected to return an error from ParseRootMaksim Denisov
2024-12-09Localize error_msg argument of ParseRootMaksim Denisov
...and use expected to replace it.
2024-12-04Rehash root lookup, if building in compatible modeKlaus Aehlig
To avoid unnecessary staging and git imports of computed roots for build in compatible mode, use the rehashing functionality to allow us to compute the git tree of that root in memory.
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-20Return ResultTargetMap from analysisMaksim Denisov
...instead of filling in a map passed from the outside.
2024-11-14main: Implement IWYU suggestionsPaul Cristian Sarbu
2024-11-14file_system: Implement IWYU suggestionsPaul Cristian Sarbu
2024-11-13just main: subcommand traverse should only traverseKlaus Aehlig
... regardless of success. If traversing fails, we should just return failure. In this way, we can also avoid an unnecessary else-branch. While there, always return normally for tarverse, avoiding direct exits.
2024-10-21configured_target: honor --expression-log-limit when shortening representationKlaus Aehlig
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-07Enable misc-* checks.Maksim Denisov
2024-10-07Enable readability-* checks.Maksim Denisov
2024-09-13Remove Compatibility flag from justMaksim Denisov
2024-09-13Rename Compatibility class to ProtocolTraitsMaksim Denisov
...and move it to the common stage.
2024-08-30Return ArtifactDigest from LocalCAS::StoreMaksim Denisov
2024-08-07Replace classic C boolean operators with keywordsMaksim Denisov
! => not; && => and, || => or
2024-08-02just: report completion of analyse earlierKlaus Aehlig
... right after having successfully finished analysing the target. As a side effect, we also get the statistics of the export targets reported on analysis requests. As cached export targets project artifacts to known ones, that information is highly relevant there.
2024-07-30Pass ExecutionContext to GraphTraverser and Executor/RebuilderPaul Cristian Sarbu
Also update the classes documentation accordingly.
2024-07-30ApiBundle: Use a creator method instead of constructorPaul Cristian Sarbu
This will allow for ApiBundle to be used together with the TestApi implementation of IExecutionApi in tests. Also rename CreateRemote method to MakeRemote in order to remove any semantical confusion.
2024-07-30Use RemoteContext in install_casPaul Cristian Sarbu
2024-07-30Pass RemoteContext to GraphTraverserPaul Cristian Sarbu
It is passed as a not_null const pointer, to avoid binding to temporaries, and stored as a const reference to be later passed also to Executor/Rebuilder.