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

Update dependency com.squareup:kotlinpoet to v2 #337

Merged
merged 2 commits into from
Nov 1, 2024

Conversation

juul-mobile-bot
Copy link
Contributor

This PR contains the following updates:

Package Type Update Change
com.squareup:kotlinpoet dependencies major 1.18.1 -> 2.0.0

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)

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

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

Rebasing: Whenever PR becomes conflicted, 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 has been generated by Renovate Bot.

@juul-mobile-bot juul-mobile-bot force-pushed the renovate/com.squareup-kotlinpoet-2.x branch from 020e1f7 to ff05047 Compare November 1, 2024 09:05
@cedrickcooke cedrickcooke self-assigned this Nov 1, 2024
@cedrickcooke
Copy link
Collaborator

Tests are failing due to formatting changes in Kotlin Poet. These aren't structural code changes, just whitespace, but the tests we have are over-strict there.

Copy link

github-actions bot commented Nov 1, 2024

Test Results

 5 files  ±0   5 suites  ±0   18s ⏱️ -1s
17 tests ±0  17 ✅ ±0  0 💤 ±0  0 ❌ ±0 
19 runs  ±0  19 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 50af3d7. ± Comparison against base commit 32b14f8.

@cedrickcooke cedrickcooke merged commit 471ab06 into main Nov 1, 2024
3 checks passed
@cedrickcooke cedrickcooke deleted the renovate/com.squareup-kotlinpoet-2.x branch November 1, 2024 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants