Skip to content

⚡ Avoid full lint builds and honor disabled IPO - #2470

Merged
burgholzer merged 4 commits into
mainfrom
codex/lint-build-preparation
Sep 8, 2026
Merged

⚡ Avoid full lint builds and honor disabled IPO#2470
burgholzer merged 4 commits into
mainfrom
codex/lint-build-preparation

Conversation

@burgholzer

@burgholzer burgholzer commented Sep 8, 2026

Copy link
Copy Markdown
Member

🤖 AI text below 🤖

Description

C++ lint currently builds and links the full project before analysis. Add mqt-core-lint-headers to prepare the dialect, interface, and pass headers needed by clang-tidy, and use it in local Nox and CI. Disable compiler-cache checks for this header-only CI preparation. The target is empty when MLIR is disabled.

Also fix ENABLE_IPO=OFF leaving cached IPO enabled after an earlier ON configuration. Compute the effective setting on every configure.

The reusable lint workflow is pinned to the merged commit from workflows #463.

Validation: required uvx nox -s lint passes; the actual uvx nox -s cpp-lint preparation succeeds in a fresh build directory. All 297 project translation units preprocess with the generated headers, and compiler pipeline, DDSIM device, compiler tests, and DD binding translation units pass syntax checks. Header preparation also succeeds without MLIR. No C++ source changed; the Nox linter therefore has no changed C++ files to analyze. Hosted CI remains pending.

GPT-6 via Codex implemented and validated this change at the maintainer's request.

Checklist

  • The pull request only contains commits that are focused and relevant to this change.
  • I have added appropriate tests that cover the new/changed functionality.
  • I have updated the documentation to reflect these changes.
  • I have added entries to the changelog for any noteworthy additions, changes, fixes, or removals.
  • I have added migration instructions to the upgrade guide (if needed).
  • The changes follow the project's style guidelines and introduce no new warnings.
  • The changes are fully tested and pass the CI checks.
  • I have reviewed my own code changes.

If PR contains AI-assisted content:

  • Any agent that created, edited, or submitted GitHub content was explicitly authorized for that scope, as required by our AI Usage Guidelines.
  • Every agent-authored or agent-edited public text body begins with the visible disclosure 🤖 *AI text below* 🤖 (titles are exempt).
  • I have disclosed AI assistance in the PR description.
  • I confirm that I have personally reviewed and understood all AI-generated content, and accept full responsibility for it.

Generate the headers needed by clang-tidy instead of building the full project. Adopt the targeted shared workflow and disable compiler-cache checks for header-only preparation.

Recompute effective IPO on each configure so turning ENABLE_IPO off clears stale optimization settings. Cover the on/off transition in a small CMake regression test.

Assisted-by: GPT-6 via Codex
@burgholzer burgholzer added continuous integration Anything related to the CI setup fix Fix for something that isn't working labels Sep 8, 2026
@burgholzer burgholzer self-assigned this Sep 8, 2026
@burgholzer burgholzer added this to the v4.0.0 - IEEE Quantum Week milestone Sep 8, 2026
Use the merged workflow from workflows #463.

Assisted-by: GPT-6 via Codex
Keep the IPO setting fix and remove its standalone CMake test.

Assisted-by: GPT-6 via Codex

@burgholzer burgholzer left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This should yield quite substantial improvements to local dev cycles as well as CI turnaround times for linting.

@burgholzer
burgholzer enabled auto-merge (squash) September 8, 2026 13:04
@codecov

codecov Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@burgholzer
burgholzer merged commit f65dadb into main Sep 8, 2026
27 checks passed
@burgholzer
burgholzer deleted the codex/lint-build-preparation branch September 8, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

continuous integration Anything related to the CI setup fix Fix for something that isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant