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

chore(deps): update dependency com.squareup:kotlinpoet to v2 #584

Merged
merged 1 commit into from
Nov 30, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Oct 28, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
com.squareup:kotlinpoet 1.16.0 -> 2.0.0 age adoption passing confidence

Release Notes

square/kotlinpoet (com.squareup:kotlinpoet)

v2.0.0

Compare Source

Thanks to @​brokenhappy, @​tajobe, @​niyajali, @​ForteScarlet for contributing to this release.

This release is source- and binary-compatible with KotlinPoet 1.x.

The most important behavior change in this release is that spaces in generated code don't wrap by default anymore.

KotlinPoet 1.x used to replace space characters with newline characters whenever a given line of code exceeded the length limit. This usually led to better code formatting, but could also lead to compilation errors in generated code. Non-breaking spaces could be marked by the · character, but the discoverability of this feature wasn't great.

KotlinPoet 2.0 does not wrap spaces, even if the line of code they occur in exceeds the length limit. The newly introduced character can be used to mark spaces that are safe to wrap, which can improve code formatting. The · character has been preserved for compatibility, but its behavior is now equivalent to a regular space character.

  • New: Kotlin 2.0.10.
  • New: Spaces don't break by default.
  • New: New placeholder representing a space that is safe to wrap.
  • New: Add KSTypeAlias.toClassName(). (#​1956)
  • New: Add KSType.toClassNameOrNull(). (#​1956)
  • Fix: Enum classes that only have an init block now also generate the required semicolon. (#​1953)
  • Fix: Preserve typealiases in KSAnnotation.toAnnotationSpec(). (#​1956)
  • Fix: Preserve nullability in KSType.toClassName(). (#​1956)

v1.18.1

Compare Source

Thanks to @​mitasov-ra for contributing to this release.

  • Fix: Workaround for KT-18706: KotlinPoet now generates import aliases without backticks (#​1920).
// before, doesn't compile due to KT-18706
import com.example.one.`$Foo` as `One$Foo`
import com.example.two.`$Foo` as `Two$Foo`

// now, compiles
import com.example.one.`$Foo` as One__Foo
import com.example.two.`$Foo` as Two__Foo

v1.18.0

Compare Source

Thanks to @​DanielGronau for contributing to this release.

  • New: Kotlin 2.0.0.
  • New: KSP 2.0.0-1.0.22.
  • New: Promote kotlinpoet-metadata out of preview to stable.
  • New: Migrate kotlinpoet-metadata to stable org.jetbrains.kotlin:kotlin-metadata-jvm artifact for Metadata parsing.
  • New: Make enum entry references in KSAnnotation.toAnnotationSpec() and KSClassDeclaration.toClassName() more robust.
  • Fix: Don't expand typealiases of function types to LambdaTypeNames in KSTypeReference.toTypeName().
  • Fix: Avoid rounding small double and float values in %L translation (#​1927).
  • Fix: Fix typealias type argument resolution in KSP2 (#​1929).

v1.17.0

Compare Source

Thanks to @​jisungbin, @​hfhbd, @​evant, @​sgjesse, @​sebek64 for contributing to this release.

  • Change: kotlinx-metadata 0.9.0. Note that the KotlinClassMetadata.read is deprecated in 0.9.0 and replaced with readStrict (#​1830).
    • Note: we now also provide lenient parameters to map to the underlying readStrict() and readLenient() calls (#​1766).
    • We have also removed various Class/TypeElement/Metadata-to-KmClass APIs from the public API, as these are trivial to write now with kotlinx-metadata's newer APIs and allows us to focus the API surface area of this artifact better (#​1891).
  • New: Supertype list wraps to one-per-line if the primary constructor spans multiple lines (#​1866).
  • New: Extract MemberSpecHolder interface for constructs that can hold PropertySpecs and FunSpecs and their builders (#​1877).
  • New: joinToCode variant which operates on any type, but requires a transform lambda to convert each element into a CodeBlock (#​1874).
  • New: Support annotation type arguments in KSAnnotation.toAnnotationSpec() (#​1889).
  • Fix: Prevent name clashes between a function in class and a function call in current scope (#​1850).
  • Fix: Fix extension function imports (#​1814).
  • Fix: Omit implicit modifiers on FileSpec.scriptBuilder (#​1813).
  • Fix: Fix trailing newline in PropertySpec (#​1827).
  • Fix: KSAnnotation.toAnnotationSpec writes varargs in place instead of making them an array to work around a Kotlin issue with OptIn annotations (#​1833).
  • Fix: MemberNames without a package are now correctly imported (#​1841)
  • Fix: Throw if primary constructor delegates to other constructors (#​1859).
  • Fix: Aliased imports with nested class (#​1876).
  • Fix: Check for error types in KSType.toClassName() (#​1890).
  • Fix: Support generating a single import for overloaded MemberNames (#​1909).

Configuration

📅 Schedule: Branch creation - "before 4am on Monday" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Copy link

github-actions bot commented Oct 28, 2024

JUnit Tests (Linux, EnricoMi/publish-unit-test-result-action@v1)

245 tests  ±0   221 ✅ ±0   7m 52s ⏱️ -3s
 48 suites ±0    24 💤 ±0 
 48 files   ±0     0 ❌ ±0 

Results for commit a8e107e. ± Comparison against base commit 8662811.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Oct 28, 2024

JUnit Tests (macOS, EnricoMi/publish-unit-test-result-action@v1)

123 tests  ±0   111 ✅ ±0   4m 0s ⏱️ -54s
 24 suites ±0    12 💤 ±0 
 24 files   ±0     0 ❌ ±0 

Results for commit a8e107e. ± Comparison against base commit 8662811.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Oct 28, 2024

JUnit Tests (Windows, EnricoMi/publish-unit-test-result-action@v1)

245 tests  ±0   221 ✅ ±0   9m 22s ⏱️ +15s
 48 suites ±0    24 💤 ±0 
 48 files   ±0     0 ❌ ±0 

Results for commit a8e107e. ± Comparison against base commit 8662811.

♻️ This comment has been updated with latest results.

@renovate renovate bot force-pushed the renovate/major-kotlinpoet branch from 12038b3 to a8e107e Compare November 29, 2024 17:52
@renovate renovate bot force-pushed the renovate/major-kotlinpoet branch from b5243c4 to 7309536 Compare November 30, 2024 15:21
Copy link
Member

@orchestr7 orchestr7 left a comment

Choose a reason for hiding this comment

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

strange change, some duplication

@orchestr7 orchestr7 merged commit ac44d7e into main Nov 30, 2024
5 checks passed
@orchestr7 orchestr7 deleted the renovate/major-kotlinpoet branch November 30, 2024 15:21
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.

1 participant