-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix deprecation warnings and enable warningsAsErrors for buildSrc #4464
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
base: develop
Are you sure you want to change the base?
Conversation
67f3371
to
8c3070a
Compare
K/JS related deprecation warnings are to be promoted to error within KT-68597 in Kotlin 2.2
8c3070a
to
dc6d37b
Compare
val currentValue = downloadBaseUrl.orNull | ||
if (currentValue != null) { | ||
downloadBaseUrl = CacheRedirector.maybeRedirect(currentValue) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this not be written like it was before? That is,
val currentValue = downloadBaseUrl.orNull | |
if (currentValue != null) { | |
downloadBaseUrl = CacheRedirector.maybeRedirect(currentValue) | |
} | |
} | |
downloadBaseUrl.orNull?.let { | |
downloadBaseUrl = CacheRedirector.maybeRedirect(it) | |
} | |
} |
I'd expect this to be a pure Kotlin construction, without any relation to what Gradle supports or doesn't support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, it can be. If you prefer this style – I can update it. The comment above relates to the fact that orNull
resolves the value of the property eagerly instead of applying a dynamic transformator on it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I somewhat prefer the current style, but it's not important. I just got confused about what part of the change was important and which accidental.
val currentValue = downloadBaseUrl.orNull | ||
if (currentValue != null) { | ||
downloadBaseUrl = CacheRedirector.maybeRedirect(currentValue) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I somewhat prefer the current style, but it's not important. I just got confused about what part of the change was important and which accidental.
K/JS related deprecation warnings are to be promoted to error within KT-68597 in Kotlin 2.2