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

Multiplatform support #29

Open
LaatonWalaBhoot opened this issue Nov 23, 2023 · 6 comments
Open

Multiplatform support #29

LaatonWalaBhoot opened this issue Nov 23, 2023 · 6 comments

Comments

@LaatonWalaBhoot
Copy link

As the title says. Provisions for KMP support by moving from OkHttp to Ktor
And Jsoup to https://github.com/fleeksoft/ksoup
I would be happy to provide a PR and contribute to this.
Would anyone be interested in helping out?

@chimbori
Copy link
Owner

Sounds like a good idea! The way I would like to think about this is,

  • There are already many users of this library that depend on JSoup & OkHttp, so moving to KSoup & Ktor should not be forced upon them. A separate published library (different coordinates) would be good, so that those that depend on the existing JSoup + OkHttp + Crux stack can continue to receive updates.
  • We should aim to have tests that ensure that the output from both is the same. KSoup is still maturing, and there may be behavior changes from JSoup.

@LaatonWalaBhoot
Copy link
Author

Would it not make it difficult to maintain?
Having to provide feature updates to both libraries? As far as I understand if we can achieve consistent behavior then dependents won't have any issues no?
Agree on the tests part.

@chimbori
Copy link
Owner

Crux exports both Jsoup and OkHttp as API dependencies, and also returns native JSoup objects. So moving to KSoup will be a breaking change for all clients.

Since many clients already use JSoup, we cannot reasonably expect everyone to fully move over to KSoup, even after it reaches full maturity.

@LaatonWalaBhoot
Copy link
Author

Do I publish the KMP library separately from this?
I will link it to Crux and give credits.
Or is there an alternative that you can propose since functionality will be almost similar?

@chimbori
Copy link
Owner

It’s possible to have two or more separate libraries published from the same repo; that seems like a preferable approach so that everything stays in one place, and still can be optionally imported by clients.

@LaatonWalaBhoot
Copy link
Author

@chimbori Have raised PR #30. Please take a look

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

No branches or pull requests

2 participants