Conan: Consider not using the CACHE in conan install

Created on 27 Feb 2017  路  8Comments  路  Source: conan-io/conan

There is the issue https://github.com/conan-io/conan/issues/1015, which is creating problems due to the caching. But not only because of this.

It is true, that caching of settings/options/env is necessary for build, source, package, etc conan commands. But maybe conan install should always make explicit the inputs, via command line. "Explicit is better than implicit". Same for conan test_package.

Even if this can break something, it is extremely easy to fix, just provide a profile or settings in the command line, i.e. nothing to fix inside conan, just in the conan command invocation by users.

What do you think?

Most helpful comment

Yeah I am for this. This was really hard to find and debug when I ran into it the other day.

All 8 comments

Yeah I am for this. This was really hard to find and debug when I ran into it the other day.

Me too, I regularly test a package with different settings and I often run into a situation where I just end up deleting the whole package directory.

But maybe conan install should always make explicit the inputs, via command line

I'd say it should work with defaults, but if the settings are provided, conan should use those. Is this what you mean by this?

This issue doesn't affect the package or any directory in the conan local cache. It only affects the user space, where the conaninfo.txt file is generated and cached. Removing the temporary conaninfo.txt in the current dir, fixes the issue.

It already works as you said, if you provide command line args, they are used instead of the defaults. The main difference is if you already executed a conan install and you execute again in the same place, the existing conaninfo.txt will be used so you don't have to write again the same settings/options in the command line.

OK now I understand, in this case I fully support not using a cache, that is more intuitive.

@sztomi Cool, thanks!

yep, I've run into the same issue with cached conaninfo.txt which was very hard to debug (I've spent several hours until found problem via procmon) - so yep, I think it makes sense to avoid such caching

So we consistently agree, perfect. Yes, sure, it will be removed for next 0.21 release.

Released in 0.20.2

Was this page helpful?
0 / 5 - 0 ratings