Skip to content

GH issue: Abort build process in presence of errors (IEP-1180) #914

Merged
kolipakakondal merged 1 commit into
masterfrom
IEP-1180
Mar 27, 2024
Merged

GH issue: Abort build process in presence of errors (IEP-1180) #914
kolipakakondal merged 1 commit into
masterfrom
IEP-1180

Conversation

@sigmaaa
Copy link
Copy Markdown
Collaborator

@sigmaaa sigmaaa commented Mar 13, 2024

Description

related to the gh issue: #912

Fixes # (IEP-1180)

Type of change

Please delete options that are not relevant.

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

How has this been tested?

  • Make some errors in project -> verify that idf_size.py isn't called after hitting error during the build

Test Configuration:

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

Dependent components impacted by this PR:

  • Build

Checklist

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

Summary by CodeRabbit

  • Bug Fixes
    • Improved the reliability of build actions by ensuring no errors are present before proceeding.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 13, 2024

Walkthrough

This update enhances the build configuration within the IDF Eclipse plugin. It specifically refines the logic for monitoring build progress, now incorporating a check to ensure that the error count from epm is zero before continuing. This change aims to improve the reliability and accuracy of build processes.

Changes

File Summary
.../idf/core/build/IDFBuildConfiguration.java Updated logic for cancelation check to include verification that epm error count is zero.

Related issues

🐇

In the land of code and wire,
Where the builds climb ever higher,
A rabbit hopped with an update in tow,
"No errors," it whispered, "Let's go with the flow."
🌟 In the glow of the screen, our worries ease,
For in the realm of IDF, we build with ease. 🌟

🐾

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-tests 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 tests 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 tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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 a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

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

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

@sigmaaa sigmaaa changed the title fix: avoid size calculation on build errors Abort build process in presence of errors (IEP-1180) Mar 13, 2024
@sigmaaa sigmaaa changed the title Abort build process in presence of errors (IEP-1180) GH issue: Abort build process in presence of errors (IEP-1180) Mar 13, 2024
@sigmaaa sigmaaa linked an issue Mar 13, 2024 that may be closed by this pull request
Copy link
Copy Markdown
Collaborator Author

@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.

Self reviewed

Copy link
Copy Markdown

@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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 909b4d2 and d4f1c94.
Files selected for processing (1)
  • bundles/com.espressif.idf.core/src/com/espressif/idf/core/build/IDFBuildConfiguration.java (1 hunks)
Additional comments: 1
bundles/com.espressif.idf.core/src/com/espressif/idf/core/build/IDFBuildConfiguration.java (1)
  • 454-454: The update to the condition for proceeding with size calculations and other actions after a build is a logical implementation of the PR's objectives. By checking both that the monitor is not canceled and that the error count is zero, it ensures that these operations are only performed when the build is successful, thereby avoiding unnecessary work after a failed build. This change aligns well with the goal of improving the developer experience by not executing redundant operations like size calculation when there are build errors.

Copy link
Copy Markdown
Collaborator

@kolipakakondal kolipakakondal left a comment

Choose a reason for hiding this comment

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

LGTM

@kolipakakondal kolipakakondal added this to the v2.13.0 milestone Mar 22, 2024
Comment on lines +454 to 456
if (!monitor.isCanceled() && epm.getErrorCount() == 0)
{
project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@sigmaaa is it going to be fine in terms that the indexer may not be triggered if the project is not refreshed or it will be triggered in both cases?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Hi @alirana01,

The project will be refreshed during indexing anyway if I remember correctly.

@kolipakakondal kolipakakondal merged commit 71e8dd1 into master Mar 27, 2024
@kolipakakondal kolipakakondal deleted the IEP-1180 branch March 27, 2024 14:11
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.

Abort build process in presence of errors (IEP-1180)

3 participants