Skip to content
This repository has been archived by the owner on Aug 10, 2021. It is now read-only.

Common StringBuilder #3593

Merged
merged 1 commit into from
Dec 4, 2019

Conversation

qurbonzoda
Copy link
Contributor

No description provided.

@qurbonzoda qurbonzoda requested a review from ilya-g November 19, 2019 21:37
@qurbonzoda
Copy link
Contributor Author

The base branch for this PR will be changed to master.

@qurbonzoda qurbonzoda requested a review from olonho November 19, 2019 21:39
* @throws IndexOutOfBoundsException or [IllegalArgumentException] when [start] or [end] is out of range of the [csq] character sequence indices or when `start > end`.
* @throws IndexOutOfBoundsException if [index] is less than zero or greater than the length of this string builder.
*/
@Deprecated("Renamed to `insertRange`", ReplaceWith("insertRange(indexm csq, start, end)"), DeprecationLevel.WARNING)
Copy link
Member

Choose a reason for hiding this comment

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

It seems too soon to deprecate the existing members in favor of experimental API.
So we should either remove deprecation here, or remove experimentality on those replacements.

Copy link
Member

@ilya-g ilya-g Nov 19, 2019

Choose a reason for hiding this comment

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

Also a typo in replacement.

Suggested change
@Deprecated("Renamed to `insertRange`", ReplaceWith("insertRange(indexm csq, start, end)"), DeprecationLevel.WARNING)
@Deprecated("Renamed to `insertRange`", ReplaceWith("insertRange(index, csq, start, end)"), DeprecationLevel.WARNING)

Copy link
Contributor

Choose a reason for hiding this comment

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

Is it perf tested?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No. There are no insert benchmarks for StringBuilder. Do you suppose the additional function invocation introduced tangible performance overhead?

Copy link
Contributor

Choose a reason for hiding this comment

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

StringBuilder is very performance sensitive, we need to ensure that there's no regressions here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did benchmark StringBuilder methods, there are no regressions there.

@olonho
Copy link
Contributor

olonho commented Nov 26, 2019

Hm, but why all tests/builds fail?

@ilya-g
Copy link
Member

ilya-g commented Nov 29, 2019

@olonho It's intended to be merged into kotlin-mirror/master branch together with stdlib-common changes, so we're watching over the composite build: https://buildserver.labs.intellij.net/buildConfiguration/Kotlin_KotlinDev_SanityTestKotlinNativeLinuxComposite?branch=rr%2Fstdlib%2Fcommon-string-builder

However, it doesn't pass either. @qurbonzoda Could you rebase your changes onto the latest master and kotlin-mirror/master, where the composite build is apparently green?

@qurbonzoda qurbonzoda force-pushed the rr/stdlib/common-string-builder branch 2 times, most recently from f8a23f2 to 90ae0ba Compare December 2, 2019 15:57
@qurbonzoda qurbonzoda force-pushed the rr/stdlib/common-string-builder branch from dc2dec5 to c4e62e1 Compare December 4, 2019 19:50
@qurbonzoda qurbonzoda merged commit a79c9c3 into kotlin-mirror/master Dec 4, 2019
@qurbonzoda qurbonzoda mentioned this pull request Dec 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants