Skip to content

Conversation

@skydoves
Copy link
Owner

@skydoves skydoves commented Nov 2, 2025

Add IntelliJ plugin & module tests.

Summary by CodeRabbit

  • Chores
    • Added CI workflow to build, test, and verify the IntelliJ plugin across multiple IDE versions with a publish-check on main.
    • Added module-level test automation for compiler, runtime, Gradle plugin, and lint with failure-report uploads and an integration publish/verify step.
    • Updated build configuration to include the Kotlin standard library and adjust compiler/test dependencies to streamline builds.

@skydoves skydoves self-assigned this Nov 2, 2025
@coderabbitai
Copy link

coderabbitai bot commented Nov 2, 2025

Walkthrough

Adds two GitHub Actions workflows (IntelliJ plugin CI and module tests) configuring JDK 21 (Zulu), Gradle caching, and artifact/test-result uploads; extends the Gradle version catalog with kotlin-stdlib; updates stability-compiler to depend on the cataloged stdlib and removes Compose compiler and kotlin-compile-testing test deps.

Changes

Cohort / File(s) Summary
CI/CD Workflows
\.github/workflows/intellij-plugin.yml, \.github/workflows/module-tests.yml
New workflows: IntelliJ Plugin workflow with build/test/compatibility/publish-check jobs (compatibility uses an IDE-version matrix 2024.1/2024.2/2024.3 and continues on error; publish-check runs on pushes to main and performs a dry-run publish-check); Module Tests workflow with parallel module test jobs and an integration-test that publishes to and verifies Maven Local. Both set up JDK 21 (Zulu), use Gradle caching, grant gradlew execute permission, build dependencies, and conditionally upload test reports on failure.
Gradle Version Catalog
gradle/libs.versions.toml
Added kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }.
Stability Compiler Build
stability-compiler/build.gradle.kts
Added compileOnly(libs.kotlin.stdlib); removed compileOnly(libs.androidx.compose.compiler), testImplementation(libs.androidx.compose.compiler), and testImplementation("com.github.tschuchortdev:kotlin-compile-testing:1.6.0").

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Dev as Developer/Push
  participant GH as GitHub Actions
  participant Runner as Runner (ubuntu, JDK 21 Zulu)
  participant Gradle as Gradle (with cache)
  participant IDE as IntelliJ IDE Matrix

  Dev->>GH: push / PR triggers workflows
  GH->>Runner: start job (checkout, setup JDK 21 Zulu, gradle cache, chmod gradlew)
  Runner->>Gradle: build project / dependencies (e.g. :stability-runtime)
  alt IntelliJ Plugin workflow
    GH->>IDE: matrix (2024.1,2024.2,2024.3) — build plugin for each IDE (continue-on-error)
    IDE->>Gradle: build plugin artifacts
    Gradle->>GH: upload artifacts/results
    GH->>Dev: artifact links, status
  else Module Tests workflow
    par Parallel module jobs
      Runner->>Gradle: run module-specific build/test tasks
      Gradle->>GH: upload test reports on failure
    end
    Runner->>Gradle: integration-test publishes to Maven Local and verifies artifacts
    Gradle->>GH: upload integration results
    GH->>Dev: test reports, status
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Inspect IntelliJ compatibility matrix (versions and continue-on-error) and publish-check trigger/steps.
  • Verify consistent JDK 21 (Zulu) and Gradle caching across jobs.
  • Review integration-test publish to and verification of Maven Local.
  • Confirm removing compose and kotlin-compile-testing deps in stability-compiler/build.gradle.kts doesn't break compilation/tests.

Poem

🐰
I hopped through CI with a twitch and a grin,
New workflows hum, builds spin.
Kotlin stdlib snug in the cart,
Compiler lighter — a leaner heart.
Carrots compiled, tests hop to win 🥕✨

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request description "Add IntelliJ plugin & module tests." is minimal and does not follow the required template structure. The description lacks all critical sections specified in the repository's template, including the Goal section (explaining the big picture and rationale), Implementation details section (describing the technical approach), and Explain examples section (providing code examples). Additionally, there are no instructions confirming that spotlessApply and apiDump have been run as required by the template. The description should be expanded to include all required template sections. Add a Goal section explaining why these workflows are needed, an Implementation details section describing the workflow structure and job configurations, and an Explain examples section with relevant code or configuration examples. Also confirm that spotlessApply and apiDump commands have been executed, or note if they are not applicable. This will provide reviewers with comprehensive context about the changes and their intent.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title "Add IntelliJ plugin & module tests" is concise, clear, and directly reflects the main changes in the changeset. The PR introduces two new GitHub Actions workflows (intellij-plugin.yml and module-tests.yml) for building, testing, and validating an IntelliJ plugin alongside module tests. The title accurately captures these primary additions, allowing teammates scanning history to understand the purpose of the changes without confusion.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add/tests

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 250c9fb and 8b49503.

📒 Files selected for processing (1)
  • .github/workflows/intellij-plugin.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/intellij-plugin.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: Test IntelliJ Plugin
  • GitHub Check: Build IntelliJ Plugin
  • GitHub Check: Runtime Module Tests
  • GitHub Check: Build and Tests
  • GitHub Check: Compiler Tests (FIR/IR Dumps)
  • GitHub Check: Spotless check
  • GitHub Check: API check

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (1)
.github/workflows/intellij-plugin.yml (1)

1-148: Suggested refactor: Extract repeated job setup into a reusable workflow.

All four jobs repeat the same setup steps (checkout, JDK 21, chmod, stability-runtime build). This violates DRY and increases maintenance burden if setup changes are needed.

Consider creating a .github/workflows/setup-plugin-env.yml reusable workflow that encapsulates the common setup, then call it from each job:

# .github/workflows/setup-plugin-env.yml (new reusable workflow)
on:
  workflow_call:

jobs:
  setup:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v4
      - name: Set up JDK 21
        uses: actions/setup-java@v4
        with:
          distribution: 'zulu'
          java-version: 21
          cache: 'gradle'
      - name: Grant execute permission for gradlew
        run: chmod +x gradlew
      - name: Build stability-runtime (dependency)
        run: ./gradlew :stability-runtime:build --no-daemon --stacktrace

Then simplify each job to call this workflow. However, given the "Chill" review strictness, this refactor is optional and can be deferred.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 75c8e33 and 19b8481.

📒 Files selected for processing (4)
  • .github/workflows/intellij-plugin.yml (1 hunks)
  • .github/workflows/module-tests.yml (1 hunks)
  • gradle/libs.versions.toml (1 hunks)
  • stability-compiler/build.gradle.kts (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (13)
  • GitHub Check: Lint Module Tests
  • GitHub Check: Compiler Tests (FIR/IR Dumps)
  • GitHub Check: Gradle Plugin Tests
  • GitHub Check: Compiler Plugin Tests
  • GitHub Check: Runtime Module Tests
  • GitHub Check: Plugin Compatibility Check (2024.3)
  • GitHub Check: Plugin Compatibility Check (2024.2)
  • GitHub Check: Plugin Compatibility Check (2024.1)
  • GitHub Check: Build IntelliJ Plugin
  • GitHub Check: Test IntelliJ Plugin
  • GitHub Check: API check
  • GitHub Check: Spotless check
  • GitHub Check: Build and Tests
🔇 Additional comments (4)
stability-compiler/build.gradle.kts (2)

30-30: Questionable: Adding explicit kotlin-stdlib dependency.

Adding compileOnly(libs.kotlin.stdlib) appears redundant. The Kotlin stdlib is typically provided transitively by the kotlin-jvm plugin already applied (line 17) and should be available on the compile classpath without an explicit declaration. This may indicate either:

  • The removal of the Compose compiler (which may have transively provided stdlib) necessitates an explicit declaration, or
  • The dependency is unnecessary and adds maintenance overhead.

Verify the necessity of this dependency by checking if stability-compiler compiled and tested successfully before this change without an explicit stdlib declaration. If it did, this dependency can be removed to reduce redundancy.


29-43: Removal of kotlin-compile-testing may impact test capabilities.

The removal of testImplementation("com.github.tschuchortdev:kotlin-compile-testing:1.6.0") significantly reduces the module's ability to perform compile-time testing. This is a key library for testing Kotlin compiler plugins. Given that this module is the stability compiler plugin itself, ensure that:

  1. The tests in this module do not rely on kotlin-compile-testing for compilation validation
  2. Alternative testing mechanisms are in place (e.g., integration tests via the module-tests workflow)
  3. Test coverage is not reduced by this removal

Please verify that the existing tests in stability-compiler continue to function without kotlin-compile-testing and that test coverage for the compiler plugin remains adequate.

.github/workflows/module-tests.yml (1)

167-167: Verify integration-test job dependencies.

The integration-test job (line 167) depends on [compiler-plugin-tests, runtime-tests, gradle-plugin-tests, lint-tests] but excludes the compiler-tests job. This appears inconsistent:

  • compiler-plugin-tests tests the stability-compiler module (line 14)
  • compiler-tests tests the compiler-tests module (line 44) — a distinct module with FIR/IR dumps

Clarify whether compiler-tests should be included in the integration-test dependencies, or if its exclusion is deliberate (e.g., it's optional or runs independently).

Please verify the intended dependency graph. If compiler-tests should be part of the integration-test prerequisites, update line 167:

-    needs: [compiler-plugin-tests, runtime-tests, gradle-plugin-tests, lint-tests]
+    needs: [compiler-plugin-tests, compiler-tests, runtime-tests, gradle-plugin-tests, lint-tests]
gradle/libs.versions.toml (1)

30-30: Remove the concern about redundancy—compileOnly(libs.kotlin.stdlib) is the correct pattern for Kotlin compiler plugins.

For Kotlin compiler plugins, the recommended approach is to use a compile-only dependency on the stdlib. The stability-compiler module is a compiler plugin (as indicated by its kotlin-compiler.embeddable dependency), not a regular JVM library. The explicit compileOnly(libs.kotlin.stdlib) declaration is intentional and necessary for proper classpath isolation and ensuring the correct version is used—it is not redundant despite the kotlin("jvm") plugin being present.

Likely an incorrect or invalid review comment.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
.github/workflows/module-tests.yml (1)

14-162: Consider extracting shared job setup into a composite action to reduce duplication.

Each job repeats the same pattern: actions/checkout@v4actions/setup-java@v4 (JDK 21, Zulu) → chmod +x gradlew → build/test → conditional artifact upload. This duplication spans 140+ lines and makes maintenance harder if the setup steps need to change.

Consider extracting this into a reusable composite action (e.g., .github/actions/setup-gradle-env/action.yml) to define the common setup once, then reuse it across jobs.

Example composite action structure:

# .github/actions/setup-gradle-env/action.yml
name: 'Setup Gradle Environment'
runs:
  using: 'composite'
  steps:
    - uses: actions/checkout@v4
    - uses: actions/setup-java@v4
      with:
        distribution: 'zulu'
        java-version: 21
        cache: 'gradle'
    - run: chmod +x gradlew
      shell: bash

Then in each job:

steps:
  - uses: ./.github/actions/setup-gradle-env
  - name: Build stability-compiler
    run: ./gradlew :stability-compiler:build --no-daemon --stacktrace
  # ... rest of job steps

This approach reduces duplication, improves maintainability, and aligns with the DRY principle.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 19b8481 and 250c9fb.

📒 Files selected for processing (1)
  • .github/workflows/module-tests.yml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: Runtime Module Tests
  • GitHub Check: Build and Tests
  • GitHub Check: Build IntelliJ Plugin
  • GitHub Check: API check
  • GitHub Check: Plugin Compatibility Check (2024.2)
  • GitHub Check: Spotless check
  • GitHub Check: Plugin Compatibility Check (2024.3)
  • GitHub Check: Plugin Compatibility Check (2024.1)
  • GitHub Check: Test IntelliJ Plugin
🔇 Additional comments (2)
.github/workflows/module-tests.yml (2)

1-162: The provided code appears truncated; the integration-test job is missing.

Based on past review comments, the file should include an integration-test job (with a typo in the name at line 165: "Integration Testq" → "Integration Test") and Maven Local publication verification steps extending to line 189+. The provided annotated code ends at line 162 and is incomplete.

Please provide the full file including the integration-test job and its verification steps so I can complete the review.


1-12: Workflow configuration is well-structured.

The trigger configuration (push to main, PR to all branches) and concurrency settings with cancel-in-progress: true follow GitHub Actions best practices and will prevent redundant workflow runs.

@skydoves skydoves merged commit b89f3c6 into main Nov 2, 2025
13 checks passed
@skydoves skydoves deleted the add/tests branch November 2, 2025 07:19
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

Successfully merging this pull request may close these issues.

2 participants