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

Kotlin compiler cannot compile table using 8 columns #2444

Closed
renatoathaydes opened this issue Aug 28, 2021 · 2 comments
Closed

Kotlin compiler cannot compile table using 8 columns #2444

renatoathaydes opened this issue Aug 28, 2021 · 2 comments

Comments

@renatoathaydes
Copy link

kotlinVersion = 1.5.21
kotestVersion = 4.6.2

This code does not compile after I upgraded from old io.kotlintest:kotlintest:2.0.7:

typealias UriExample = Row8<String, String?, String?, String?, Int, String?, String?, String?>

    @Test
    fun canParseURIsNonLenient() {
        val table = table(
            headers("URI spec", "scheme", "userInfo", "host", "port", "path", "query", "fragment"),
            UriExample("hi", "http", null, "hi", -1, "", null, null),
            UriExample(
                "/hello?encoded=%2F%2Fencoded%3Fa%3Db%26c%3Dd&json=%7B%22a%22%3A%20null%7D", "http",
                null, null, -1, "/hello",
                "encoded=%2F%2Fencoded%3Fa%3Db%26c%3Dd&json=%7B%22a%22%3A%20null%7D", null
            )

        )

        forAll(table) { uriSpec, scheme, userInfo, host, port, path, query, fragment ->

        }
    }

ERROR:

> Task :rawhttp-core:compileTestKotlin FAILED
e: /Users/renato/programming/projects/rawhttp/rawhttp-core/src/test/kotlin/rawhttp/core/HttpMetadataParserTest.kt: (354, 9): None of the following functions can be called with the arguments supplied: 
public inline fun <A> forAll(table: Table1<TypeVariable(A)>, testfn: (TypeVariable(A)) -> Unit): Unit defined in io.kotest.data
public inline fun <A, B> forAll(table: Table2<TypeVariable(A), TypeVariable(B)>, testfn: (TypeVariable(A), TypeVariable(B)) -> Unit): Unit defined in io.kotest.data
public inline fun <A, B, C> forAll(table: Table3<TypeVariable(A), TypeVariable(B), TypeVariable(C)>, testfn: (TypeVariable(A), TypeVariable(B), TypeVariable(C)) -> Unit): Unit defined in io.kotest.data
public inline fun <A, B, C, D> forAll(table: Table4<TypeVariable(A), TypeVariable(B), TypeVariable(C), TypeVariable(D)>, testfn: (TypeVariable(A), TypeVariable(B), TypeVariable(C), TypeVariable(D)) -> Unit): Unit defined in io.kotest.data
public inline fun <A, B, C, D, E> forAll(table: Table5<TypeVariable(A), TypeVariable(B), TypeVariable(C), TypeVariable(D), TypeVariable(E)>, testfn: (TypeVariable(A), TypeVariable(B), TypeVariable(C), TypeVariable(D), TypeVariable(E)) -> Unit): Unit defined in io.kotest.data
public inline fun <A, B, C, D, E, F> forAll(table: Table6<TypeVariable(A), TypeVariable(B), TypeVariable(C), TypeVariable(D), TypeVariable(E), TypeVariable(F)>, testfn: (TypeVariable(A), TypeVariable(B), TypeVariable(C), TypeVariable(D), TypeVariable(E), TypeVariable(F)) -> Unit): Unit defined in io.kotest.data
public inline fun <A, B, C, D, E, F, G> forAll(table: Table7<TypeVariable(A), TypeVariable(B), TypeVariable(C), TypeVariable(D), TypeVariable(E), TypeVariable(F), TypeVariable(G)>, testfn: (TypeVariable(A), TypeVariable(B), TypeVariable(C), TypeVariable(D), TypeVariable(E), TypeVariable(F), TypeVariable(G)) -> Unit): Unit defined in io.kotest.data
public suspend fun <A> forAll(vararg rows: Row1<TypeVariable(A)>, testfn: suspend (TypeVariable(A)) -> Unit): Unit defined in io.kotest.data
public suspend fun <A, B> forAll(vararg rows: Row2<TypeVariable(A), TypeVariable(B)>, testfn: suspend (TypeVariable(A), TypeVariable(B)) -> Unit): Unit defined in io.kotest.data
public suspend fun <A, B, C> forAll(vararg rows: Row3<TypeVariable(A), TypeVariable(B), TypeVariable(C)>, testfn: suspend (TypeVariable(A), TypeVariable(B), TypeVariable(C)) -> Unit): Unit defined in io.kotest.data
public suspend fun <A, B, C, D> forAll(vararg rows: Row4<TypeVariable(A), TypeVariable(B), TypeVariable(C), TypeVariable(D)>, testfn: suspend (TypeVariable(A), TypeVariable(B), TypeVariable(C), TypeVariable(D)) -> Unit): Unit defined in io.kotest.data
public suspend fun <A, B, C, D, E> forAll(vararg rows: Row5<TypeVariable(A), TypeVariable(B), TypeVariable(C), TypeVariable(D), TypeVariable(E)>, testfn: suspend (TypeVariable(A), TypeVariable(B), TypeVariable(C), TypeVariable(D), TypeVariable(E)) -> Unit): Unit defined in io.kotest.data
public suspend fun <A, B, C, D, E, F> forAll(vararg rows: Row6<TypeVariable(A), TypeVariable(B), TypeVariable(C), TypeVariable(D), TypeVariable(E), TypeVariable(F)>, testfn: suspend (TypeVariable(A), TypeVariable(B), TypeVariable(C), TypeVariable(D), TypeVariable(E), TypeVariable(F)) -> Unit): Unit defined in io.kotest.data
public suspend fun <A, B, C, D, E, F, G> forAll(vararg rows: Row7<TypeVariable(A), TypeVariable(B), TypeVariable(C), TypeVariable(D), TypeVariable(E), TypeVariable(F), TypeVariable(G)>, testfn: suspend (TypeVariable(A), TypeVariable(B), TypeVariable(C), TypeVariable(D), TypeVariable(E), TypeVariable(F), TypeVariable(G)) -> Unit): Unit defined in io.kotest.data
e: /Users/renato/programming/projects/rawhttp/rawhttp-core/src/test/kotlin/rawhttp/core/HttpMetadataParserTest.kt: (400, 9): None of the following functions can be called with the arguments supplied: 
public inline fun <A> forAll(table: Table1<TypeVariable(A)>, testfn: (TypeVariable(A)) -> Unit): Unit defined in io.kotest.data
public inline fun <A, B> forAll(table: Table2<TypeVariable(A), TypeVariable(B)>, testfn: (TypeVariable(A), TypeVariable(B)) -> Unit): Unit defined in io.kotest.data
public inline fun <A, B, C> forAll(table: Table3<TypeVariable(A), TypeVariable(B), TypeVariable(C)>, testfn: (TypeVariable(A), TypeVariable(B), TypeVariable(C)) -> Unit): Unit defined in io.kotest.data
public inline fun <A, B, C, D> forAll(table: Table4<TypeVariable(A), TypeVariable(B), TypeVariable(C), TypeVariable(D)>, testfn: (TypeVariable(A), TypeVariable(B), TypeVariable(C), TypeVariable(D)) -> Unit): Unit defined in io.kotest.data
public inline fun <A, B, C, D, E> forAll(table: Table5<TypeVariable(A), TypeVariable(B), TypeVariable(C), TypeVariable(D), TypeVariable(E)>, testfn: (TypeVariable(A), TypeVariable(B), TypeVariable(C), TypeVariable(D), TypeVariable(E)) -> Unit): Unit defined in io.kotest.data
public inline fun <A, B, C, D, E, F> forAll(table: Table6<TypeVariable(A), TypeVariable(B), TypeVariable(C), TypeVariable(D), TypeVariable(E), TypeVariable(F)>, testfn: (TypeVariable(A), TypeVariable(B), TypeVariable(C), TypeVariable(D), TypeVariable(E), TypeVariable(F)) -> Unit): Unit defined in io.kotest.data
public inline fun <A, B, C, D, E, F, G> forAll(table: Table7<TypeVariable(A), TypeVariable(B), TypeVariable(C), TypeVariable(D), TypeVariable(E), TypeVariable(F), TypeVariable(G)>, testfn: (TypeVariable(A), TypeVariable(B), TypeVariable(C), TypeVariable(D), TypeVariable(E), TypeVariable(F), TypeVariable(G)) -> Unit): Unit defined in io.kotest.data
public suspend fun <A> forAll(vararg rows: Row1<TypeVariable(A)>, testfn: suspend (TypeVariable(A)) -> Unit): Unit defined in io.kotest.data
public suspend fun <A, B> forAll(vararg rows: Row2<TypeVariable(A), TypeVariable(B)>, testfn: suspend (TypeVariable(A), TypeVariable(B)) -> Unit): Unit defined in io.kotest.data
public suspend fun <A, B, C> forAll(vararg rows: Row3<TypeVariable(A), TypeVariable(B), TypeVariable(C)>, testfn: suspend (TypeVariable(A), TypeVariable(B), TypeVariable(C)) -> Unit): Unit defined in io.kotest.data
public suspend fun <A, B, C, D> forAll(vararg rows: Row4<TypeVariable(A), TypeVariable(B), TypeVariable(C), TypeVariable(D)>, testfn: suspend (TypeVariable(A), TypeVariable(B), TypeVariable(C), TypeVariable(D)) -> Unit): Unit defined in io.kotest.data
public suspend fun <A, B, C, D, E> forAll(vararg rows: Row5<TypeVariable(A), TypeVariable(B), TypeVariable(C), TypeVariable(D), TypeVariable(E)>, testfn: suspend (TypeVariable(A), TypeVariable(B), TypeVariable(C), TypeVariable(D), TypeVariable(E)) -> Unit): Unit defined in io.kotest.data
public suspend fun <A, B, C, D, E, F> forAll(vararg rows: Row6<TypeVariable(A), TypeVariable(B), TypeVariable(C), TypeVariable(D), TypeVariable(E), TypeVariable(F)>, testfn: suspend (TypeVariable(A), TypeVariable(B), TypeVariable(C), TypeVariable(D), TypeVariable(E), TypeVariable(F)) -> Unit): Unit defined in io.kotest.data
public suspend fun <A, B, C, D, E, F, G> forAll(vararg rows: Row7<TypeVariable(A), TypeVariable(B), TypeVariable(C), TypeVariable(D), TypeVariable(E), TypeVariable(F), TypeVariable(G)>, testfn: suspend (TypeVariable(A), TypeVariable(B), TypeVariable(C), TypeVariable(D), TypeVariable(E), TypeVariable(F), TypeVariable(G)) -> Unit): Unit defined in io.kotest.data

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':rawhttp-core:compileTestKotlin'.
> Compilation error. See log for more details

@sksamuel
Copy link
Member

Looks like 8 might be missing. We can add it and release 4.6.3

@sksamuel
Copy link
Member

4.6.3 has been released which fixes this.

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

No branches or pull requests

2 participants