-
Notifications
You must be signed in to change notification settings - Fork 448
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
Remove a bunch of warnings in arrow-2
#3282
Changes from all commits
ad08c57
5c81bd1
e471811
542d6b0
09ac5b6
6da6e17
1bc5581
aa35ab1
b9c7ab0
a139f36
54a980a
2cac2d1
002e742
d4eeaa4
cf4ea7a
dd4960d
024ca03
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,6 @@ tasks.jar { | |
} | ||
} | ||
|
||
tasks.withType<Test> { | ||
tasks.withType<Test>().configureEach { | ||
useJUnitPlatform() | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,6 @@ kotlin { | |
} | ||
} | ||
|
||
tasks.withType<Test> { | ||
tasks.withType<Test>().configureEach { | ||
useJUnitPlatform() | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -179,7 +179,7 @@ public value class NonEmptyList<out A> @PublishedApi internal constructor( | |
else -> head | ||
} | ||
|
||
@Suppress("OVERRIDE_BY_INLINE") | ||
@Suppress("OVERRIDE_BY_INLINE", "NOTHING_TO_INLINE") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @serras, so is this is actually inlining? I know Kotlin Std has There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure. The error I was getting was "performance of |
||
public override inline fun distinct(): NonEmptyList<A> = | ||
NonEmptyList(all.distinct()) | ||
|
||
|
@@ -340,6 +340,7 @@ public fun <A> nonEmptyListOf(head: A, vararg t: A): NonEmptyList<A> = | |
NonEmptyList(listOf(head) + t) | ||
|
||
@JvmName("nel") | ||
@Suppress("NOTHING_TO_INLINE") | ||
public inline fun <A> A.nel(): NonEmptyList<A> = | ||
NonEmptyList(listOf(this)) | ||
|
||
|
@@ -355,9 +356,11 @@ public inline fun <A, B : Comparable<B>> NonEmptyList<A>.minBy(selector: (A) -> | |
public inline fun <A, B : Comparable<B>> NonEmptyList<A>.maxBy(selector: (A) -> B): A = | ||
maxByOrNull(selector)!! | ||
|
||
@Suppress("NOTHING_TO_INLINE") | ||
public inline fun <T : Comparable<T>> NonEmptyList<T>.min(): T = | ||
minOrNull()!! | ||
|
||
@Suppress("NOTHING_TO_INLINE") | ||
public inline fun <T : Comparable<T>> NonEmptyList<T>.max(): T = | ||
maxOrNull()!! | ||
|
||
|
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 highly recommend to keep the
configureEach
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.
Any particular reason for this? (Gradle is all magic to me)
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.
Yep,
configureEach
is lazy, the other isn't. If I remember correctly, it is callingall
under the hood.I hope they mark all of those APIs as deprecated in Gradle 9.