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

Make hierarchy in KSP API sealed #1380

Merged
merged 3 commits into from
Oct 24, 2023

Conversation

lukellmann
Copy link
Contributor

See commit messages for details.

Closes #1351

@google-cla
Copy link

google-cla bot commented May 13, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@lukellmann
Copy link
Contributor Author

Is main the correct base branch?

Interfaces that were sealed: KSAnnotated, KSDeclarationContainer,
KSReferenceElement, KSModifierListOwner, KSPropertyAccessor,
KSDeclaration and PlatformInfo
Abstract implementation classes that inherited from now sealed types
have those supertypes removed and replace overridden with open members.
Additional casts had to be introduced in a few places.

A few when statements had to be made exhaustive (by specifying all
cases) because they now operate on subjects with a sealed type.
KSNodeDescriptorImpl, KSNodeJavaImpl and KSNodeKtImpl were removed
because they were unused but inherited from the now sealed KSNode.
@lukellmann lukellmann force-pushed the sealed-hierarchies-pr branch from e8c3508 to cc33eca Compare September 22, 2023 16:46
@ting-yuan ting-yuan merged commit dbcc7a0 into google:main Oct 24, 2023
@ting-yuan
Copy link
Collaborator

Thanks for the PR!

@lukellmann lukellmann deleted the sealed-hierarchies-pr branch October 25, 2023 07:18
@ting-yuan
Copy link
Collaborator

Sorry, I should have re-run the CI before merging the patch. It broke the build and therefore I need to revert it. I'll fix and re-land it later.

@lukellmann
Copy link
Contributor Author

oh, what did i break?

@lukellmann lukellmann restored the sealed-hierarchies-pr branch November 3, 2023 15:05
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.

Consider using sealed hierarchies in the KSP API to allow exhaustive whens
2 participants