Skip to content

[cbuild2cmake] Add dependency for triggering compile_commands.json update#468

Merged
brondani merged 1 commit into
mainfrom
add-dependency-compile-commands
May 6, 2026
Merged

[cbuild2cmake] Add dependency for triggering compile_commands.json update#468
brondani merged 1 commit into
mainfrom
add-dependency-compile-commands

Conversation

@brondani
Copy link
Copy Markdown
Collaborator

@brondani brondani commented May 6, 2026

Fixes

Checklist

  • 🤖 This change is covered by unit tests (if applicable).
  • 🤹 Manual testing has been performed (if necessary).
  • 🛡️ Security impacts have been considered (if relevant).
  • 📖 Documentation updates are complete (if required).
  • 🧠 Third-party dependencies and TPIP updated (if required).

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@brondani brondani requested a review from Copilot May 6, 2026 15:36
@qltysh
Copy link
Copy Markdown

qltysh Bot commented May 6, 2026

Qlty


Coverage Impact

This PR will not change total coverage.

Modified Files with Diff Coverage (1)

RatingFile% DiffUncovered Line #s
Coverage rating: B Coverage rating: B
pkg/maker/contextlists.go100.0%
Total100.0%
🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

Test Results

  6 files  ±0   18 suites  ±0   1s ⏱️ -1s
109 tests ±0  109 ✅ ±0  0 💤 ±0  0 ❌ ±0 
654 runs  ±0  654 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 7497b11. ± Comparison against base commit c2da334.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR ensures the generated database target refreshes the exported ${OUT_DIR}/compile_commands.json whenever CMake regenerates ${CMAKE_CURRENT_BINARY_DIR}/compile_commands.json, addressing cases where the compilation database copy step previously would not re-run after updates.

Changes:

  • Add an explicit DEPENDS "${CMAKE_COMPILE_COMMANDS}" to the custom command that copies compile_commands.json.
  • Update golden/reference CMakeLists.txt test fixtures to match the newly generated output.
  • Update the generator (pkg/maker/contextlists.go) so all newly produced context CMakeLists.txt include the dependency.

Reviewed changes

Copilot reviewed 42 out of 42 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pkg/maker/contextlists.go Updates the generated context CMakeLists “database” copy rule to depend on the source compile_commands.json.
test/data/solutions/pre-include/ref/project.IAR+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/pre-include/ref/project.GCC+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/pre-include/ref/project.CLANG+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/pre-include/ref/project.AC6+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/pre-include-oot/ref/project.IAR+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/pre-include-oot/ref/project.GCC+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/pre-include-oot/ref/project.CLANG+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/pre-include-oot/ref/project.AC6+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/linker-pre-processing/ref/project.IAR+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/linker-pre-processing/ref/project.GCC+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/linker-pre-processing/ref/project.CLANG+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/linker-pre-processing/ref/project.AC6+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/link-lib/ref/project.GCC+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/link-lib/ref/project.CLANG+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/library-rtos/ref/project.IAR+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/library-rtos/ref/project.GCC+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/library-rtos/ref/project.CLANG+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/library-rtos/ref/project.AC6+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/language-scope/ref/project.IAR+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/language-scope/ref/project.GCC+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/language-scope/ref/project.CLANG+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/language-scope/ref/project.AC6+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/include-define/ref/project.IAR+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/include-define/ref/project.GCC+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/include-define/ref/project.CLANG+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/include-define/ref/project.AC6+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/executes/ref/project.Release+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/build-cpp/ref/project.IAR+ARMCM55/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/build-cpp/ref/project.GCC+ARMCM55/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/build-cpp/ref/project.CLANG+ARMCM55/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/build-cpp/ref/project.AC6+ARMCM55/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/build-c/ref/project.IAR+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/build-c/ref/project.GCC+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/build-c/ref/project.CLANG+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/build-c/ref/project.AC6+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/build-asm/ref/project.IAR+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/build-asm/ref/project.GCC+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/build-asm/ref/project.CLANG+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/build-asm/ref/project.AC6+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/blanks/ref/project X.AC6 X+ARMCM0 X/CMakeLists.txt Updates reference output to include the new dependency line.
test/data/solutions/abstractions/ref/project.GCC+ARMCM0/CMakeLists.txt Updates reference output to include the new dependency line.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@brondani brondani marked this pull request as ready for review May 6, 2026 15:44
@jkrech jkrech self-requested a review May 6, 2026 15:45
Copy link
Copy Markdown
Member

@jkrech jkrech left a comment

Choose a reason for hiding this comment

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

LGTM

@brondani brondani merged commit f8d6c6e into main May 6, 2026
77 of 80 checks passed
@brondani brondani deleted the add-dependency-compile-commands branch May 6, 2026 15:49
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.

3 participants