Skip to content

cmake.default: fix exhausted iterable bug and clarify check-only scope - #373

Closed
neatudarius with Copilot wants to merge 5 commits into
mainfrom
copilot/fix-code-for-review-comments
Closed

cmake.default: fix exhausted iterable bug and clarify check-only scope#373
neatudarius with Copilot wants to merge 5 commits into
mainfrom
copilot/fix-code-for-review-comments

Conversation

Copilot AI commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Addresses two active review comments on the cmake.default check implementation.

Changes

  • Convert ast_tree to list before multi-pass iteration (cmake.py): get_cmake_parse_tree() returns an Iterable — passing it directly to _has_unconditional_library_target, _get_option_defaults, and _library_if_conditions in sequence would silently exhaust a generator after the first call, causing the latter two methods to always see empty input. Fixed with list(self.get_cmake_parse_tree()), consistent with cmake.skip_tests and cmake.skip_examples.

    # Before
    ast_tree = self.get_cmake_parse_tree()
    # After
    ast_tree = list(self.get_cmake_parse_tree())
  • Clarify fix-inplace skip reason (test_cmake.py): Updated test__cmake_default__fix_inplace skip reason from the generic "not implemented" to "fix-inplace not yet implemented: cmake.default is check-only", and expanded the docstring to explicitly document that fix() returning guidance-only is intentional — consistent with every other cmake check in the module.

Darius Neațu and others added 3 commits July 26, 2026 19:36
Move test__cmake_default__valid, test__cmake_default__invalid, and
test__cmake_default__fix_inplace to be adjacent, maintaining the
valid->invalid->fix pattern for each check.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 26, 2026 16:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because there is no eligible user to bill. To allow Copilot reviews on bot-authored pull requests, enable direct organization billing in your organization's Copilot settings.

Copilot AI review requested due to automatic review settings July 26, 2026 16:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because there is no eligible user to bill. To allow Copilot reviews on bot-authored pull requests, enable direct organization billing in your organization's Copilot settings.

Copilot AI changed the title [WIP] Fix code based on review comments cmake.default: fix exhausted iterable bug and clarify check-only scope Jul 26, 2026
Copilot AI requested a review from neatudarius July 26, 2026 16:55
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