-
Notifications
You must be signed in to change notification settings - Fork 993
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
[question] 2.0 Tool Requires #11763
Comments
Hi @beenjohn, Can you provide more details, maybe a reproducible example? For me, with a dummy recipe like this: from conan import ConanFile
from conan.tools.cmake import cmake_layout
class mylibRecipe(ConanFile):
name = "mylib"
version = "1.0"
# Binary configuration
settings = "os", "compiler", "build_type", "arch"
def layout(self):
cmake_layout(self)
def requirements(self):
self.requires("zlib/1.2.11")
self.tool_requires("cmake/3.19.8") And doing:
Works, creating a lockfile like this one:
|
Apologies for the delayed response. To clarify, the issue I'm seeing in 2.0.0-beta2 is that the tool_requires in the test_package is not ending up in the lockfile, but conan create fails due to the missing requirement. See below: libsodium (rough draft) 2.X conanfile:
libsodium test_package conanfile:
Lock creation:
|
Hi @beenjohn, Thanks! |
In the meantime, please check these comments: #11841 (comment) |
I agree that the failure makes sense given the lockfile is for the package rather than the test package. Being new to the community I wasn't quite sure of the "conan-approved" way to handle this type of setup, but I have a workaround for the time being. Thank you for digging into this in such a timely manner! I'll leave the ticket open for your tracking, but feel free to close it whenever you like. |
With this test #11841 we are capturing the behavior and the flow that allows to capture the |
When generating a lockfile in 2.0, the tool requires don't end up in the lock file. With cmake listed as a tool requires, "conan create ... --lockfile=..." return an error that cmake isn't listed in the lockfile. Is this expected behavior?
The text was updated successfully, but these errors were encountered: