-
Notifications
You must be signed in to change notification settings - Fork 15
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
Request for multiplatform #3
Comments
I've thought this would be a good thing to do. I've not done any multi
platform yet. Will look at it.
…On Sun, Jan 12, 2020 at 4:01 AM NikkyAI ***@***.***> wrote:
Is it possible to package this for multiplatform?
for my own project i just copied your code into my commonMain
i use this with kotlin/js and react, but having it in common code leaves
the option open to render stuff serverside too
seems like Chat.isUpperCase() does not exist on js so i solved it
expect/actual, iirc this is the only problem i ran into
//common
expect val Char.isUpperCase: Boolean
// js
actual val Char.isUpperCase: Boolean
get() = (this == this.toUpperCase() && this != this.toLowerCase())
// jvm
actual val Char.isUpperCase: Boolean
get() = isUpperCase()
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3?email_source=notifications&email_token=AA3VMXM7WEPCA6Q52JNPIHLQ5LL5VA5CNFSM4KFWQ7Q2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IFSCURA>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA3VMXJNNMPTSXVNUF3EYMLQ5LL5VANCNFSM4KFWQ7QQ>
.
|
I assume the logging support will need fixing too. |
i would suggest kotlin-logging, not that there is much to replace.. |
I've undertaken making the project multi-platform. Won't happen instantly,
and happy for any help, but I am working on it in my free time.
…On Mon, Jan 13, 2020 at 1:30 AM NikkyAI ***@***.***> wrote:
i would suggest kotlin-logging, not that there is much to replace..
have a look at my port:
https://github.com/NikkyAI/pentagame/tree/a0311c68ade0dc768a539c6e8da6a8901682aa92/shared/src/commonMain/kotlin/com/github/nwillc/ksvg
and the Character.isUpperCase code here
https://github.com/NikkyAI/pentagame/blob/ca4215cdade3e9f8b3be5519365620952dd4c9bd/shared/src/jsMain/kotlin/isUpperCase.kt
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3?email_source=notifications&email_token=AA3VMXID7NS5DGFOQEE5GDDQ5QDAPA5CNFSM4KFWQ7Q2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIXU67Y#issuecomment-573525887>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA3VMXKHANONDBAOMLRG72DQ5QDAPANCNFSM4KFWQ7QQ>
.
|
I may have a working version. Would you be able to look at the
feature/multi-platform branch to review the JS work? I don't have
expertise to evaluate the JS bits.
…On Mon, Jan 13, 2020 at 9:42 PM ***@***.***> wrote:
I've undertaken making the project multi-platform. Won't happen
instantly, and happy for any help, but I am working on it in my free time.
On Mon, Jan 13, 2020 at 1:30 AM NikkyAI ***@***.***> wrote:
> i would suggest kotlin-logging, not that there is much to replace..
> have a look at my port:
> https://github.com/NikkyAI/pentagame/tree/a0311c68ade0dc768a539c6e8da6a8901682aa92/shared/src/commonMain/kotlin/com/github/nwillc/ksvg
> and the Character.isUpperCase code here
> https://github.com/NikkyAI/pentagame/blob/ca4215cdade3e9f8b3be5519365620952dd4c9bd/shared/src/jsMain/kotlin/isUpperCase.kt
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#3?email_source=notifications&email_token=AA3VMXID7NS5DGFOQEE5GDDQ5QDAPA5CNFSM4KFWQ7Q2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIXU67Y#issuecomment-573525887>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AA3VMXKHANONDBAOMLRG72DQ5QDAPANCNFSM4KFWQ7QQ>
> .
>
|
i assume with js specific code you mean the logging? it looks like it will work also 1.3.70-eap had some mindblowing improvements to the js side of things through experimentation i found out that this or something similar is required in the buildscript
without it the project using it will complain that ksvg is not configured for js |
I've accepted your PR. It's not the logging I'm worried about. I don't have a JS test harness to try things with and am struggling getting JS unit testing going. |
i can look into that also have similar problems of not knowing how to run tests in the browser |
seems like this is breaking things.. https://stackoverflow.com/questions/51475050/spaces-in-test-method-names-when-targeting-multiplatform TL;DR: cannot have spaces in testnames in commonTest because it cannot compile to js |
after fixing all the testnames with these errors are left over here jvm and js seem to sort
in addition to that there seem to be a handful failures that look like similar regex or sorting failures for the last few errors it seems like the regex might be acting up, i will open a PR again for the current progress |
The issues in the tests I believe are resolved. The sort order is now enforced and the other bits and pieces seem resolved. The JVM build artifacts now work with existing clients so I've merged the branch to master. I think the javascript is working but I still don't understand the packaging and how it would be used in an example. More to do there. |
Please see #10 for instructions on how to use this in a multiplatform project |
Is it possible to package this for multiplatform?
for my own project i just copied your code into my
commonMain
i use this with kotlin/js and react, but having it in common code leaves the option open to render stuff serverside too
seems like Chat.isUpperCase() does not exist on js so i solved it expect/actual, iirc this is the only problem i ran into
The text was updated successfully, but these errors were encountered: