Skip to content

Conversation

@sgammon
Copy link
Member

@sgammon sgammon commented Jul 20, 2025

Ready for review Powered by Pull Request Badge

Summary

Adds support for Kotlin Power Assert when running elide test ... on Kotlin code. Continuance of #1374.

Before

Screenshot 2025-07-20 at 2 14 36 AM

After

Screenshot 2025-07-20 at 2 11 09 AM

@sgammon sgammon added this to the Release R18: Beta milestone Jul 20, 2025
@sgammon sgammon requested a review from a team July 20, 2025 09:15
@sgammon sgammon self-assigned this Jul 20, 2025
@sgammon sgammon added this to Elide Jul 20, 2025
@sgammon sgammon added feature Large PRs or issues with full-blown features lang:kotlin Related to Kotlin lang support tools:test-runner Stuff relating to Elide's test runner labels Jul 20, 2025
@sgammon sgammon mentioned this pull request Jul 20, 2025
29 tasks
@sgammon sgammon moved this to Done in Elide Jul 20, 2025
@codecov
Copy link

codecov bot commented Jul 20, 2025

Codecov Report

Attention: Patch coverage is 40.62500% with 19 lines in your changes missing coverage. Please review.

Project coverage is 39.86%. Comparing base (bf64335) to head (f202ad9).

Files with missing lines Patch % Lines
...n/elide/runtime/gvm/kotlin/KotlinCompilerConfig.kt 56.52% 10 Missing ⚠️
...main/kotlin/elide/tooling/kotlin/KotlinCompiler.kt 0.00% 5 Missing ⚠️
...n/kotlin/elide/tooling/jvm/JvmBuildConfigurator.kt 0.00% 2 Missing ⚠️
...kotlin/elide/tool/cli/cmd/repl/ToolShellCommand.kt 0.00% 1 Missing ⚠️
...e/tooling/project/manifest/ElidePackageManifest.kt 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1565      +/-   ##
==========================================
+ Coverage   39.80%   39.86%   +0.06%     
==========================================
  Files         769      769              
  Lines       37004    37010       +6     
  Branches     5235     5230       -5     
==========================================
+ Hits        14729    14754      +25     
+ Misses      20510    20489      -21     
- Partials     1765     1767       +2     
Flag Coverage Δ
jvm 39.86% <40.62%> (+0.06%) ⬆️
lib 39.86% <40.62%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...kotlin/elide/tool/cli/cmd/repl/ToolShellCommand.kt 32.47% <0.00%> (+0.73%) ⬆️
...e/tooling/project/manifest/ElidePackageManifest.kt 11.96% <0.00%> (ø)
...n/kotlin/elide/tooling/jvm/JvmBuildConfigurator.kt 0.00% <0.00%> (ø)
...main/kotlin/elide/tooling/kotlin/KotlinCompiler.kt 0.00% <0.00%> (ø)
...n/elide/runtime/gvm/kotlin/KotlinCompilerConfig.kt 41.93% <56.52%> (+20.26%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bf64335...f202ad9. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sgammon sgammon force-pushed the feat/kt-power-assert branch from d0bc204 to aed5cc7 Compare July 20, 2025 09:34
@sgammon sgammon requested a review from Copilot July 20, 2025 09:34

This comment was marked as outdated.

@sgammon sgammon force-pushed the feat/kt-power-assert branch 3 times, most recently from 31c097f to bc62252 Compare July 20, 2025 09:48
@sgammon sgammon requested a review from Copilot July 20, 2025 09:52
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for Kotlin Power Assert functionality to the Elide testing framework, enabling enhanced assertion output with detailed breakdowns when tests fail. The implementation integrates the Power Assert compiler plugin into the Kotlin compilation pipeline for improved test debugging experience.

  • Integration of kotlin-power-assert-compiler-plugin-embeddable into build dependencies
  • Configuration of Power Assert plugin with predefined assertion functions from kotlin.test
  • Updates to compiler configuration to enable Power Assert by default for test builds

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
gradle/elide.versions.toml Adds kotlin-powerAssert-embedded dependency reference
packages/graalvm-kt/build.gradle.kts Includes Power Assert plugin in dependencies and embedded resources
packages/builder/build.gradle.kts Adds Power Assert plugin dependency to builder module
packages/graalvm-kt/src/main/kotlin/elide/runtime/gvm/kotlin/KotlinCompilerConfig.kt Implements Power Assert plugin configuration with function symbols and refactors plugin initialization
packages/builder/src/main/kotlin/elide/tooling/kotlin/KotlinCompiler.kt Integrates Power Assert processor and adds enablePowerAssert parameter
packages/builder/src/main/kotlin/elide/tooling/jvm/JvmBuildConfigurator.kt Updates plugin enablement logic from explicit true checks to false checks
packages/tooling/src/main/kotlin/elide/tooling/project/manifest/ElidePackageManifest.kt Enables experimental features by default
packages/builder/api/builder.api Updates API signature for configureDefaultPlugins method
packages/cli/src/main/kotlin/elide/tool/cli/cmd/repl/ToolShellCommand.kt Improves test failure output formatting
packages/cli/src/projects/ktjvm/src/test/kotlin/sample/testGreeting.kt Updates test expectation to demonstrate Power Assert functionality
Comments suppressed due to low confidence (1)

feat(cli): make kotlin plugins non-experimental
feat(graalvm-kt): powerassert embedded deps
feat(graalvm-kt): powerassert built-in
chore: update pins for `tooling`/`builder`

Signed-off-by: Sam Gammon <sam@elide.ventures>
@sgammon sgammon force-pushed the feat/kt-power-assert branch from bc62252 to f202ad9 Compare July 20, 2025 09:54
@sgammon sgammon merged commit 593a344 into main Jul 20, 2025
18 checks passed
@sgammon sgammon mentioned this pull request Sep 21, 2025
31 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Large PRs or issues with full-blown features lang:kotlin Related to Kotlin lang support tools:test-runner Stuff relating to Elide's test runner

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants