Currently my .conan/data folder is contained inside my user folder. Is there a way for me to specify a different location for this folder on a different drive? I'm only given a tiny amount of space on my C:/ drive and the .conan/data folder can get quite large in size.
I'm on Windows Conan version 0.30.3
Sure, use CONAN_USER_HOME environment variable, to fully move the cache (http://docs.conan.io/en/latest/reference/env_vars.html#conan-user-home), or use the [storage]
section in conan.conf to move just the storage of packages: http://docs.conan.io/en/latest/reference/config_files/conan.conf.html
Thanks @memsharded. I thought I had tried that but I guess I didn't try hard enough xD
Thanks again, love the Conan project!
Good! So the above answers your question? Can this issue be closed, or are you still trying it?
Many thanks!
For other readers out there, you can call conan config get storage.path
to get the location of the folder which is usually ~/.conan/data
by default.
@adaviding Thanks for this information, as a newbie I appreciate such comments very much.
Setting works like this:
conan config set storage.path=<your new path here>
Another way is to create a symbolic link. i.e on Windows:
mklink /j "C:\Users\User\.conan\" "D:\conan_packages\"
What I find strange tho, some packages I installed, i.e Qt
or Boost
generates another .conan
folder in my C:\
drive, so it ends up having packages in:
C:\.conan\
C:\Users\User\.conan\
the actual package generates a .conan_link
file:
C:\Users\User\.conan\data\qt\5.15.0\bincrafters\stable\package\hash\.conan_link
Which contains this line to link to actual package data:
C:\.conan\de0c7b\1\
Maybe it's a bug? or possibly it's a way to handle long paths on some systems. Not sure.
somewhat related to this question (I'll create a new one if appropriate), I have conan client in windows and in WSL. On install they have separate repositories. Can I setup the WSL conan client to use the same repository location used on Windows? Will there be any problems from the two clients (windows and wsl) using the same repository?
Is it as simple as changing the repostiory confing in WSL?
@giladreich
Maybe it's a bug? or possibly it's a way to handle long paths on some systems. Not sure.
Yes, this is the short_paths
feature for Windows. Implements a workaround to avoid the ugly path limit in Windows. It is a feature. The place of this folder can also be controlled with the CONAN_USER_HOME_SHORT
(https://docs.conan.io/en/latest/reference/env_vars.html)
@BobFIV
While they can in theory use the same Conan cache (locally we call it a cache, it is not intended to be a full repository, but mostly an optimization), there are a couple of things you should take into account:
conan config install
are preferred), if you are using it for some reason, most likely it will not be valid for both subsystems.Do not hesitate to create new issues for questions, or doubts. The activity in this repo is high, and comments on closed issues sometimes pass unnoticed.
Most helpful comment
For other readers out there, you can call
conan config get storage.path
to get the location of the folder which is usually~/.conan/data
by default.