Skip to content

fix: make IDE error log visible in generated bug report - #1493

Open
kolipakakondal wants to merge 1 commit into
masterfrom
IEP-1784
Open

fix: make IDE error log visible in generated bug report#1493
kolipakakondal wants to merge 1 commit into
masterfrom
IEP-1784

Conversation

@kolipakakondal

@kolipakakondal kolipakakondal commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Rename Eclipse's hidden .log to ide_error_log.log when packaging so Finder and other file managers show it in the report.

Description

Please include a summary of the change and which issue is fixed.

Fixes # (IEP-XXX)

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)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How has this been tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

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
  • Added Documentation
  • Added Unit Test
  • Verified on all platforms - Windows,Linux and macOS

Summary by CodeRabbit

  • Bug Fixes

    • IDE log files included in bug reports now retain a visible .log filename, making them easier to identify and open.
    • Existing visible filenames remain unchanged.
  • Tests

    • Added coverage for hidden log-file renaming and filename preservation.

Rename Eclipse's hidden .log to ide_error_log.log when packaging so Finder and other file managers show it in the report.
@kolipakakondal
kolipakakondal requested a review from sigmaaa August 5, 2026 10:23
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Bug report generation now renames hidden IDE metadata log files with an ide_error_log prefix. Visible filenames remain unchanged. Tests cover hidden and visible filename cases.

Changes

IDE log naming

Layer / File(s) Summary
Log filename transformation and report integration
bundles/com.espressif.idf.core/.../BugReportGenerator.java, tests/com.espressif.idf.core.test/.../BugReportGeneratorTest.java
BugReportGenerator adds getReportLogFileName and uses it when copying IDE metadata logs. Tests verify hidden filenames are renamed and visible filenames remain unchanged.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: making the IDE error log visible in generated bug reports.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch IEP-1784

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

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@bundles/com.espressif.idf.core/src/com/espressif/idf/core/bug/BugReportGenerator.java`:
- Around line 194-200: Update getReportLogFileName to ensure the generated
report filename is unique when the destination already exists, including
collisions between the renamed hidden .log file and an existing visible
ide_error_log.log. Preserve the current naming behavior when no collision
occurs, and add a test covering both source files being copied into a single
report.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2cd7c5d2-8122-409b-bc40-720e85566c9c

📥 Commits

Reviewing files that changed from the base of the PR and between e623b3a and ec27d57.

📒 Files selected for processing (2)
  • bundles/com.espressif.idf.core/src/com/espressif/idf/core/bug/BugReportGenerator.java
  • tests/com.espressif.idf.core.test/src/com/espressif/idf/core/bug/test/BugReportGeneratorTest.java

Comment on lines +194 to +200
public static String getReportLogFileName(String metadataFileName)
{
if (metadataFileName.startsWith(".")) //$NON-NLS-1$
{
return IDE_LOG_REPORT_NAME_PREFIX + metadataFileName;
}
return metadataFileName;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the destination-conflict behavior of FileUtil.copyFile.
fd 'FileUtil.java' . -x sh -c '
  echo "=== $1 ==="
  rg -n -C 8 "\bcopyFile\s*\(" "$1"
' sh {}

# Find existing tests and filename-copy call sites.
rg -n -C 5 'getReportLogFileName|copyFile\(|ide_error_log\.log' \
  bundles tests

Repository: espressif/idf-eclipse-plugin

Length of output: 10041


Prevent report filename collisions.

.log is renamed to ide_error_log.log, but a visible ide_error_log.log uses the same destination path. Use a unique report name when the destination already exists. Add a test that copies both source files into one report.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@bundles/com.espressif.idf.core/src/com/espressif/idf/core/bug/BugReportGenerator.java`
around lines 194 - 200, Update getReportLogFileName to ensure the generated
report filename is unique when the destination already exists, including
collisions between the renamed hidden .log file and an existing visible
ide_error_log.log. Preserve the current naming behavior when no collision
occurs, and add a test covering both source files being copied into a single
report.

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.

1 participant