Open jkuebart opened 2 years ago
Actually, this was a explicit decision. The graph_info.json
file is deprecated, and already removed in Conan 2.0. In theory, only the new generators (those in from conan.tools.xxxx
like CMakeDeps
) will be following the layout()
definition, but the previous generators will still output files in the previous locations.
Ok, but then I don't understand why I'm even getting a graph_info.json
file at all? In the example I explicitly set generators
to empty, but it also happens when I use generators = "CMakeDeps", "CMakeToolchain"
and these are both modern, right?
I've also seen the same happen for conanbuildinfo.txt
which even appears to be required by conan.tools.cmake.CMake
, at least I'm getting an error message when it's not present.
I'd be also interested why files such as graph_info.json
and conanbuildinfo.txt
are "polluting" the root folder where the conanfile.py
is located. When using the new generators (CMakeDeps
, CMakeToolchain
) including the cmake_layout()
why not place those files in the build/generators
location or any other location inside build
folder?
@memsharded is it possible to set a default install folder, for example through the conan client config? We want to avoid having those temporary files checked in by accident and we don't want to force everyone to use --install-folder
for every conan command (conan install, build, etc). Currently we've added all those temporary files to .gitignore
and use git clean
to get rid of them. All those workarounds definitely not increase the user experience. Having all those temporary files by default in the build folder could avoid these workarounds. Is that something which can be done for conan 1.X and would this be a change to cmake_layout()
?
Hi @fjp
Moving those files to a different place would be breaking behavior, because they are needed by conan build
command that do not evaluate the layout()
at all.
We understand this is not the best user experience, but a potential fix is not simple and would be risky. Conan 2.0 has removed this file and is getting very, very close, so efforts are focused on it.
Environment Details (include every applicable attribute)
Steps to reproduce (Include if Applicable)
After running the following script, there is a spurious file
lib/graph_info.json
generated by the last step,conan install app
. It is expected thatgraph_info.json
is generated in thelib/generators
folder like files created by other generators.Logs (Executed commands with output) (Include/Attach if Applicable)
The
tree
output shows the filelib/graph_info.json
which isn't supposed to exist in this location. It should be in thelib/generators
folder as specified bylayout(self)
inlib/conanfile.py
.