Skip to content

Conversation

@i-am-the-slime
Copy link

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

This change resolves the compilation failures in the e2e tests that were preventing PR scalapb#1912 from passing CI.

Changes

  • Updated import statement to use correct class name OneofImportConflictTest
  • Fixed all references in test code to match generated class name

The original PR's functionality works correctly - this is just fixing a naming mismatch between the test and generated code.

Testing

  • ✅ All e2e tests pass locally with this fix
  • ✅ 280 tests succeeded, 0 failed

🤖 Generated with Claude Code

thesamet and others added 11 commits August 17, 2025 18:37
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
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
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