Skip to content

fix: report classes of different packages written to one file - #57

Merged
kafkiansky merged 1 commit into
0.6.xfrom
fix/multi-package-output-collision
Nov 24, 2026
Merged

kafkiansky merged 1 commit into
0.6.xfrom
fix/multi-package-output-collision

Conversation

@kafkiansky

Copy link
Copy Markdown
Contributor

The src_path option puts every namespace into one directory and the php_namespace option puts every package into one namespace. Two packages with a class of the same name generated in one run then wrote the same file, which protoc reported as "Tried to write the same file twice".

The plugin now names both .proto files, their packages and namespaces and the option that caused the collision. Files whose classes do not collide are generated as before.

The src_path option puts every namespace into one directory and the
php_namespace option puts every package into one namespace. Two packages
with a class of the same name generated in one run then wrote the same
file, which protoc reported as "Tried to write the same file twice".

The plugin now names both .proto files, their packages and namespaces
and the option that caused the collision. Files whose classes do not
collide are generated as before.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@kafkiansky kafkiansky self-assigned this Nov 24, 2026
@kafkiansky kafkiansky added the bug Something isn't working label Nov 24, 2026
@kafkiansky
kafkiansky merged commit 9b1786a into 0.6.x Nov 24, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant