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

Wasm support #6

Merged
merged 5 commits into from
Aug 14, 2024
Merged

Wasm support #6

merged 5 commits into from
Aug 14, 2024

Conversation

terrakok
Copy link
Contributor

image

Copy link
Owner

@gabrieldrn gabrieldrn left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution!
I didn't wanted to enable Wasm as it's not stable enough yet but I guess it's not too problematic.

Comment on lines +10 to +12
toolchain {
languageVersion.set(JavaLanguageVersion.of("17"))
}
Copy link
Owner

Choose a reason for hiding this comment

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

Even if toolchain usage is recommended by Google and Gradle, the developer community doesn't. Especially Jake Wharton in this post so I would like to keep the old way. Or maybe you can explain me why you suggest it? Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I set the toolchain to configure both java and kotlin compilations here. Without the toolchain the import fails with

Execution failed for task ':build-logic:convention:compileKotlin'.
> Inconsistent JVM-target compatibility detected for tasks 'compileJava' (17) and 'compileKotlin' (21).

because your config configures only java's compilation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I know Jake's post but, I guess, sometimes he is too radical. Convenient and easiness are more valuable than abstract things. Have you met problems with a compilation with java 17? Why do think it is worse than a compilation with higher javas?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you can reproduce it: IDE -> Preferences -> Kotlin Compiler -> Change Target JVM version -> set non-17 java (which is your default as I understand)

Copy link
Owner

Choose a reason for hiding this comment

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

Ok, sorry for the late response. Let me try things around, I always had solvable problems with Java 17 so far and actually I've never fully tested toolchains, also because Jake's post kinda frightened me ngl!

Copy link
Owner

Choose a reason for hiding this comment

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

I realised you did the modification on the build logic module. I thought it was on the library, sorry about that, using the toolchain on build sources doesn't bother me at all.
Actually, regarding the import issue you had, I got that fail once but I wasn't able to reproduce it! So that's the correct way to do it, thank you for correcting it!

@terrakok
Copy link
Contributor Author

it's not stable enough yet

it is not stable for the final applications but it is ready for libraries and frameworks. Everyone will make decision by their own use or not the wasm target but your library is ready already 👍

@gabrieldrn gabrieldrn merged commit 992af16 into gabrieldrn:main Aug 14, 2024
8 of 9 checks passed
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.

2 participants