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

Add support for basic generic types #98

Merged
merged 6 commits into from
Dec 12, 2023
Merged

Conversation

ZacSweers
Copy link
Contributor

@ZacSweers ZacSweers commented Dec 11, 2023

Resolves #9. This works by introducing a new FieldType class that allows for defining type arguments to the raw type.

Along the way I did a few opportunistic things

  • Improved the primitive type handling and matching to use KP constants
  • Added more tests around nullability
  • Simplified "optional" handling by just deferring it to the code gen rather than the gradle property, which is now deprecated.
  • Checked in yarn.lock, which kotlin JS generates and is otherwise re-generated per-device building this repo.

I looked at adding something to the README, but in the process I noticed much of the README seems to be out of sync (possibly with past updates), where the java and kotlin code snippets don't actually match up with their output buildconfig files. I'd rather leave that to a separate issue if that's ok.

I couldn't find any formatting tooling or styles in the repo, so I tried to best-effort match.

@gmazzo
Copy link
Owner

gmazzo commented Dec 12, 2023

Thanks @ZacSweers! I used your ideas and combined them into the following PR #100, trying to keep the original signature of the DSL.

I still need to adjust a few things, but the PoC is working fine.

@gmazzo
Copy link
Owner

gmazzo commented Dec 12, 2023

Checked in yarn.lock, which kotlin JS generates and is otherwise re-generated per-device building this repo.

Actually, I've just added this to the .gitignore file, does it really need to the checked on the source code? As it's generated by Kotlin/JS tooling and not needed for the repo to build, I usually just ignore this file.

@gmazzo gmazzo merged commit 8d8b87b into gmazzo:main Dec 12, 2023
2 checks passed
@ZacSweers ZacSweers deleted the z/collections branch December 12, 2023 17:57
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.

Support generic types
2 participants