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

KTOR-7606 Make Closable implement AutoCloseable #4414

Merged
merged 3 commits into from
Oct 28, 2024

Conversation

osipxd
Copy link
Member

@osipxd osipxd commented Oct 18, 2024

Subsystem
Core, ktor-ui

Motivation
Improve UX - make it possible to call AutoCloseable extensions on our Closeable type
KTOR-7606 Migrate to kotlin.AutoCloseable

Solution
Make Closable implement AutoCloseable. Use kotlin.use extension function instead of our implementation.
It's better to review commit-by-commit.

@osipxd osipxd requested a review from e5l October 18, 2024 12:45
@osipxd osipxd self-assigned this Oct 18, 2024
}
}
}
public expect interface Closeable : AutoCloseable
Copy link
Member Author

Choose a reason for hiding this comment

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

We could deprecate our Closable interface and remove it in a major update if it is unnecessary.

@osipxd osipxd marked this pull request as draft October 18, 2024 13:28
@osipxd osipxd marked this pull request as ready for review October 18, 2024 21:16
@osipxd osipxd merged commit 49c68e3 into 3.1.0-eap Oct 28, 2024
11 of 14 checks passed
@osipxd osipxd deleted the osipxd/stdlib-closable branch October 28, 2024 13:38
osipxd added a commit that referenced this pull request Oct 30, 2024
* Use stdlib `use` extension-function
* Update type checks
osipxd added a commit that referenced this pull request Oct 31, 2024
* Use stdlib `use` extension-function
* Update type checks
osipxd added a commit that referenced this pull request Nov 8, 2024
* Use stdlib `use` extension-function
* Update type checks
e5l pushed a commit that referenced this pull request Nov 13, 2024
* Use stdlib `use` extension-function
* Update type checks
e5l pushed a commit that referenced this pull request Nov 14, 2024
* Use stdlib `use` extension-function
* Update type checks
osipxd added a commit that referenced this pull request Nov 16, 2024
* Use stdlib `use` extension-function
* Update type checks
e5l pushed a commit that referenced this pull request Nov 19, 2024
* Use stdlib `use` extension-function
* Update type checks
osipxd added a commit that referenced this pull request Nov 22, 2024
* Use stdlib `use` extension-function
* Update type checks
e5l pushed a commit that referenced this pull request Nov 25, 2024
* Use stdlib `use` extension-function
* Update type checks
e5l pushed a commit that referenced this pull request Nov 26, 2024
* Use stdlib `use` extension-function
* Update type checks
e5l pushed a commit that referenced this pull request Nov 27, 2024
* Use stdlib `use` extension-function
* Update type checks
bjhham pushed a commit that referenced this pull request Nov 27, 2024
* Use stdlib `use` extension-function
* Update type checks
e5l pushed a commit that referenced this pull request Nov 28, 2024
* Use stdlib `use` extension-function
* Update type checks
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