Skip to content

Conversation

@czoido
Copy link
Contributor

@czoido czoido commented Sep 12, 2025

Changelog: Fix: Move test_requires to build_requirements method in tests.
Docs: Omit

@czoido czoido added this to the 2.21.0 milestone Sep 12, 2025
Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

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

This change is good from the documentation and good-practices point of view.
But it sounds that the test suite should still keep some case that checks that a test_requires() keeps working inside a requirements() method, as this has been traditionally allowed, and if Conan started raising errors if this changed, in a breaking behavior, we wouldn't notice because the test suite no longer covers that case.

@czoido
Copy link
Contributor Author

czoido commented Sep 12, 2025

This change is good from the documentation and good-practices point of view. But it sounds that the test suite should still keep some case that checks that a test_requires() keeps working inside a requirements() method, as this has been traditionally allowed, and if Conan started raising errors if this changed, in a breaking behavior, we wouldn't notice because the test suite no longer covers that case.

I was thinking about leaving one in requirements or a new test that tests that explicitly?

@memsharded
Copy link
Member

I was thinking about leaving one in requirements or a new test that tests that explicitly?

Probably leaving one in requirements, adding a explicit comment about the intent to test that, but that is not recommended

@czoido czoido merged commit a2301ec into conan-io:develop2 Sep 15, 2025
15 checks passed
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