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

Move kotlinx.io.files package to a separate module #411

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

fzhinkin
Copy link
Collaborator

@fzhinkin fzhinkin commented Oct 30, 2024

Move all filesystem-related functionality to a separate module.

While the library itself is getting closer to stabilization, kotlinx.io.files is getting closer to a trash bin.
There's no way existing filesystem-related functionality will be stabilized. Instead it will be deprecated and replaced with a (hopefully) better API.

With a separate module, it'll be easier to manage different stability and depreciation levels.

Closes #319

@whyoleg
Copy link
Contributor

whyoleg commented Oct 30, 2024

JIC: there is one usage of kotlinx.io.files in ktor production code (not in tests) blindly (not thinking about consequences) introduced by myself in ktorio/ktor#4192
It was needed to not reimplement this from scratch (or copy from kotlinx-io) for js/wasm-js targets - previously it was just expect/actual
Probably it's better to drop this usage in ktor to avoid breaking changes? cc @e5l

@fzhinkin
Copy link
Collaborator Author

In short term, the change should not break Ktor as long as a new artifact is added to dependencies.

Base automatically changed from 408-make-segment-properties-public to develop November 6, 2024 14:30
@fzhinkin fzhinkin force-pushed the 319-move-fs-to-separate-package branch from 3f3ca2f to 1e1544e Compare November 26, 2024 20:44
@fzhinkin fzhinkin marked this pull request as ready for review November 26, 2024 21:04
@fzhinkin
Copy link
Collaborator Author

One of the questions still opened for me is the name of a new module. It should include something like -legacy in its name. Otherwise, we'll have to put the future filesystem API into kotlinx-io-filesystem-2/kotlinx-io-filesystem-new module 😞 .

WDYT?

Copy link
Contributor

@shanshin shanshin left a comment

Choose a reason for hiding this comment

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

LGTM

@shanshin
Copy link
Contributor

shanshin commented Dec 3, 2024

One of the questions still opened for me is the name of a new module. It should include something like -legacy in its name. Otherwise, we'll have to put the future filesystem API into kotlinx-io-filesystem-2/kotlinx-io-filesystem-new module

if we create a module with a different name, will we have two filesystem modules with a different name at the same time?
Why can't we use different package names?

@fzhinkin
Copy link
Collaborator Author

fzhinkin commented Dec 3, 2024

@shanshin

if we create a module with a different name, will we have two filesystem modules with a different name at the same time?

Yes, we will.

Why can't we use different package names?

It's always an option.

@fzhinkin
Copy link
Collaborator Author

fzhinkin commented Dec 9, 2024

One of the questions still opened for me is the name of a new module. It should include something like -legacy in its name. Otherwise, we'll have to put the future filesystem API into kotlinx-io-filesystem-2/kotlinx-io-filesystem-new module 😞 .

Ok, so we'll have to use different package names anyway and having both the legacy and a new API inside a single module will ease the migration as we'll be able to supply deprecation with a meaningful replacement expression.

@fzhinkin fzhinkin force-pushed the 319-move-fs-to-separate-package branch from b335f42 to bf8393b Compare December 10, 2024 15:49
@fzhinkin
Copy link
Collaborator Author

Ok, the current approach with the module (and its name) looks fine: we'll add a new API into it, that'll unlock easier migration compared to two separate artifacts.

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.

3 participants