Conan: Rename common variables in the codebase

Created on 14 Dec 2018  路  13Comments  路  Source: conan-io/conan

Conan references: ref
package references: pref
Client cache: cache
Conan Output: output
More?

low high engineering

Most helpful comment

Yes, I wouldn't mind to shorten client_cache to just cache, there is no big conflict with other caches in teh codebase

All 13 comments

why pref and client_cache and not package_reference or ccache? I mean, there is a pattern, doesn't?

Yes, I wouldn't mind to shorten client_cache to just cache, there is no big conflict with other caches in teh codebase

Sure. I just want you to complete the list & define what to do.

Not a variable, but there are several places in the sources (outputs) where we have OpenCV, when we have renamed this package to opencv. It's stupid, but I smile every time I see it.

Note: Change to ref only ConanFileReference objects. E.g.: conan_api arguments called reference, can be left as-is, because they are strings, they can be partial references sometimes, etc.

conan_api -> api? or conan_api -> conan?

ClientCache -> Cache?

conan_file and conanfile -> conanfile? when it is the result of parsing the ConanFile file

I would say:

  • conan_api -> api
  • conan_file -> conanfile
  • I am fine with Cache too instead of ClientCache

Agree with @memsharded message above

We already made this in 1.12

There is still work to do (and it will always be): renaming all the outputs to output for example, that was the idea of keeping this issue opened.

In this PR https://github.com/conan-io/conan/pull/4494#issuecomment-464100331 it is suggested to change the functions get_path to get_content (may look for a better name). These functions are being called from the CLI conan get ... to retrieve the contents of a file or the list of files in a directory.

Edited: Better to do a real refactor of the get_path as suggested at: https://github.com/conan-io/conan/issues/4549

Was this page helpful?
0 / 5 - 0 ratings