Skip to content

Conversation

@sigmaaa
Copy link
Collaborator

@sigmaaa sigmaaa commented Mar 27, 2025

Description

To improve the user experience and maintain cleaner code when handling custom build folders, I’ve added a new field to the Build tab specifically for the build folder path.

image

Fixes # (IEP-1472)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

How has this been tested?

  1. Build and flash by setting the build folder using the new field.
  2. Tested the sdkconfig editor.
  3. Typing a folder name and then switching tabs preserves the state, but if the Cancel button is pressed, the build folder input is not updated.

Test Configuration:

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

Dependent components impacted by this PR:

  • Custom build folder
  • Build Tab

Checklist

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

Summary by CodeRabbit

  • New Features

    • Introduced a build folder selection option in the build configuration dialog, allowing users to enter or browse for a folder.
    • Enhanced on-screen instructions and tooltips to guide build folder setup.
    • Streamlined the process to automatically verify and create the build folder as needed for a smoother build experience.
    • Added a new constant for build folder path identification within the IDF launch process.
    • Added functionality to update the project build folder based on the active launch configuration.
    • Implemented a method to retrieve and apply launch configuration settings, enhancing project build folder management.
  • Bug Fixes

    • Removed unnecessary complexity in handling custom build directories, improving overall functionality.
    • Added validation to prevent the use of deprecated CMake arguments, ensuring clearer user guidance.
  • Documentation

    • Updated build configuration documentation to replace deprecated CMake argument instructions with direct build folder location settings.

@coderabbitai
Copy link

coderabbitai bot commented Mar 27, 2025

Walkthrough

The pull request streamlines build folder configuration throughout the codebase. In the core build configuration, it removes legacy handling for custom build directories and simplifies the logic to always use the default build directory. A new constant is added to the launch constants. The launch configuration UI is enhanced by introducing a new UI component for selecting the build folder, along with updated persistence logic. Additionally, related user messages and localization entries are expanded to support the changes.

Changes

File(s) Change Summary
bundles/.../IDFBuildConfiguration.java Removed customBuildDir variable and related logic. Updated getBuildContainerPath() to directly construct and create the build directory.
bundles/.../IDFLaunchConstants.java Added new constant BUILD_FOLDER_PATH for build folder configuration.
bundles/.../SerialFlashLaunchConfigTabGroup.java Introduced a new performApply method to retrieve and set the build folder path from configuration, including exception handling via logging.
bundles/.../CMakeBuildTab2.java Added a buildFolderText UI component with a browse button via a directory dialog; removed getCmakeArgumentsWithAbsProjectPath and updated configuration save/restore methods.
bundles/.../Messages.java and bundles/.../messages.properties Added new localization variables and message entries to support the build folder selection UI.
bundles/.../IDFUtil.java Added updateProjectBuildFolder(ILaunchConfigurationWorkingCopy configuration) method to update the build folder based on launch configuration.
bundles/.../IdfCommandExecutor.java Removed setBuildFolder method, simplifying build folder logic.
bundles/.../LaunchBarListener.java Added call to IDFUtil.updateProjectBuildFolder to update the project build folder on active launch descriptor change.
bundles/.../MANIFEST.MF Added org.eclipse.cdt.debug.core.launch package import and moved org.eclipse.embedcdt.core to a new line.

Sequence Diagram(s)

sequenceDiagram
    participant UI
    participant TabGroup as SerialFlashLaunchConfigTabGroup
    participant Config as ILaunchConfigurationWorkingCopy
    participant Delegate as CoreBuildLaunchConfigDelegate
    participant Util as IDFUtil
    participant Project as IProject
    participant Logger

    UI->>+TabGroup: performApply(configuration)
    TabGroup->>+Delegate: getProject(configuration)
    Delegate-->>-TabGroup: project / null
    alt project is null
        TabGroup->>Logger: Log error and exit
    else project exists
        TabGroup->>+Config: Retrieve build folder attribute
        Config-->>-TabGroup: build folder value (or blank)
        alt build folder is blank or relative
            TabGroup->>+Util: getBuildDir(project)
            Util-->>-TabGroup: default build path
            TabGroup->>Project: Adjust build folder to absolute path
        end
        TabGroup->>+Util: setBuildDir(project, buildFolder)
        Util-->>-TabGroup: Confirm directory setup
        Note right of TabGroup: Exceptions caught and logged via Logger.log(e)
    end
Loading

Possibly related PRs

Suggested reviewers

  • AndriiFilippov
  • kolipakakondal
  • alirana01

Poem

In a burrow deep beneath the code,
I hopped along a winding road.
Old paths were cleared, new trails set,
With build folders sorted—no more fret!
My whiskers twitch, my heart’s aglow,
For streamlined paths make our code flow! 🐇

Happy hops and cleaner builds we owe!


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 0912488 and bff04f1.

⛔ Files ignored due to path filters (1)
  • media/custombuilddir.png is excluded by !**/*.png
📒 Files selected for processing (1)
  • docs/en/buildproject.rst (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • docs/en/buildproject.rst
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: build_macos
  • GitHub Check: build

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

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 (6)
bundles/com.espressif.idf.core/src/com/espressif/idf/core/build/IDFBuildConfiguration.java (1)

158-166: Simplified build path handling improves whitespace support

The changes to getBuildContainerPath() simplify the code by removing custom build directory parsing logic and centralizing the build directory handling through IDFUtil.getBuildDir(). This aligns well with the PR objective of addressing whitespace issues in build folder paths.

I'd suggest adding a null check before calling methods on the path to avoid potential NullPointerExceptions:

public IPath getBuildContainerPath() throws CoreException
{
    org.eclipse.core.runtime.Path path = new org.eclipse.core.runtime.Path(IDFUtil.getBuildDir(getProject()));
-   if (!path.toFile().exists())
+   if (path != null && !path.toFile().exists())
    {
        path.toFile().mkdirs();
    }
    return path;
}
bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/dialogs/CMakeBuildTab2.java (4)

53-53: Consider documenting the reason for changing DEFAULT_CMAKE_MSG to an empty string.

This change from a potentially informative default message to an empty string might impact user experience. Consider adding a comment explaining the rationale for this change.


200-202: Consider adding validation for the build folder path.

While the implementation correctly retrieves and sets the build folder path, consider adding validation to ensure the path is valid and accessible.

 String buildFolderPath = configuration.getAttribute(IDFLaunchConstants.BUILD_FOLDER_PATH, StringUtil.EMPTY);
+// Validate the build folder path
+if (!buildFolderPath.isEmpty() && !Path.of(buildFolderPath).toFile().exists()) {
+    // Log a warning or display a message
+    Logger.log("Build folder path does not exist: " + buildFolderPath);
+}
 buildFolderText.setText(buildFolderPath);

251-251: Consider trimming the build folder path before saving.

To avoid issues with leading/trailing whitespace (which was the original problem this PR addresses), it's a good practice to trim the text input before saving.

-configuration.setAttribute(IDFLaunchConstants.BUILD_FOLDER_PATH, buildFolderText.getText());
+configuration.setAttribute(IDFLaunchConstants.BUILD_FOLDER_PATH, buildFolderText.getText().trim());

297-297: Maintain consistency with trimming across the codebase.

Similar to the previous comment about line 251, you're correctly using trim() here but not in the earlier instance. Ensure consistency across the codebase.

bundles/com.espressif.idf.launch.serial.ui/src/com/espressif/idf/launch/serial/ui/internal/SerialFlashLaunchConfigTabGroup.java (1)

70-70: Consider using StringUtil.isEmpty instead of isBlank.

For consistency with other parts of the codebase (e.g., IDFUtil.getBuildDir), consider using StringUtil.isEmpty() instead of the String.isBlank() method.

-buildFolder = buildFolder.isBlank() ? IDFUtil.getBuildDir(project) : buildFolder;
+buildFolder = StringUtil.isEmpty(buildFolder) ? IDFUtil.getBuildDir(project) : buildFolder;
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 2bb3d6b and b6ba7fa.

📒 Files selected for processing (6)
  • bundles/com.espressif.idf.core/src/com/espressif/idf/core/build/IDFBuildConfiguration.java (1 hunks)
  • bundles/com.espressif.idf.core/src/com/espressif/idf/core/build/IDFLaunchConstants.java (1 hunks)
  • bundles/com.espressif.idf.launch.serial.ui/src/com/espressif/idf/launch/serial/ui/internal/SerialFlashLaunchConfigTabGroup.java (2 hunks)
  • bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/dialogs/CMakeBuildTab2.java (9 hunks)
  • bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/dialogs/Messages.java (1 hunks)
  • bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/dialogs/messages.properties (1 hunks)
🧰 Additional context used
🧬 Code Definitions (2)
bundles/com.espressif.idf.core/src/com/espressif/idf/core/build/IDFBuildConfiguration.java (1)
bundles/com.espressif.idf.core/src/com/espressif/idf/core/util/IDFUtil.java (1)
  • IDFUtil (56-839)
bundles/com.espressif.idf.launch.serial.ui/src/com/espressif/idf/launch/serial/ui/internal/SerialFlashLaunchConfigTabGroup.java (2)
bundles/com.espressif.idf.core/src/com/espressif/idf/core/build/IDFLaunchConstants.java (1)
  • IDFLaunchConstants (3-21)
bundles/com.espressif.idf.core/src/com/espressif/idf/core/util/IDFUtil.java (1)
  • IDFUtil (56-839)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: build_macos
  • GitHub Check: build
🔇 Additional comments (6)
bundles/com.espressif.idf.core/src/com/espressif/idf/core/build/IDFLaunchConstants.java (1)

20-20: Good addition of new launch constant for build folder path

This new constant will provide a consistent way to reference the build folder path throughout the codebase, which supports the PR objective of enhancing build folder management.

bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/dialogs/Messages.java (1)

14-17: Well-structured message constants for build folder UI

These new message constants follow the existing naming convention and provide localization support for the new build folder selection UI, which aligns with the PR objective of adding a new field in the Build tab.

Also applies to: 21-21

bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/dialogs/messages.properties (1)

6-8: Clear and helpful user messages for build folder selection

The added messages provide clear guidance to users about the purpose of the build folder field and how to use it. The tooltip and message having identical text is appropriate for consistency.

Also applies to: 13-13

bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/dialogs/CMakeBuildTab2.java (2)

112-142: Great job implementing the build folder selection UI!

The implementation follows UI design best practices with:

  • Clear labeling and informative tooltip
  • Proper layout and spacing
  • Reuse of existing patterns (createPushButton)
  • Appropriate event handling

The directory dialog implementation is well-structured with clear messaging.


324-328: LGTM - Good handling of nullable property.

The code correctly checks if the property is null before attempting to set the text field, which prevents potential NullPointerExceptions.

bundles/com.espressif.idf.launch.serial.ui/src/com/espressif/idf/launch/serial/ui/internal/SerialFlashLaunchConfigTabGroup.java (1)

57-81: Great implementation of the performApply method!

The method effectively:

  1. Retrieves the build folder path from configuration (with fallback)
  2. Checks if the path is empty and handles accordingly
  3. Converts relative paths to absolute paths
  4. Persists the build folder path using IDFUtil
  5. Includes proper error handling

This implementation ensures the build folder path is correctly handled regardless of whether it contains whitespace, addressing the original issue described in the PR objectives.

Copy link
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.

Looks good, @AndriiFilippov II think we need to verify user cases, such as what happens if the user provides -B dev_build in the Additional Arguments section as well as in the newly introduced Build Directory section.

@AndriiFilippov
Copy link
Collaborator

AndriiFilippov commented Apr 5, 2025

@sigmaaa hi!

Tested under:
OS: Windows 11
ESP-IDF: v5.4

  1. I'm not sure it's a good idea to introduce an additional field, as it might make the interface unnecessarily cluttered and add extra maintenance. The "custom build folder" feature is mainly used by experienced users who are generally comfortable using command-line arguments like -B build_folder. @kolipakakondal

  2. select build folder using "Build folder location"
    image

build project - go again to "Build folder location", remove path and save changes to Launch Config + delete this folder
image

build the project -> it still builds to the previously removed path.

If I create NEW Launch Config - it still build project to the removed PATH from previous Launch Config.

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)
bundles/com.espressif.idf.launch.serial.ui/src/com/espressif/idf/launch/serial/ui/internal/SerialFlashLaunchConfigTabGroup.java (1)

58-82: Consider adding null check for buildFolder to prevent potential NPE.

The implementation correctly applies build folder settings to the project, but there's a potential NullPointerException if buildFolder is null before checking isBlank(). While this is unlikely given IDFUtil.getBuildDir() implementation, defensive programming would add an explicit null check.

Additionally, consider adding a comment explaining the purpose of this method for future maintainers, especially regarding the path manipulation logic.

@Override
public void performApply(ILaunchConfigurationWorkingCopy configuration)
{
    super.performApply(configuration);
    try
    {
        IProject project = CoreBuildLaunchConfigDelegate.getProject(configuration);
        if (project == null)
        {
            return;
        }
        String buildFolder = configuration.getAttribute(IDFLaunchConstants.BUILD_FOLDER_PATH,
                IDFUtil.getBuildDir(project));
-       buildFolder = buildFolder.isBlank() ? IDFConstants.BUILD_FOLDER : buildFolder;
+       buildFolder = (buildFolder == null || buildFolder.isBlank()) ? IDFConstants.BUILD_FOLDER : buildFolder;
        if (!Path.of(buildFolder).isAbsolute())
        {
            buildFolder = project.getLocation().append(buildFolder).toOSString();
        }
        IDFUtil.setBuildDir(project, buildFolder);
    }
    catch (CoreException e)
    {
        Logger.log(e);
    }
}
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between b6ba7fa and 92079a4.

📒 Files selected for processing (1)
  • bundles/com.espressif.idf.launch.serial.ui/src/com/espressif/idf/launch/serial/ui/internal/SerialFlashLaunchConfigTabGroup.java (2 hunks)
🧰 Additional context used
🧬 Code Definitions (1)
bundles/com.espressif.idf.launch.serial.ui/src/com/espressif/idf/launch/serial/ui/internal/SerialFlashLaunchConfigTabGroup.java (3)
bundles/com.espressif.idf.core/src/com/espressif/idf/core/build/IDFLaunchConstants.java (1)
  • IDFLaunchConstants (3-21)
bundles/com.espressif.idf.core/src/com/espressif/idf/core/logging/Logger.java (1)
  • Logger (21-137)
bundles/com.espressif.idf.core/src/com/espressif/idf/core/util/IDFUtil.java (1)
  • IDFUtil (56-839)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: build_macos
  • GitHub Check: build
🔇 Additional comments (3)
bundles/com.espressif.idf.launch.serial.ui/src/com/espressif/idf/launch/serial/ui/internal/SerialFlashLaunchConfigTabGroup.java (3)

18-37: Import statements adequately support the added functionality.

The new imports are appropriate for supporting the build folder path functionality, including the Path class for path manipulation and the necessary Eclipse framework classes.


71-75: Path handling logic addresses whitespace issues correctly.

The code correctly handles relative and absolute paths, ensuring that the build folder path is always absolute before setting it in the project properties. This approach effectively addresses the whitespace issue mentioned in the PR objectives.


58-82:

❓ Verification inconclusive

Verify handling of removed build folder paths.

According to the PR comments, there was an issue where "selecting a build folder using the new 'Build folder location' field, then attempting to remove the path and save changes" still resulted in building to the previously removed path.

This implementation treats blank paths as a reset to the default build folder, but you should verify this behavior matches the expected user experience.

Run this script to help understand how the user interface and this code interact:


🏁 Script executed:

#!/bin/bash
# Search for UI components that might clear or set the build folder path
rg -A 5 -B 5 "BUILD_FOLDER_PATH" --glob="*.java"

# Check if any UI components handle cleared paths differently
rg -A 3 "isBlank|isEmpty" --glob="*.java" | grep -i "buildFolder|buildDir|build.*folder|build.*path"

Length of output: 8479


Action Required: Verify that a cleared build folder path properly resets to the default

The implementation in SerialFlashLaunchConfigTabGroup.java now checks for a blank build folder string and substitutes it with IDFConstants.BUILD_FOLDER. This should address the issue where a previously selected custom build folder persisted after the field was cleared. However, please ensure that the UI (e.g., in CMakeBuildTab2.java) indeed updates the configuration attribute to an empty string when the user removes any value from the "Build folder location" field. Manual verification of this interaction is advised to confirm that the expected behavior is reached in practice.

  • Confirm that clearing the Build folder field in the UI results in an empty (or blank) string being set.
  • Verify that the fallback logic in performApply correctly resets the build folder to IDFConstants.BUILD_FOLDER in such cases.

@sigmaaa
Copy link
Collaborator Author

sigmaaa commented Apr 7, 2025

Hi @AndriiFilippov,

Thanks for verifying the PR.

build the project -> it still builds to the previously removed path.

This should be fixed in the last commit

The "custom build folder" feature is mainly used by experienced users who are generally comfortable using command-line arguments like -B build_folder

That’s not entirely true. A separate field for setting up the build folder offers a more user-friendly experience. It provides visual clarity and reduces errors, as users lack the auto-complete feature typically available in the CLI. On the development side, it’s also easier to maintain a dedicated field, rather than relying on a multi-purpose field that could contain spaces and special characters, which can make parsing more complicated.

@sigmaaa
Copy link
Collaborator Author

sigmaaa commented Apr 7, 2025

Hi @AndriiFilippov,

I've also noticed that the idf.py reconfigure command still relies on the -B argument, so I will change it in the next commit.

@sigmaaa
Copy link
Collaborator Author

sigmaaa commented Apr 7, 2025

Fixed an issue where the IDF command executor was relying on its own method to retrieve the custom build folder. Additionally, enhanced the update process for the project's build folder path based on the active launch configuration."

@AndriiFilippov
Copy link
Collaborator

AndriiFilippov commented Apr 7, 2025

@sigmaaa hi !
Tested under:
OS - Windows 11
ESP-IDF: v5.4

use just Additional CMake arguments field:
image

getting this error:

Building in: C:\Users\AndriiFilippov\workspaceDRFDFD\ertqw\build
Configuring in: C:\Users\AndriiFilippov\workspaceDRFDFD\ertqw\build
cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=C:\Users\AndriiFilippov\e\esp-idf-v5.4\tools\cmake\toolchain-esp32.cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCCACHE_ENABLE=1 -DIDF_TARGET=esp32 -B C:\Users\AndriiFilippov\e\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa C:\Users\AndriiFilippov\workspaceDRFDFD\ertqw
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.28.0.windows.1")
-- ccache will be used for faster recompilation
-- The C compiler identification is GNU 14.2.0
-- The CXX compiler identification is GNU 14.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/Users/AndriiFilippov/.espressif/tools/xtensa-esp-elf/esp-14.2.0_20241119/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Users/AndriiFilippov/.espressif/tools/xtensa-esp-elf/esp-14.2.0_20241119/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Users/AndriiFilippov/.espressif/tools/xtensa-esp-elf/esp-14.2.0_20241119/xtensa-esp-elf/bin/xtensa-esp32-elf-g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building ESP-IDF components for target esp32
-- Checking Python dependencies...
Constraint file: C:\Users\AndriiFilippov\.espressif\espidf.constraints.v5.4.txt
Requirement files:
 - C:\Users\AndriiFilippov\e\esp-idf-v5.4\tools\requirements\requirements.core.txt
Python being checked: C:\Users\AndriiFilippov\.espressif\python_env\idf5.4_py3.11_env\Scripts\python.exe
Python requirements are satisfied.
NOTICE: Processing 2 dependencies:
NOTICE: [1/2] espressif/led_strip (2.5.5)
NOTICE: [2/2] idf (5.4.0)
-- Project sdkconfig file C:/Users/AndriiFilippov/workspaceDRFDFD/ertqw/sdkconfig
Loading defaults file C:/Users/AndriiFilippov/workspaceDRFDFD/ertqw/sdkconfig.defaults...
Loading defaults file C:/Users/AndriiFilippov/workspaceDRFDFD/ertqw/sdkconfig.defaults.esp32...
-- Compiler supported targets: xtensa-esp-elf
-- Found Python3: C:/Program Files/WindowsApps/PythonSoftwareFoundation.Python.3.12_3.12.2544.0_x64__qbz5n2kfra8p0/python3.12.exe (found version "3.12.9") found components: Interpreter
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS - Success
-- App "blink" version: v5.0-dev-4379-g36f49f361-dirty
-- Adding linker script C:/Users/AndriiFilippov/e/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/esp-idf/esp_system/ld/memory.ld
-- Adding linker script C:/Users/AndriiFilippov/e/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/esp-idf/esp_system/ld/sections.ld.in
-- Adding linker script C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_rom/esp32/ld/esp32.rom.api.ld
-- Adding linker script C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
-- Adding linker script C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
-- Adding linker script C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/soc/esp32/ld/esp32.peripherals.ld
-- Components: app_trace app_update bootloader bootloader_support bt cmock console cxx driver efuse esp-tls esp_adc esp_app_format esp_bootloader_format esp_coex esp_common esp_driver_ana_cmpr esp_driver_cam esp_driver_dac esp_driver_gpio esp_driver_gptimer esp_driver_i2c esp_driver_i2s esp_driver_isp esp_driver_jpeg esp_driver_ledc esp_driver_mcpwm esp_driver_parlio esp_driver_pcnt esp_driver_ppa esp_driver_rmt esp_driver_sdio esp_driver_sdm esp_driver_sdmmc esp_driver_sdspi esp_driver_spi esp_driver_touch_sens esp_driver_tsens esp_driver_uart esp_driver_usb_serial_jtag esp_eth esp_event esp_gdbstub esp_hid esp_http_client esp_http_server esp_https_ota esp_https_server esp_hw_support esp_lcd esp_local_ctrl esp_mm esp_netif esp_netif_stack esp_partition esp_phy esp_pm esp_psram esp_ringbuf esp_rom esp_security esp_system esp_timer esp_vfs_console esp_wifi espcoredump espressif__led_strip esptool_py fatfs freertos hal heap http_parser idf_test ieee802154 json log lwip main mbedtls mqtt newlib nvs_flash nvs_sec_provider openthread partition_table perfmon protobuf-c protocomm pthread rt sdmmc soc spi_flash spiffs tcp_transport ulp unity usb vfs wear_levelling wifi_provisioning wpa_supplicant xtensa
-- Component paths: C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/app_trace C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/app_update C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/bootloader C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/bootloader_support C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/bt C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/cmock C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/console C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/cxx C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/driver C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/efuse C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp-tls C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_adc C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_app_format C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_bootloader_format C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_coex C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_common C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_driver_ana_cmpr C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_driver_cam C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_driver_dac C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_driver_gpio C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_driver_gptimer C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_driver_i2c C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_driver_i2s C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_driver_isp C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_driver_jpeg C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_driver_ledc C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_driver_mcpwm C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_driver_parlio C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_driver_pcnt C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_driver_ppa C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_driver_rmt C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_driver_sdio C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_driver_sdm C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_driver_sdmmc C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_driver_sdspi C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_driver_spi C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_driver_touch_sens C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_driver_tsens C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_driver_uart C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_driver_usb_serial_jtag C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_eth C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_event C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_gdbstub C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_hid C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_http_client C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_http_server C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_https_ota C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_https_server C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_hw_support C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_lcd C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_local_ctrl C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_mm C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_netif C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_netif_stack C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_partition C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_phy C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_pm C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_psram C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_ringbuf C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_rom C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_security C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_system C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_timer C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_vfs_console C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esp_wifi C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/espcoredump C:/Users/AndriiFilippov/workspaceDRFDFD/ertqw/managed_components/espressif__led_strip C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/esptool_py C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/fatfs C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/freertos C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/hal C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/heap C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/http_parser C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/idf_test C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/ieee802154 C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/json C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/log C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/lwip C:/Users/AndriiFilippov/workspaceDRFDFD/ertqw/main C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/mbedtls C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/mqtt C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/newlib C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/nvs_flash C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/nvs_sec_provider C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/openthread C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/partition_table C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/perfmon C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/protobuf-c C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/protocomm C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/pthread C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/rt C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/sdmmc C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/soc C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/spi_flash C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/spiffs C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/tcp_transport C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/ulp C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/unity C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/usb C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/vfs C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/wear_levelling C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/wifi_provisioning C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/wpa_supplicant C:/Users/AndriiFilippov/e/esp-idf-v5.4/components/xtensa
-- Configuring done (10.9s)
-- Generating done (2.1s)
-- Build files have been written to: C:/Users/AndriiFilippov/e/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
cmake --build . -- -v
Error: could not load cache
Build complete (1 errors, 0 warnings): C:\Users\AndriiFilippov\workspaceDRFDFD\ertqw\build
Total time taken to build the project: 13,308 ms

same if both fields filled with the paths
image

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)
bundles/com.espressif.idf.launch.serial.ui/src/com/espressif/idf/launch/serial/ui/internal/CMakeMainTab2.java (1)

487-493: Consider using regex pattern match for more precise -B argument detection.

The current implementation uses a simple string contains check which could potentially match other arguments or text that happens to contain "-B" but aren't actually the build directory argument.

- if (cmakeArgs.contains("-B")) //$NON-NLS-1$
+ import java.util.regex.Pattern;
+ // Add import at the top of the file
+ 
+ // In the method:
+ if (Pattern.compile("\\b-B\\b").matcher(cmakeArgs).find())

This regex ensures we're only matching the exact "-B" flag as a word boundary and not part of another string.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between f57fad6 and 0912488.

📒 Files selected for processing (3)
  • bundles/com.espressif.idf.launch.serial.ui/src/com/espressif/idf/launch/serial/ui/internal/CMakeMainTab2.java (2 hunks)
  • bundles/com.espressif.idf.launch.serial.ui/src/com/espressif/idf/launch/serial/ui/internal/Messages.java (1 hunks)
  • bundles/com.espressif.idf.launch.serial.ui/src/com/espressif/idf/launch/serial/ui/internal/messages.properties (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
bundles/com.espressif.idf.launch.serial.ui/src/com/espressif/idf/launch/serial/ui/internal/CMakeMainTab2.java (2)
bundles/com.espressif.idf.core/src/com/espressif/idf/core/util/StringUtil.java (1)
  • StringUtil (11-25)
bundles/com.espressif.idf.launch.serial.ui/src/com/espressif/idf/launch/serial/ui/internal/Messages.java (1)
  • Messages (20-73)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: build
  • GitHub Check: build_macos
🔇 Additional comments (2)
bundles/com.espressif.idf.launch.serial.ui/src/com/espressif/idf/launch/serial/ui/internal/Messages.java (1)

33-33: LGTM: New message for deprecated -B argument added.

The new message variable follows the established naming convention and pattern for message declarations in the class.

bundles/com.espressif.idf.launch.serial.ui/src/com/espressif/idf/launch/serial/ui/internal/messages.properties (1)

21-21: LGTM: Clear and actionable error message added.

The new message provides users with a clear explanation that the -B argument is deprecated and instructs them to use the Build location setting instead.

@sigmaaa
Copy link
Collaborator Author

sigmaaa commented Apr 9, 2025

Hi @AndriiFilippov,

fixed in the last commit by validating the CMake arguments field and not letting use -B arguments:

image

@kolipakakondal
Copy link
Collaborator

Hi @sigmaaa Please update the documentation for this

@sigmaaa
Copy link
Collaborator Author

sigmaaa commented Apr 22, 2025

Hi @sigmaaa Please update the documentation for this

Hi @kolipakakondal, done

@AndriiFilippov
Copy link
Collaborator

@sigmaaa hi !
Tested under:
OS - Windows 11 / Mac arm64

The new field works as expected ✅
It is not possible to add the -B argument in the Additional CMake arguments field ✅
Target switching works without any issues ✅
Project Clean and Project Full Clean function correctly ✅
Multiple projects with different build folders path works correctly ✅

LGTM 👍

@sigmaaa sigmaaa merged commit 8975138 into master Apr 22, 2025
6 of 7 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Apr 25, 2025
5 tasks
@kolipakakondal kolipakakondal deleted the IEP-1472 branch May 7, 2025 14:57
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.

4 participants