Skip to content

Fix protobuf syntax that is causing an error in protobufjs#589

Merged
mjameswh merged 3 commits intomasterfrom
fix-double-semicolon
May 15, 2025
Merged

Fix protobuf syntax that is causing an error in protobufjs#589
mjameswh merged 3 commits intomasterfrom
fix-double-semicolon

Conversation

@mjameswh
Copy link
Contributor

@mjameswh mjameswh commented May 14, 2025

What changed?

Why?

  • The double semicolon sequence is causing a compilation error in protobufjs, even though this is technically valid according to the official Protobuf 3 spec.

    This is a bug in protobufjs, for which there's been an open issue ticket since 2019, but it was never acknowledged, and a PR fixing this has been ignored for more than a year.

    Given that there's simply no reason to use a double semicolon sequence anyway, it appears preferable to simply avoid that in our proto definitions.

@mjameswh mjameswh requested review from a team as code owners May 14, 2025 05:08
string identity = 5;
// Version info of the worker who processed this workflow task.
// Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]
temporal.api.common.v1.WorkerVersionStamp worker_version = 6 [deprecated = true];;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add some CI step to prevent this in the future?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is technically possible, but since this is technically valid according to the spec and the official protoc tool, detecting that would require adding protobufjs to this repository, or to do some specifically tailored checks (e.g. grep ';;' on all .proto files, which might trigger false-positives). That would most likely incurs more maintenance hassle than what it would save us.

So after discussion with the team, we agreed to not automate this check.

Copy link
Contributor

Choose a reason for hiding this comment

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

sorry!

@mjameswh mjameswh changed the title Fix protobuf syntax error Fix protobuf syntax that is causing an error in protobufjs May 14, 2025
@mjameswh mjameswh merged commit 3f76376 into master May 15, 2025
7 checks passed
@mjameswh mjameswh deleted the fix-double-semicolon branch May 15, 2025 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants