Skip to content

refactor(scip): separate out files in mapper that depends on proto to another directory#31

Merged
zerunz merged 1 commit intouber:mainfrom
zerunz:refactor/mapper
Oct 20, 2025
Merged

refactor(scip): separate out files in mapper that depends on proto to another directory#31
zerunz merged 1 commit intouber:mainfrom
zerunz:refactor/mapper

Conversation

@zerunz
Copy link
Copy Markdown
Collaborator

@zerunz zerunz commented Oct 17, 2025

Description

Move all functions under src/ulsp/mapper that touch proto code into a separate sub-package, src/ulsp/mapper/idl.
This way:
src/ulsp/mapper only contains logic for LSP, JSON-RPC, and general mapping.
src/ulsp/mapper/idl contains the parts that translate between internal models and protobuf messages.
When a controller imports mapper, no proto code is compiled in.
Only code that explicitly imports mapper/idl will depend on the generated .pb.go files.
So that it won't cause proto: duplicate proto type registered: error log when importing github.com/uber/scip-lsp/src/ulsp/controller/scip due to importing two versions of the same proto file that may conflict with each other

Also checked build graph:

$ bazel query "somepath(//src/ulsp/controller/scip:go_default_library, //idl/...)" 
INFO: Empty results

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test improvement

Component(s) Affected

  • Language Server (ULSP)
  • SCIP Generation (Python utilities)
  • VS Code/Cursor Extension
  • Java Aggregator
  • Build System (Bazel)
  • Documentation
  • Tests

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes (bazel test //...)
  • I have tested this manually with a real project

Manual Testing Details

Describe how you tested these changes:

  • IDE used for testing:
  • Project(s) tested against:
  • Specific features/scenarios verified:

Checklist

  • My code follows the existing code style and conventions
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have updated BUILD.bazel files if I added new source files
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Screenshots/Logs (if applicable)

Include any relevant screenshots, logs, or output that demonstrates the changes.

Related Issues

Fixes #(issue number)
Closes #(issue number)
Related to #(issue number)

Additional Notes

Any additional information that reviewers should know about this PR.

@zerunz zerunz merged commit 52c0f65 into uber:main Oct 20, 2025
4 checks passed
@zerunz zerunz deleted the refactor/mapper branch October 20, 2025 18:35
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