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

Split korge-foundation and korge-core in submodules #2040

Open
soywiz opened this issue Nov 24, 2023 · 6 comments
Open

Split korge-foundation and korge-core in submodules #2040

soywiz opened this issue Nov 24, 2023 · 6 comments

Comments

@soywiz
Copy link
Member

soywiz commented Nov 24, 2023

Like the old libs, but for package name. Keeping korge-foundation and korge-core as a module without code linking to each module individually.

  • korge-time
  • korge-crypto
  • korge-datastructure
  • ...

So everything works as before but people can get the libraries segmented to what they need.

@soywiz
Copy link
Member Author

soywiz commented Nov 24, 2023

Do this after merging / discarding PRs to avoid conflicts.

@soywiz
Copy link
Member Author

soywiz commented Dec 14, 2023

I won't have time for this in the shorterm. If someone wants to contribute here, PRs are welcome.

  • korge-datastructure is already picked by holloszaboakos

If someone wants to contribute in this split with PRs, feel free to do so. You can put a comment here to avoid other people to doing the same work.

@holloszaboakos
Copy link
Contributor

We have a problem with circular dependency. We might have to do a bigger refactor than just separating the packages into modules

@holloszaboakos
Copy link
Contributor

holloszaboakos commented Dec 14, 2023

The math and the logger modules use the korlibs-datastructure, therefor we have circular dependency of gradle tasks and this problem is not solvable without gradle changes

@soywiz
Copy link
Member Author

soywiz commented Dec 14, 2023

@holloszaboakos it should be fine:

Just add commonMainApi(project(":korlibs-datastructure")) in korge-foundation/build.gradle.kts so the math and logger packages have access to it.

If something from other package is required into datastructure, just copy that functionality into an internal package and provide those functions/classes as internal so they are not exposed.

When logger and math are split into modules, they can just depend on korlibs-datastructure. And if it just uses a couple of functions, then we can do the same: copy them as internal functionality.

@holloszaboakos
Copy link
Contributor

That doesn't solve circular dependency problem (korlibs-datastructure also needs dependency for foundation). However as we already discussed on discord, we can duplicate code and make that internal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Pending
Development

No branches or pull requests

2 participants