61 Commits

Author SHA1 Message Date
Giacomo Vercesi 27f419c8cd Fix and ban namespace clobbering
Fix an instance where the `std` namespace got clobbered into the global
namespace by accident.
2026-02-16 10:34:38 +01:00
Alessandro Di Federico 5820908675 Remove and ban \file 2025-12-16 17:41:55 +01:00
Ivan Krysak 25538385c8 Avoid using !! unless necessary
The only necessary place is when passing it into the  `BOOST_TEST`
macro, which doesn't convert its argument to `bool` internally.
2025-10-13 10:26:41 +03:00
Ivan Krysak 5717d835f8 Add missing llvm::Error checks 2025-10-13 10:26:37 +03:00
Ivan Krysak c11761ceb5 Pipes: drop unused invalidateFromDiff 2025-10-08 12:22:34 +03:00
Ivan Krysak 77ea07c364 Minor improvements 2025-10-08 12:22:30 +03:00
Giacomo Vercesi 79d20d343b FilePath: fix addExtension
When working with `stdin` and `stdout`, the `addExtension` function
should return std::nullopt, since concatenating files is undesirable.
This fixes a bug where the output of the `StringMap` container would
have the index file appended to it, rendering an invalid tar.
2025-06-27 17:12:18 +02:00
Giacomo Vercesi 8c76e7d2ef Cleanup Storage classes
Due to the removal of `S3StorageClient`, simplify the infrastructure
under `/Storage/`:
* Move and rename `LocalStorageClient` to `StorageClient`, de-virtualize
  all of its methods
* Move and rename `LocalWritableFile`, `LocalReadableFile` to
  `WritableFile` and `ReadableFile`, de-vitualize all methods
* Drop the `Std{in,out}StorageClient`, make `FilePath` handle the
  stdin/stdout logic
* Remove `setStorageCredentials` from `PipelineManager`
2025-05-07 16:42:34 +02:00
Khaled Ismaeel a52f1f17c2 Add automatic migrations in PipelineManager 2025-04-30 15:08:45 +02:00
Giacomo Vercesi 11f1e532c6 Implement dirty bit on Container
Add a `Dirty` boolean to the `ContainerBase` class. This will be set to
true when the container mutates itself (e.g. remove, mergeBack, clear).
The dirty bit is reset when running `PipelineManager.store`.
2025-04-03 15:59:18 +02:00
Giacomo Vercesi f740badd68 PipelineManager: drop storeContext
The `storeContext` function was a misguided attempt to performance
optimization. Without storing all the containers and the invalidation
metadata the resume directory would be corrupt by just storing the
context.
2025-04-03 15:59:18 +02:00
Giacomo Vercesi a9a0fdc236 ELFImport: fix input file missing
When using revng through `revng daemon` the variable `InputPath` is not
populated, leading to `lddtree` failing silently. Fall back to the input
binary in the resume directory in case the the `InputPath` variable is
empty.
2025-03-14 13:05:39 +01:00
Giacomo Vercesi 87872f9fc5 PipelineManager: add save-after-every-analysis
Add a command-line option to pipeline that saves after every analysis is
run.
2025-03-13 18:03:50 +01:00
Giacomo Vercesi 05041a302a PipelineManager: save after running analyses
Save the context after an analysis (or analyses-list) has run. This
guarantees that at least the model is preserved in case of crash.
2024-12-20 12:24:28 +01:00
Ivan Krysak 1eb80ecd2d Introduce an error creation helper 2024-11-06 15:20:37 +02:00
Alessandro Di Federico a0c670652c Improve usages of Expected<T> 2024-10-10 14:50:26 +02:00
Alessandro Di Federico 6297537486 Drop Pipe::print 2024-09-27 12:07:18 +02:00
Alessandro Di Federico 2cdedc71f4 s/serialize/toString/
We keep serialize for method dealing with streams.
If it returns a `std::string`, let's use `toString`.
2024-09-27 12:07:17 +02:00
Alessandro Di Federico c8d4381297 s/Context &Ctx/Context &Context/g 2024-09-27 12:07:17 +02:00
Alessandro Di Federico 7b00473859 PDBImporter: rework .pdb search 2024-08-05 17:41:34 +02:00
Alessandro Di Federico d9367954a4 Convert all public strings to kebab-case 2024-02-09 10:04:24 +01:00
Giacomo Vercesi 6ac7c0c557 Implement container cache pruning
Implement the pruning of container caches (resume directory) when there
is a mismatch between the current revng components' hash and the saved
one. This functionality is activated via `-check-components-version`.
2024-01-26 17:46:21 +01:00
Massimo Fioravanti c276a439b5 Add pipeline invalidation
Replace the stub implementation of invalidation with the proper
implementation. A ReadPathCache is added to each global so that it can
keep tracks of what target are associated to which read paths.
2024-01-02 11:14:56 +01:00
Giacomo Vercesi 94aa2b51d2 Add Context Global Index 2023-11-03 12:13:58 +01:00
Giacomo Vercesi 04698bb550 Return invalidations when deserializing container
When deserializing a container in the pipeline, return the invalidations
that have been caused by the container changing content.
2023-11-03 12:13:58 +01:00
Giacomo Vercesi e2504dd6f2 Implement storage credentials update
Add the functionality to rev.ng's infrastructure to allow to dynamically
update the credentials of the underlying storage provider at runtime.
2023-09-14 17:32:08 +02:00
Giacomo Vercesi 2a239ddf47 Introduce PipelineDescription
Add the PipelineDescription object that describes the structure of a
pipeline. This will be used by all the downstream users instead of
pipeline accessor methods via PipelineC.
2023-09-14 15:44:33 +02:00
Giacomo Vercesi 0b2754c824 pipeline: drop Disk from storage methods
This commit changes the following method names across the codebase:
* `storeToDisk` -> `store`
* `loadFromDisk` -> `load`
This has been done since the storage is no longer bound to the local
storage.
2023-09-06 15:23:43 +02:00
Giacomo Vercesi 93d3a6238d revng: introduce S3 support
Add the capability for all revng tooling to run with an S3-backed
workdir.
2023-09-06 15:23:43 +02:00
Pietro Fezzardi 851771eaa5 Improve tracing 2023-09-06 12:59:10 +02:00
Alessandro Di Federico b8b483d052 Minor changes 2023-08-23 16:14:04 +02:00
Alessandro Di Federico 14525d91f5 Adopt llvm::Task 2023-08-01 10:51:16 +02:00
Giacomo Vercesi db7ad24175 PipelineManager: add produceTargets with checks
Move much of the logic of `rp_manager_produce_targets` to a method
inside `PipelineManager`, add additional checks for the existence of the
targets that are requested to be produced.
2023-07-31 16:05:51 +02:00
Ivan Krysak 7d235f4fd0 Enforce licence header consistency
Also do some basic cleanup: capitalize first letters, add `.`
at the end of the sentences, and so on.
2023-07-03 15:23:10 +00:00
Ivan Krysak bc98e0079f Formatting: change PenaltyReturnTypeOnItsOwnLine
The new value is 21.
2023-07-02 13:20:49 +02:00
Giacomo Vercesi 566cb6310b PipelineC: make indexed object stably sorted
Many Pipeline objects (Globals, Ranks, Kinds, Targets in a TargetList)
were ordered by load order, this makes the playback of traces difficult.
Moreover the order of loading of pipeline files also influences the
ordering of other elements (Step, Analys{is,esLists}). These are also
ordered to prevent incosistent ordering.
2023-04-20 14:43:13 +02:00
Alessandro Di Federico 52521f8cac Adopt more standard library's features 2023-04-08 08:42:23 +02:00
Massimo Fioravanti fc3f106640 Pipeline: fix accidental container materialization
Pipeline lazy containers were incorrectly materialized when it was not
necessary.
2023-04-07 14:37:14 +02:00
Giacomo Vercesi 2e96e09f63 Drop analyze-all
Drop all the uses of analyzeAll and swap its use with the invocation of
the appropriate analysesList
2023-03-22 17:50:02 +01:00
Massimo Fioravanti 312e2e8d53 Add analyses lists
Introduces the possibility of specifiying lists of analyses as way to
give them coherent names.
2023-03-22 17:31:46 +01:00
Massimo Fioravanti 452d10950e Pipeline: only remove targets in the container
This commit ensures that only content that is actually inside a
container is elegible to be removed.
2022-11-30 15:06:54 +01:00
Alessandro Di Federico 98bea7dcec Minor changes 2022-11-30 15:06:54 +01:00
Giacomo Vercesi 81d25f9805 PipelineC: expose invalidation logic 2022-10-30 09:13:14 +01:00
Massimo Fioravanti d55aa9b9e6 Pipeline: remove * from targets
Now * is just a pipeline frontend shorthand.
2022-10-20 14:20:12 +02:00
Massimo Fioravanti 633f49c1ef Introduce dedicated namespace for kinds and ranks 2022-08-29 14:44:53 +02:00
Massimo Fioravanti 6b099c57e8 Pipeline: introduce options for analyses 2022-08-29 14:43:25 +02:00
Massimo Fioravanti d250d43ee4 revng-pipeline: factor out common CLI options
Common CLI options that were used by multiple tools and have now been
isolated into a single include file to be used before declaring main.
2022-08-10 09:49:24 +02:00
Massimo Fioravanti 4cd5abe2b0 revng-pipeline: introduce --produce and --analyze 2022-08-10 09:49:24 +02:00
Massimo Fioravanti 96bd5835d8 revng-pipeline: rework file-to-container syntax 2022-08-10 09:49:24 +02:00
Massimo Fioravanti 85a9c9637f revng-pipeline: rework logging 2022-08-10 09:49:24 +02:00