fix: make IDE error log visible in generated bug report - #1493
fix: make IDE error log visible in generated bug report#1493kolipakakondal wants to merge 1 commit into
Conversation
Rename Eclipse's hidden .log to ide_error_log.log when packaging so Finder and other file managers show it in the report.
📝 WalkthroughWalkthroughBug report generation now renames hidden IDE metadata log files with an ChangesIDE log naming
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (2)
bundles/com.espressif.idf.core/src/com/espressif/idf/core/bug/BugReportGenerator.javatests/com.espressif.idf.core.test/src/com/espressif/idf/core/bug/test/BugReportGeneratorTest.java
| public static String getReportLogFileName(String metadataFileName) | ||
| { | ||
| if (metadataFileName.startsWith(".")) //$NON-NLS-1$ | ||
| { | ||
| return IDE_LOG_REPORT_NAME_PREFIX + metadataFileName; | ||
| } | ||
| return metadataFileName; |
There was a problem hiding this comment.
🗄️ 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 testsRepository: 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.
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.
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 Configuration:
Dependent components impacted by this PR:
Checklist
Summary by CodeRabbit
Bug Fixes
.logfilename, making them easier to identify and open.Tests