Skip to content

Conversation

@i-am-the-slime
Copy link
Contributor

@i-am-the-slime i-am-the-slime commented Aug 22, 2025

Fixes the compilation error in PR #1912 by correcting the test class name from OneofImportConflict to OneofImportConflictTest.

Closes #1912

@i-am-the-slime
Copy link
Contributor Author

Looks like the workflow needs approval. Maybe @nadavsr you could approve it?

Include oneof field names in conflict detection to properly generate
_root_ prefixes when oneof fields conflict with imported package names.

This fixes issue scalapb#1911 where ScalaPB would generate incorrect import
paths for oneof fields that conflict with imported package names.

The fix includes:
- Enhanced conflict detection in DescriptorImplicits.scala to include oneof field names
- Updated ProtobufGenerator.scala to properly handle conflicts when generating imports
- Added comprehensive tests to verify the fix works correctly
- Fixed test file to use correct generated class name (OneofImportConflictTest)

Closes scalapb#1911
@i-am-the-slime i-am-the-slime force-pushed the fix-oneof-import-conflict-test branch from 26987f8 to d8fe6bf Compare August 22, 2025 09:26
@thesamet thesamet merged commit 7217580 into scalapb:master Aug 22, 2025
12 checks passed
thesamet pushed a commit that referenced this pull request Aug 22, 2025
Include oneof field names in conflict detection to properly generate
_root_ prefixes when oneof fields conflict with imported package names.

This fixes issue #1911 where ScalaPB would generate incorrect import
paths for oneof fields that conflict with imported package names.

The fix includes:
- Enhanced conflict detection in DescriptorImplicits.scala to include oneof field names
- Updated ProtobufGenerator.scala to properly handle conflicts when generating imports
- Added comprehensive tests to verify the fix works correctly
- Fixed test file to use correct generated class name (OneofImportConflictTest)

Closes #1911
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.

2 participants