Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] test_requires to be able to force/override #14393

Closed
1 task done
Ignition opened this issue Jul 29, 2023 · 1 comment · Fixed by #14394
Closed
1 task done

[feature] test_requires to be able to force/override #14393

Ignition opened this issue Jul 29, 2023 · 1 comment · Fixed by #14394

Comments

@Ignition
Copy link
Contributor

Ignition commented Jul 29, 2023

What is your suggestion?

ATM build_requirements like this have version conflicts

self.test_requires("gtest/1.13.0")
self.test_requires("rapidcheck/cci.20220514", options={"enable_gtest": True, "enable_gmock": True})

ERROR: Version conflict: rapidcheck/cci.20220514->gtest/1.12.1, thing/0.0.0->gtest/1.13.0.

I'd like to simply add force=True, but ATM the test_requires wrapper around requires doesn't allow that so instead I have to use self.requires("gtest/1.13.0", force=True, test=True)

Have you read the CONTRIBUTING guide?

  • I've read the CONTRIBUTING guide
@memsharded
Copy link
Member

Hi @Ignition

There was a reason not to add force to test_requires, and it is that it is dangerous as it can change the main "host" product requires requirements, and this would be certainly unwanted.

But the case for resolving conflicts among several test_requires makes sense, so lets add it, and try to warn in the documentation about the possible side effects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants