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

IEP-1275: Install tools action triggered even after installing tools through offline installer #1031

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

alirana01
Copy link
Collaborator

@alirana01 alirana01 commented Aug 19, 2024

Description

Updated to improve the offline installer behavior with IDE, now using the installed tools in the offline installer instead of creating a new set. Improved handling of IDF_TOOLS_PATH to ensure that

Fixes # (IEP-1275)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How has this been tested?

Please verify this with offline installer's esp_idf.json file to make sure that the tools are not installed but are rather used from the offline installer's directory.
Everything else including the ESP-IDF Manager should stay as is if new bugs are found please report them here and create a new ticket for them.

Test Configuration:

  • ESP-IDF Version:
  • OS (Windows,Linux and macOS):

Dependent components impacted by this PR:

  • Component 1
  • Component 2

Checklist

  • PR Self Reviewed
  • Applied Code formatting
  • Verified on all platforms - Windows,Linux and macOS

Summary by CodeRabbit

  • New Features

    • Streamlined tool activation process, enhancing efficiency in managing tool configurations.
  • Refactor

    • Removed unnecessary classes and listeners for tool activation, improving code maintainability.
  • Chores

    • Cleaned up import statements to reduce dependencies, facilitating a more straightforward codebase.

@alirana01 alirana01 self-assigned this Aug 19, 2024
Copy link
Collaborator Author

@alirana01 alirana01 left a comment

Choose a reason for hiding this comment

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

Self Review

Copy link

coderabbitai bot commented Aug 19, 2024

Walkthrough

The recent updates streamline the tool activation process within the system by replacing the previous ToolsInstallationJob mechanism with a direct instantiation of IDFToolSet. This change simplifies the control flow, enhances code clarity, and maintains robust error handling. Additionally, unnecessary import statements have been removed from ExportIDFTools.java, further optimizing the codebase for better maintainability.

Changes

File Change Summary
.../InitializeToolsStartup.java Refactored to remove ToolsInstallationJob and listener, directly using IDFToolSet. Defined IDF_TOOLS_PATH_KEY as a constant.
.../ExportIDFTools.java Removed unnecessary import statements for Platform and IDFCorePreferenceConstants.

Poem

In a burrow deep, we dance with glee,
Tools activated, oh so free!
Hopping through code, with joy we play,
Simplified paths pave our way.
A bunny's cheer for changes bright,
Making our tools shine with light! 🐇✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

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.

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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 8784a80 and 8508a11.

Files selected for processing (2)
  • bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/InitializeToolsStartup.java (6 hunks)
  • bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/update/ExportIDFTools.java (1 hunks)
Files skipped from review due to trivial changes (1)
  • bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/update/ExportIDFTools.java
Additional comments not posted (3)
bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/InitializeToolsStartup.java (3)

64-64: Introduction of IDF_TOOLS_PATH_KEY is appropriate.

The constant IDF_TOOLS_PATH_KEY is correctly defined and used to retrieve the tools path from the JSON configuration file.


167-183: Streamlined tool activation process.

The direct instantiation of IDFToolSet and scheduling of ToolsActivationJob simplifies the tool activation process. Ensure that the ToolsActivationJob handles the tool activation as expected.


172-181: Preference handling and error logging are well-managed.

Preferences are updated correctly, and errors during preference flushing are logged appropriately. Ensure that the preference node ID is correct.

Copy link
Collaborator

@sigmaaa sigmaaa left a comment

Choose a reason for hiding this comment

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

LGTM. Tested on windows

@kolipakakondal kolipakakondal merged commit 27f0735 into master Aug 21, 2024
5 of 6 checks passed
@kolipakakondal kolipakakondal added this to the v3.1.0 milestone Sep 4, 2024
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.

3 participants