21 Commits

Author SHA1 Message Date
Alessandro Di Federico 5820908675 Remove and ban \file 2025-12-16 17:41:55 +01:00
Ivan Krysak a88747cf99 Drop unused includes 2025-10-08 12:22:34 +03: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
Giacomo Vercesi cdf2d6125f Remove S3StorageClient 2025-05-07 16:42:32 +02:00
Giacomo Vercesi cf08ae41be Drop usage of llvm::ErrorOr<T>
Remove the last two remaining classes in revng which used the
`llvm::ErrorOr` class, replace them with `llvm::Expected`.
2025-05-05 16:02:40 +02:00
Giacomo Vercesi 1aa9c61c31 LocalStorageClient: save filelist
When saving to disk, `LocalStorageClient` will also save a file named
`file_list.yml` which will list the list of files, which is needed for
downstream save handlers to efficently save.
2025-03-27 12:45:29 +01:00
Giacomo Vercesi f99aee6cf6 StorageClient: disable S3StorageClient
Disable creation of `S3StorageClient` from
`StorageClient::fromPathOrURL`.
2025-03-26 16:36:20 +01:00
Giacomo Vercesi a06b380ce0 S3StorageClient: implement parallel upload
Allow uploads to S3 to be executed in parallel, this should reduce the
time it takes for a `save` operation to conclude.
2025-02-06 12:21:23 +01:00
Giacomo Vercesi 761e84fc9f Add revng::cantFail
Add the `revng::cantFail` function which allows to wrap functions with
`std::error_code` and check their result. This is analogous to
`llvm::cantFail` for `llvm::Error`.
2025-02-05 10:46:00 +01:00
Ivan Krysak 1eb80ecd2d Introduce an error creation helper 2024-11-06 15:20:37 +02:00
Giacomo Vercesi e0336096af S3StorageClient: actually check presence of file
In the `type` function, if a file is present in the index then it should
also be checked in the bucked via a HEAD call. This allows revng to
successfully start up even if a file in the `index.yml` files has been
deleted on S3.
2024-06-06 15:45:02 +02:00
Alessandro Di Federico 0377ed6c04 StdStorageClient::type: always return Missing 2024-05-22 10:25:25 +02:00
Alessandro Di Federico 738da4fbb5 Minor changes 2024-05-22 10:25:25 +02:00
Alessandro Di Federico fe1dffcffd Add some missing includes
This is in preparation of reducing headers in Debug.h.
2024-05-03 21:52:40 +02:00
Alessandro Di Federico 7112482989 Storage: fix writing to a pipe 2024-02-09 10:04:18 +01:00
Ivan Krysak b25a32de2a Stop using std:: prefix for std::size_t 2024-01-29 11:57:54 +02:00
Giacomo Vercesi 443301a402 S3StorageClient: fix directory detection
The detection of directories in S3StorageClient was flawed as it did not
account for files with a suffix. This commit forces the use of a `/` at
the end to guarantee that the matched path is a sub-{file,directory}.
2024-01-26 17:46:21 +01:00
Giacomo Vercesi 7378bee983 Storage/Path.cpp: fix local path normalization
Move the local path normalization process to a stand-alone function. Fix
a bug that caused relative paths to not be properly resolved due to
missing `true` in `remove_dots`.
2023-11-03 12:13:57 +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 aa8eb26028 S3StorageClient: fix bug in generateNewFilename
Fix a corner-case where an '/' would be erroneously prepended if the
Path did not contain a directory name.
2023-09-14 15:44:32 +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