Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/MessageTypeStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include <iostream>
#include <sstream>
#include <string_view>
#include <unordered_map>

#include <google/protobuf/compiler/importer.h>
Expand All @@ -19,10 +20,10 @@ using namespace Arcus;
* of std::hash differs between compilers, we need to make sure we use the same
* implementation everywhere.
*/
uint32_t hash(const std::string& input)
uint32_t hash(std::string_view input)
{
const char* data = input.c_str();
uint32_t length = input.size();
const char* data = input.data();
uint32_t length = static_cast<uint32_t>(input.size());
uint32_t result = static_cast<uint32_t>(2166136261UL);
for (; length; --length)
{
Expand All @@ -39,7 +40,7 @@ class ErrorCollector : public google::protobuf::compiler::MultiFileErrorCollecto
{
}

void AddError(const std::string& filename, int line, int column, const std::string& message) override
void RecordError(absl::string_view filename, int line, int column, absl::string_view message) override
{
Comment on lines +43 to 44
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error collector override was renamed to RecordError(absl::string_view, ...), which likely won’t compile with the currently pinned protobuf version in this repo (protobuf/3.21.12 in conanfile.py). To keep builds working, either bump the protobuf requirement to a version that provides RecordError (and absl::string_view signatures) or add a compatibility shim/#if GOOGLE_PROTOBUF_VERSION ... to implement the correct override for both old (AddError(const std::string&, ...)) and new APIs.

Copilot uses AI. Check for mistakes.
_stream << "[" << filename << " (" << line << "," << column << ")] " << message << std::endl;
_error_count++;
Expand Down
Loading