Skip to content

Commit

Permalink
pass represents / depends through grpc (#2278)
Browse files Browse the repository at this point in the history
  • Loading branch information
fundies committed Oct 17, 2021
1 parent bde4013 commit b3732c7
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
22 changes: 22 additions & 0 deletions CommandLine/emake/Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,28 @@ class CompilerServiceImpl final : public Compiler::Service {
if (author.empty())
author = about.get("maintainer");

eyit represents = about.values.find("represents");
if (represents != about.values.end()) {
std::string repsStr = (represents->second)->data().get("build-platforms");
std::stringstream ss(repsStr);
std::string token;
while (ss >> token) {
if (token.back() == ',') token.pop_back();
subInfo->add_represents(token);
}
}

eyit depends = about.values.find("depends");
if (depends != about.values.end()) {
std::string depsStr = (depends->second)->data().get("build-platforms");
std::stringstream ss(depsStr);
std::string token;
while (ss >> token) {
if (token.back() == ',') token.pop_back();
subInfo->add_depends(token);
}
}

subInfo->set_name(name);
subInfo->set_id(id);
subInfo->set_description(desc);
Expand Down
2 changes: 2 additions & 0 deletions shared/protos/compiler.proto
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,6 @@ message SystemInfo {
optional string description = 3; ///< A friendly description of the system and what it does.
optional string author = 4; ///< Name of the system author or maintainer (e.g, "John Doe")
optional string target = 5; ///< The target-platform of the system. Only used by compiler descriptions presently.
repeated string represents = 6; ///< Is the default for these platforms
repeated string depends = 7; ///< Will build on these platforms
}

0 comments on commit b3732c7

Please sign in to comment.