|
9 | 9 | #define NOMINMAX 1 |
10 | 10 | #endif |
11 | 11 |
|
| 12 | +#include "DSResult/DSResult.hpp" |
12 | 13 | #include "ghc/filesystem.hpp" |
13 | 14 | #include <vector> |
14 | 15 |
|
15 | 16 | namespace runcpp2 |
16 | 17 | { |
17 | | - bool GetDependenciesPaths( const std::vector<Data::DependencyInfo*>& availableDependencies, |
18 | | - std::vector<std::string>& outCopiesPaths, |
19 | | - std::vector<std::string>& outSourcesPaths, |
20 | | - const ghc::filesystem::path& scriptPath, |
21 | | - const ghc::filesystem::path& buildDir); |
| 18 | + DS::Result<void> |
| 19 | + GetDependenciesPaths( const std::vector<Data::DependencyInfo*>& availableDependencies, |
| 20 | + std::vector<std::string>& outCopiesPaths, |
| 21 | + std::vector<std::string>& outSourcesPaths, |
| 22 | + const ghc::filesystem::path& scriptPath, |
| 23 | + const ghc::filesystem::path& buildDir); |
22 | 24 |
|
23 | 25 | bool IsDependencyAvailableForThisPlatform(const Data::DependencyInfo& dependency); |
24 | 26 |
|
25 | | - bool CleanupDependencies( const runcpp2::Data::Profile& profile, |
| 27 | + DS::Result<void> |
| 28 | + CleanupDependencies(const runcpp2::Data::Profile& profile, |
| 29 | + const Data::ScriptInfo& scriptInfo, |
| 30 | + const std::vector<Data::DependencyInfo*>& availableDependencies, |
| 31 | + const std::vector<std::string>& dependenciesLocalCopiesPaths, |
| 32 | + const std::string& dependenciesToReset); |
| 33 | + |
| 34 | + DS::Result<void> |
| 35 | + SetupDependenciesIfNeeded( const runcpp2::Data::Profile& profile, |
| 36 | + const ghc::filesystem::path& buildDir, |
26 | 37 | const Data::ScriptInfo& scriptInfo, |
27 | | - const std::vector<Data::DependencyInfo*>& availableDependencies, |
| 38 | + std::vector<Data::DependencyInfo*>& availableDependencies, |
28 | 39 | const std::vector<std::string>& dependenciesLocalCopiesPaths, |
29 | | - const std::string& dependenciesToReset); |
30 | | - |
31 | | - bool SetupDependenciesIfNeeded( const runcpp2::Data::Profile& profile, |
32 | | - const ghc::filesystem::path& buildDir, |
33 | | - const Data::ScriptInfo& scriptInfo, |
34 | | - std::vector<Data::DependencyInfo*>& availableDependencies, |
35 | | - const std::vector<std::string>& dependenciesLocalCopiesPaths, |
36 | | - const std::vector<std::string>& dependenciesSourcePaths, |
37 | | - const int maxThreads); |
| 40 | + const std::vector<std::string>& dependenciesSourcePaths, |
| 41 | + const int maxThreads); |
38 | 42 |
|
39 | | - bool BuildDependencies( const runcpp2::Data::Profile& profile, |
40 | | - const Data::ScriptInfo& scriptInfo, |
41 | | - const std::vector<Data::DependencyInfo*>& availableDependencies, |
42 | | - const std::vector<std::string>& dependenciesLocalCopiesPaths, |
43 | | - const int maxThreads); |
| 43 | + DS::Result<void> |
| 44 | + BuildDependencies( const runcpp2::Data::Profile& profile, |
| 45 | + const Data::ScriptInfo& scriptInfo, |
| 46 | + const std::vector<Data::DependencyInfo*>& availableDependencies, |
| 47 | + const std::vector<std::string>& dependenciesLocalCopiesPaths, |
| 48 | + const int maxThreads); |
44 | 49 |
|
45 | | - bool GatherDependenciesBinaries(const std::vector<Data::DependencyInfo*>& availableDependencies, |
46 | | - const std::vector<std::string>& dependenciesCopiesPaths, |
47 | | - const Data::Profile& profile, |
48 | | - std::vector<std::string>& outBinariesPaths); |
| 50 | + DS::Result<void> |
| 51 | + GatherDependenciesBinaries( const std::vector<Data::DependencyInfo*>& availableDependencies, |
| 52 | + const std::vector<std::string>& dependenciesCopiesPaths, |
| 53 | + const Data::Profile& profile, |
| 54 | + std::vector<std::string>& outBinariesPaths); |
49 | 55 |
|
50 | | - bool HandleImport(Data::DependencyInfo& dependency, const ghc::filesystem::path& basePath); |
| 56 | + DS::Result<void> HandleImport( Data::DependencyInfo& dependency, |
| 57 | + const ghc::filesystem::path& basePath); |
51 | 58 |
|
52 | | - bool ResolveImports(Data::ScriptInfo& scriptInfo, |
53 | | - const ghc::filesystem::path& scriptPath, |
54 | | - const ghc::filesystem::path& buildDir); |
| 59 | + DS::Result<void> ResolveImports(Data::ScriptInfo& scriptInfo, |
| 60 | + const ghc::filesystem::path& scriptPath, |
| 61 | + const ghc::filesystem::path& buildDir); |
55 | 62 |
|
56 | | - bool SyncLocalDependency( const Data::DependencyInfo& dependency, |
57 | | - const ghc::filesystem::path& sourcePath, |
58 | | - const ghc::filesystem::path& copyPath); |
| 63 | + DS::Result<void> SyncLocalDependency( const Data::DependencyInfo& dependency, |
| 64 | + const ghc::filesystem::path& sourcePath, |
| 65 | + const ghc::filesystem::path& copyPath); |
59 | 66 |
|
60 | | - bool SyncLocalDependencies( const std::vector<Data::DependencyInfo*>& dependencies, |
61 | | - const std::vector<std::string>& dependenciesSourcePaths, |
62 | | - const std::vector<std::string>& dependenciesCopiesPaths); |
| 67 | + DS::Result<void> SyncLocalDependencies(const std::vector<Data::DependencyInfo*>& dependencies, |
| 68 | + const std::vector<std::string>& dependenciesSourcePaths, |
| 69 | + const std::vector<std::string>& dependenciesCopiesPaths); |
63 | 70 | } |
64 | 71 |
|
65 | 72 | #endif |
0 commit comments