[APIView][Java Parser] Enable Cross-Language Support for Java
- Dominant language
- C#
- Stars
- 135
- Forks
- 260
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 144
Description
## Summary
Java APIView needs cross-language support to enable linking between TypeSpec-generated SDKs across languages. The emitter already generates `crossLanguageDefinitions`, but is missing `crossLanguagePackageId`. The parser needs to output this metadata in the CodeFile.
## Requirements
| # | Requirement | Component |
|---|-------------|-----------|
| 1 | Add `crossLanguagePackageId` to emitter metadata | `Azure/autorest.java` |
| 2 | Update matching mechanism (method signatures without params) | Parser |
| 3 | Output `CrossLanguageMetadata` in CodeFile JSON | Parser |
| 4 | Set `CrossLanguageId` on matching `ReviewLine` objects | Parser |
## Expected Output (per CodeFile schema)
```json
{
"CrossLanguagePackageId": "TextTranslation",
"CrossLanguageMetadata": {
"CrossLanguagePackageId": "TextTranslation",
"CrossLanguageDefinitionId": { "com.azure...": "TextTranslation..." }
},
"ReviewLines": [
{ "LineId": "...", "CrossLanguageId": "TextTranslation.getSupportedLanguages" }
]
}
```
[Java APIView Cross-Language Implementation Guide](https://gist.github.com/AlitzelMendez/61c83dd7db205ef66a9ea85ad28bf9fe#file-java-md)
Contributor guide
Research direction
Start with the Java APIView Cross-Language Implementation Guide and inspect the Parser, the CodeFile schema, and Azure/autorest.java. Trace how crossLanguageDefinitions and ReviewLine objects are currently handled. Done means emitter metadata includes crossLanguagePackageId, CodeFile JSON includes CrossLanguageMetadata, and matching ReviewLine objects receive CrossLanguageId.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100