Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace XElements.isFromJavaSource() and XElements.isFromKotlinSource() with the version in XProcessing #4095

Merged
merged 1 commit into from
Oct 11, 2023

Conversation

copybara-service[bot]
Copy link

@copybara-service copybara-service bot commented Oct 11, 2023

Replace XElements.isFromJavaSource() and XElements.isFromKotlinSource() with the version in XProcessing

This also fixes a Github issue where we use XConverters.toKS() to get the underlying KSAnnotated and its origin but it doesn't work for synthetic elements like SyntheticExecutableParameterElement. The XProcessing version fixes this by

  1. Making these functions member functions of XMemberContainer so that we can skip the implementation in most element types and we can't miss any XMemberContainer subtypes.
  2. Simply consider that the member container is from Kotlin if it's KspFileMemberContainer or KspSyntheticFileMemberContainer as these are generated from Kotlin top-level properties.

RELNOTES=N/A

@copybara-service copybara-service bot changed the title Replace XElements.isFromJavaSource() and XElements.isFromKotlinSource() with the versions in XProcessing Replace XElements.isFromJavaSource() and XElements.isFromKotlinSource() with the version in XProcessing Oct 11, 2023
@copybara-service copybara-service bot force-pushed the test_572550138 branch 2 times, most recently from e3a0a26 to d209a02 Compare October 11, 2023 15:49
…() with the version in XProcessing

This also fixes a Github issue where we use `XConverters.toKS()` to get the underlying KSAnnotated and its origin but it doesn't work for synthetic elements like SyntheticExecutableParameterElement. The XProcessing version fixes this by

1. Making these functions member functions of XMemberContainer so that we can skip the implementation in most element types and we can't miss any XMemberContainer subtypes.
2. Simply consider that the member container is from Kotlin if it's KspFileMemberContainer or KspSyntheticFileMemberContainer as these are generated from Kotlin top-level properties.

RELNOTES=N/A
PiperOrigin-RevId: 572595483
@copybara-service copybara-service bot merged commit 4593c0a into master Oct 11, 2023
@copybara-service copybara-service bot deleted the test_572550138 branch October 11, 2023 16:23
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.

1 participant