conan-io / docs

conan.io reStructuredText documentation
http://docs.conan.io
MIT License
104 stars 352 forks source link

Mark reference to `build_requires` as deprecated #3445

Open fschoenm opened 10 months ago

fschoenm commented 10 months ago

The documentation at https://docs.conan.io/2/reference/conanfile/methods/requirements.html mentions build_requires. If I remember correctly, build_requires was deprecated in Conan 2.x. Maybe it should be marked as deprecated there.

memsharded commented 10 months ago

Thanks for reporting

We are not yet in 2.X, but in 2.0. There is a current note explaining the status:

build_requires
--------------

`build_requires` are used in Conan 2.0 to provide compatibility with the Conan 1.X syntax,
but their use is discouraged in Conan 2 and will be deprecated in future 2.X releases.
Please use `tool_requires` instead of `build_requires` in your Conan 2 recipes.

The comment in https://docs.conan.io/2/reference/conanfile/methods/requirements.html is necessary to explain what is the behavior and traits assigned by that legacy method.

I have also pushed https://github.com/conan-io/docs/commit/1175d861d10a89cc8ad72a63e9742ca9e8ab18fe to remove the only legacy usage I could find in the docs.