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

PoC kotlin data classes #1662

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

wcurrie
Copy link

@wcurrie wcurrie commented Jan 14, 2023

Extending #1661 to also handle querying fields of kotlin data classes.

Uses PropertyUtils.getProperty to call the getFoo() method generated by kotlin when trying to access bar.foo from polar. See OsoKotlinTest.kt for an example.

@github-actions
Copy link

CLA Assistant Lite bot: Thank you for your submission! Before we can accept your contribution, we ask that you sign our Contributor License Agreement. To sign the CLA, post a comment on this Pull Request that matches the following text exactly:


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request

@@ -16,7 +16,7 @@ test: rust
cd oso && mvn $(MVN_FLAGS) clean test

package: rust
cd oso && mvn $(MVN_FLAGS) clean package
cd oso && mvn $(MVN_FLAGS) clean install
Copy link
Author

@wcurrie wcurrie Jan 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just so I could use the locally built 0.26.5-SNAPSHOT in other projects like a fork of #1655

I built using:

$ MVN_FLAGS=-Dgpg.skip make package


import static org.junit.jupiter.api.Assertions.*;

public class OsoJavaRecordTest {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy paste of the existing OsoTest with record User instead of class User

import org.junit.jupiter.api.Test
import java.util.Set

class OsoKotlinTest {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Mostly) output of Intellij "convert to kotlin" of the existing OsoTest. The use data class... instead of class

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.

None yet

1 participant