77#include " Builder/SourceLayout.hpp"
88#include " Command.hpp"
99#include " Manifest.hpp"
10- #include " Rustify/Result.hpp"
1110
1211#include < cstdint>
1312#include < filesystem>
1413#include < optional>
14+ #include < rs/result.hpp>
1515#include < string>
1616#include < string_view>
1717#include < tbb/spin_mutex.h>
@@ -34,8 +34,8 @@ class BuildGraph {
3434 TestKind kind = TestKind::Unit;
3535 };
3636
37- static Result<BuildGraph> create (const Manifest& manifest,
38- const BuildProfile& buildProfile);
37+ static rs:: Result<BuildGraph> create (const Manifest& manifest,
38+ const BuildProfile& buildProfile);
3939
4040 const fs::path& outBasePath () const { return outBasePath_; }
4141 const Manifest& manifest () const { return project.manifest ; }
@@ -46,16 +46,16 @@ class BuildGraph {
4646 const std::string& libraryName () const { return libName; }
4747 const std::vector<TestTarget>& testTargets () const { return testTargets_; }
4848
49- Result<void > installDeps (bool includeDevDeps);
49+ rs:: Result<void > installDeps (bool includeDevDeps);
5050 void enableCoverage ();
51- Result<void > plan (bool logAnalysis = true );
52- Result<void > writeBuildFilesIfNeeded () const ;
53- Result<void > generateCompdb () const ;
51+ rs:: Result<void > plan (bool logAnalysis = true );
52+ rs:: Result<void > writeBuildFilesIfNeeded () const ;
53+ rs:: Result<void > generateCompdb () const ;
5454
55- Result<bool > needsBuild (const std::vector<std::string>& targets) const ;
55+ rs:: Result<bool > needsBuild (const std::vector<std::string>& targets) const ;
5656 Command ninjaCommand (bool dryRun = false ) const ;
57- Result<ExitStatus> buildTargets (const std::vector<std::string>& targets,
58- std::string_view displayName) const ;
57+ rs:: Result<ExitStatus> buildTargets (const std::vector<std::string>& targets,
58+ std::string_view displayName) const ;
5959
6060private:
6161 struct CompileUnit {
@@ -84,22 +84,22 @@ class BuildGraph {
8484 const std::unordered_set<std::string>& dependencies,
8585 bool isTest);
8686
87- Result<std::string> runMM (const std::string& sourceFile,
88- bool isTest = false ) const ;
89- Result<bool > containsTestCode (const std::string& sourceFile) const ;
87+ rs:: Result<std::string> runMM (const std::string& sourceFile,
88+ bool isTest = false ) const ;
89+ rs:: Result<bool > containsTestCode (const std::string& sourceFile) const ;
9090
91- Result<void > processSrc (const fs::path& sourceFilePath,
92- const SourceRoot& root,
93- std::unordered_set<std::string>& buildObjTargets,
94- tbb::spin_mutex* mtx = nullptr );
95- Result<std::unordered_set<std::string>>
91+ rs:: Result<void > processSrc (const fs::path& sourceFilePath,
92+ const SourceRoot& root,
93+ std::unordered_set<std::string>& buildObjTargets,
94+ tbb::spin_mutex* mtx = nullptr );
95+ rs:: Result<std::unordered_set<std::string>>
9696 processSources (const std::vector<fs::path>& sourceFilePaths,
9797 const SourceRoot& root);
9898
99- Result<std::optional<TestTarget>>
99+ rs:: Result<std::optional<TestTarget>>
100100 processUnittestSrc (const fs::path& sourceFilePath,
101101 tbb::spin_mutex* mtx = nullptr );
102- Result<std::optional<TestTarget>>
102+ rs:: Result<std::optional<TestTarget>>
103103 processIntegrationTestSrc (const fs::path& sourceFilePath,
104104 tbb::spin_mutex* mtx = nullptr );
105105
@@ -108,7 +108,7 @@ class BuildGraph {
108108 const std::unordered_set<std::string>& objTargetDeps,
109109 const std::unordered_set<std::string>& buildObjTargets) const ;
110110
111- Result<void > configure ();
111+ rs:: Result<void > configure ();
112112 void writeBuildFiles () const ;
113113
114114 fs::path outBasePath_;
0 commit comments