Skip to content

Conversation

Goooler
Copy link
Member

@Goooler Goooler commented Aug 7, 2024

Summary by CodeRabbit

  • Chores
    • Upgraded the runtime environment to Java 21 and aligned minimum IntelliJ version requirements to improve compatibility.
    • Streamlined build configurations by refining dependency management and excluding conflicting libraries for smoother, more reliable builds.

@Goooler Goooler requested a review from egorikftp August 7, 2024 11:02
@egorikftp
Copy link
Member

Will this not break support for older IntelliJ versions?

@Goooler
Copy link
Member Author

Goooler commented Aug 7, 2024

The compatible version range should be

pluginConfiguration.ideaVersion {
sinceBuild = "241"
untilBuild = "242.*"
}

@Goooler
Copy link
Member Author

Goooler commented Aug 7, 2024

I verified the distribution on 2024.1.4 and 2024.2, both work well.

@Goooler
Copy link
Member Author

Goooler commented Aug 7, 2024

https://github.com/ComposeGears/Valkyrie/actions/runs/10283050259/job/28456063748?pr=104

[org.jetbrains.intellij.platform] The following plugin configuration issues were found:
- The since-build='241' is lower than the target IntelliJ Platform major version: '242'.
- The Java configuration specifies sourceCompatibility='17' but IntelliJ Platform '2024.2' requires sourceCompatibility='21'.

@Goooler Goooler force-pushed the bump-target-idea branch 2 times, most recently from 6da6766 to 0ff4ff5 Compare August 7, 2024 11:40
@Goooler
Copy link
Member Author

Goooler commented Aug 7, 2024

May hold this PR until we are ready to drop 2024.1 supports.

@egorikftp egorikftp marked this pull request as draft August 7, 2024 12:02
@egorikftp
Copy link
Member

@Goooler I'm going to bump target IDEA version to 2024.2, will update your PR 🙂

@egorikftp egorikftp force-pushed the bump-target-idea branch 2 times, most recently from 0803379 to 01dc8bc Compare February 26, 2025 20:24
Copy link

coderabbitai bot commented Mar 16, 2025

Walkthrough

This pull request updates and refines the project’s configuration. The Java version in GitHub workflows and Gradle scripts is raised from 17 to 21. Several build files have been modified to simplify dependency management by removing deprecated configurations and explicitly excluding transitive KotlinX dependencies. Additionally, test files have been updated to replace the EDT helper method (using invokeAndWaitIfNeeded) with a more current call (runInEdtAndGet), and version declarations in the TOML configuration have been adjusted. No changes were made to exported or public entities.

Changes

File(s) Change Summary
.github/workflows/release.yml, .github/workflows/validation.yml Updated Java version from 17 to 21; removed outdated IntelliJ IDE version (release workflow only)
build.gradle.kts (root) Removed Kotlin base plugin configuration and instrumentation tools; updated intellijIdeaCommunity and bundledPlugin invocations
components/parser/ktfile/.../KtFileToImageVectorParserTest.kt,
components/psi/iconpack/.../IconPackPsiParserTest.kt
Replaced invokeAndWaitIfNeeded with runInEdtAndGet in multiple test functions to adjust EDT execution
idea-plugin/build.gradle.kts,
cli/build.gradle.kts
Updated IDE build requirement (sinceBuild: "241" → "242") and Java compatibility (set to Java 21); added excludes for org.jetbrains.kotlinx in dependencies
components/extensions/build.gradle.kts,
components/ir-compose/build.gradle.kts,
components/ir/build.gradle.kts,
components/parser/svgxml/build.gradle.kts
Added compileOnly(libs.intellij.bundle.kotlin) dependency to support IntelliJ’s Kotlin bundle at compile time
components/ir-compose/build.gradle.kts,
components/parser/ktfile/build.gradle.kts
Updated Compose library dependencies to exclude org.jetbrains.kotlinx (and in one case, replaced compose.material3 with compose.material)
gradle/libs.versions.toml Removed the idea version declaration; added intellij-bundle-kotlin with a direct version and removed the previous kotlin-stdlib mapping

Sequence Diagram(s)

sequenceDiagram
    participant TestRunner
    participant EDT
    TestRunner->>EDT: runInEdtAndGet { Execute test code }
    EDT-->>TestRunner: Return test result
Loading

Poem

I hopped through changes, quick and bright,
Upgrading Java to a lofty height.
Dependencies pruned like carrots in a row,
Tests now run smooth, with a steady flow.
With a twitch of my nose and a joyful cheer,
I celebrate fresh code in this garden dear! 🥕🐰

Tip

⚡🧪 Multi-step agentic review comment chat (experimental)
  • We're introducing multi-step agentic chat in review comments. This experimental feature enhances review discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments.
    - To enable this feature, set early_access to true under in the settings.
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@egorikftp
Copy link
Member

@coderabbitai review

Copy link

coderabbitai bot commented Mar 16, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@egorikftp egorikftp force-pushed the bump-target-idea branch 3 times, most recently from 4b2ee7c to b4e21f9 Compare March 17, 2025 14:02
@egorikftp egorikftp marked this pull request as ready for review March 17, 2025 18:52
@egorikftp
Copy link
Member

@Goooler could you please take a look? 🙂

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)
idea-plugin/build.gradle.kts (1)

23-50: Consolidate Dependency Exclusions for Kotlinx.
Multiple dependency blocks now exclude the "org.jetbrains.kotlinx" group, which is effective for preventing unwanted transitive dependencies. To improve maintainability and reduce repetition, consider refactoring these repeated exclusions into a common configuration or helper method.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 43e9ee4 and 9b9597f.

📒 Files selected for processing (10)
  • .github/workflows/release.yml (1 hunks)
  • build.gradle.kts (1 hunks)
  • cli/build.gradle.kts (1 hunks)
  • components/extensions/build.gradle.kts (1 hunks)
  • components/ir-compose/build.gradle.kts (1 hunks)
  • components/ir/build.gradle.kts (1 hunks)
  • components/parser/ktfile/build.gradle.kts (1 hunks)
  • components/parser/svgxml/build.gradle.kts (1 hunks)
  • gradle/libs.versions.toml (1 hunks)
  • idea-plugin/build.gradle.kts (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (7)
  • components/parser/svgxml/build.gradle.kts
  • components/ir/build.gradle.kts
  • components/extensions/build.gradle.kts
  • .github/workflows/release.yml
  • components/parser/ktfile/build.gradle.kts
  • components/ir-compose/build.gradle.kts
  • gradle/libs.versions.toml
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: build (windows-latest)
  • GitHub Check: build (ubuntu-latest)
🔇 Additional comments (4)
cli/build.gradle.kts (1)

17-20: Set Java Compatibility to Java 21.
You've correctly added a java block with sourceCompatibility and targetCompatibility set to JavaVersion.VERSION_21. This change ensures the CLI module is compiled using Java 21, aligning with the updated IntelliJ IDEA 2024.2 requirements.

build.gradle.kts (1)

45-47: Update IntelliJ Platform Dependency Configuration.
The update to intellijIdeaCommunity("2024.2") and the change to bundledPlugin("org.jetbrains.kotlin") clearly specify the target IDEA version and core plugin dependency. This makes the configuration more explicit and ensures compatibility with IDEA 2024.2.

idea-plugin/build.gradle.kts (2)

67-70: Align IntelliJ Platform Configuration.
The update of sinceBuild to "242" correctly reflects the new minimum build requirement for IntelliJ IDEA 2024.2. Please verify that this change is in line with your team's strategy regarding support for older versions (e.g., 2024.1), as noted in the PR objectives.


82-87: Ensure Java 21 is Set for the IDEA Plugin.
The Java block now sets both sourceCompatibility and targetCompatibility to JavaVersion.VERSION_21, ensuring that the IDEA plugin is built with the correct Java version required by IntelliJ IDEA 2024.2. This change is consistent with other modules and the overall upgrade effort.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request updates the target IDEA version to 2024.2 and makes necessary adjustments to the build configurations. The changes include updating the IntelliJ platform dependency, setting the Java source and target compatibility to version 21, and excluding conflicting libraries. Overall, the changes seem reasonable and necessary for maintaining compatibility with the latest IDEA version.

Summary of Findings

  • Java Version Consistency: The Java version is updated in cli/build.gradle.kts and idea-plugin/build.gradle.kts, but it's important to ensure that all modules consistently use Java 21 to avoid potential compatibility issues.
  • Compose Material Dependency: The change from compose.material3 to compose.material in components/parser/ktfile/build.gradle.kts should be verified to ensure it doesn't introduce any breaking changes or regressions in the UI components.
  • Test Framework Updates: The updates in KtFileToImageVectorParserTest.kt and IconPackPsiParserTest.kt replace invokeAndWaitIfNeeded with runInEdtAndGet. It's crucial to ensure that these changes don't affect the test execution or introduce any unexpected behavior.

Merge Readiness

The pull request appears to be on the right track for updating the IDEA version. However, the points raised in the findings summary should be carefully considered and addressed before merging. I am unable to approve this pull request, and recommend that others review and approve this code before merging. Specifically, the change in Compose Material dependency and the test framework updates should be verified to ensure no regressions are introduced. Once these concerns are addressed, the pull request should be ready for merging.

@egorikftp
Copy link
Member

@Goooler finalized pr

@egorikftp egorikftp merged commit 70dad15 into main Apr 29, 2025
4 checks passed
@egorikftp egorikftp deleted the bump-target-idea branch April 29, 2025 13:39
egorikftp added a commit that referenced this pull request May 2, 2025
* Use Java 21 and bump min IDEA requirement

* Update tests

* Migrate to IDEA 2024.2 (242), exclude 3rd party library coroutines

* Update configuration

---------

Co-authored-by: Yahor Urbanovich <yahor_urbanovich@epam.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants