espressif / idf-eclipse-plugin

Espressif-IDE (based on Eclipse CDT) for ESP-IDF CMake based projects 4.x and above
Eclipse Public License 2.0
295 stars 115 forks source link

IEP-1147 Indexer fails when changing active launch configuration #875

Closed sigmaaa closed 5 months ago

sigmaaa commented 6 months ago

Description

two problems were fixed in this PR:

  1. When we have a few configurations for the same project (Debug and Run), changing the active launch configuration could cause the indexer to fail for this project and in this case, the build button was not fixing this issue.
  2. Sometimes after IDE restart the project can have some random indexer issues that do not usually happen. The build button does not fix the issue until the full project is clean. To fix it, I had to add IIndexManager.FORCE_INDEX_INCLUSION to update options

Fixes # (IEP-1147)

Type of change

Please delete options that are not relevant.

How has this been tested?

Test 1:

Test Configuration:

Dependent components impacted by this PR:

Checklist

Summary by CodeRabbit

coderabbitai[bot] commented 6 months ago

Walkthrough

The changes to IDFBuildConfiguration.java involve the enhancement of the indexing process for compile commands. A new field tracks the timestamp of the compile_commands.json file, and the indexing options now forcefully include index updates. Additionally, there's a session property being set to manage the state related to compile commands, suggesting an improvement in the build configuration's responsiveness to changes in the build environment.

Changes

File Path Change Summary
.../idf/core/build/IDFBuildConfiguration.java Added TIMESTAMP_COMPILE_COMMANDS_PROPERTY field, updated getUpdateOptions to include FORCE_INDEX_INCLUSION, and added code to set a session property for compile commands timestamp.

πŸ‡βœ¨ In the code where the rabbits hop, A timestamp field now takes its spot. Index with force, the build commands dance, In the JSON fields, the bits advance. 🌟

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 X ?


Tips ### Chat with CodeRabbit Bot (`@coderabbitai`) - You can reply to a review comment made by CodeRabbit. - You can tag CodeRabbit on specific lines of code or files in the PR by tagging `@coderabbitai` in a comment. - You can tag `@coderabbitai` in a PR comment and ask one-off questions about the PR and the codebase. Use quoted replies to pass the context for follow-up questions. ### 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](https://coderabbit.ai/integrations/coderabbit-overrides.v2.json). - 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`
AndriiFilippov commented 6 months ago

@sigmaaa hi !

Tested under: OS - Windows 10 ESP-IDF: v5.1.2

LGTM πŸ‘ All includes are resolved after changing Launch Mode between "Run" / "Debug". Also after Eclipse restart the build fixing unresolved includes.