https://kotlinlang.org logo
#kotest
Title
# kotest
j

Jerry Preissler

04/29/2021, 5:41 PM
The plugin was updated today to 1.1.34-IC-202, kotest_version=4.4.3
s

sam

04/29/2021, 6:25 PM
What spec style are you using ?
j

Jerry Preissler

04/29/2021, 6:26 PM
StringSpec.
s

sam

04/29/2021, 6:27 PM
It's possible something broke in the latest plugin - can you rollback and I'll fix and re-release
j

Jerry Preissler

04/29/2021, 6:27 PM
This is an example:
Copy code
class BookBuilderTest : StringSpec( {
        val book = Book(
            isbn = "1234"
        )
        "Canary test should pass" {
            true shouldBe true
        }
        "Instantiating Book should work" {
            book.isbn shouldBe  "1234"
        }
        "Updating a book with another book should work" {
            val builder = BookBuilder()
            builder.data.author should beEmpty()
            val update = Book(author = "Feynstein")
            builder.updateData(update)
            builder.data.author shouldBe "Feynstein"
        }
})
You mean roll back the plugin to the version before Apr 28?
s

sam

04/29/2021, 6:28 PM
yep
1.1.31 I think
j

Jerry Preissler

04/29/2021, 6:31 PM
I just noticed that I have a plugin named kotlintest installed that seems to be abandoned. Could that be the cause?
s

sam

04/29/2021, 6:31 PM
kotlintest was the previous name of the project, but it was changed last april
so you should uninstall the kotlintest plugin and install the kotest one
j

Jerry Preissler

04/29/2021, 6:32 PM
I had both installed somehow. I've just removed the old one.
s

sam

04/29/2021, 6:32 PM
ok let me know if it's fixed
j

Jerry Preissler

04/29/2021, 6:32 PM
Testing right now
👍🏻 1
s

sam

04/29/2021, 6:36 PM
I get this on latest plugin FYI
j

Jerry Preissler

04/29/2021, 6:37 PM
That's how it used to look in my installation, too.
Ok, I've uninstalled the kotlintest plugin.
Gutter icons still missing, and I get an error on Startup. Root cause seems to be
Caused by: java.lang.IllegalStateException: KotlinExactPackageIndex seems corrupted.
I've got the full stacktrace if you're interested.
s

sam

04/29/2021, 6:38 PM
try file menu -> invalidate caches
(or whatever menu it might be on a mac)
seems like the cache for that project is corrupt
j

Jerry Preissler

04/29/2021, 6:39 PM
I'm on Linux.
s

sam

04/29/2021, 6:39 PM
ok same as me
file -> invalidate caches
j

Jerry Preissler

04/29/2021, 6:39 PM
Ok, that helped with the error on startup. Thanks.
s

sam

04/29/2021, 6:39 PM
restart intellij, and intellij will rebuild its local cache
j

Jerry Preissler

04/29/2021, 6:40 PM
Still no luck with the icons.
s

sam

04/29/2021, 6:40 PM
and if that doesn't work, I'll take a look at the stack trace
is intellij recaching? It should take a minute
also what version of intellij are you on
j

Jerry Preissler

04/29/2021, 6:40 PM
Seems to be idle. I'll try to rebuild my gradle project.
s

sam

04/29/2021, 6:41 PM
did you check both boxes btw on the invalidate
j

Jerry Preissler

04/29/2021, 6:41 PM
Yes, both boxes checked. The error on startup is gone.
Intellij version is 2021.1 Ultimate. The build from April 6. Sorry, I seem to dumb to take a screenshot of the dialog box.
I'll try to downgrade the kotest plugin now
s

sam

04/29/2021, 6:45 PM
🙂
one min
before you do that
Copy code
class BookBuilderTest2 : FunSpec({
   test("Canary test should pass") {
      true shouldBe true
   }
})
can you paste this in
so we can see if it's just string spec
or any test suite
j

Jerry Preissler

04/29/2021, 6:45 PM
Sure. One sec.
Oh. The icons are back.
s

sam

04/29/2021, 6:46 PM
heh
on string spec too ?
j

Jerry Preissler

04/29/2021, 6:46 PM
Seems like it was still indexing in the background.
s

sam

04/29/2021, 6:46 PM
yeah the invalidate does take a few minutes usually
j

Jerry Preissler

04/29/2021, 6:47 PM
Yes, I see them for both StringSpec and FunSpec now.
s

sam

04/29/2021, 6:47 PM
awesome
j

Jerry Preissler

04/29/2021, 6:48 PM
Yep, everything seems to work again. Awesome, thanks for your help!
👍 1
👍🏻 1
2 Views