Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] .conanrc to specify repo-local workflow #11542

Closed
1 task done
blackliner opened this issue Jun 28, 2022 · 2 comments
Closed
1 task done

[feature] .conanrc to specify repo-local workflow #11542

blackliner opened this issue Jun 28, 2022 · 2 comments

Comments

@blackliner
Copy link
Contributor

Coming from a discussion with @memsharded:

Conan currently does not support implicit configuration of the conan cache (templates, hooks, packages etc), but only explicitly by setting a env variable CONAN_USER_HOME.

This request is about introducing a .conanrc called file that will be placed at the root of a repository, and contains useful metainformation, like local_user_home=True etc. Any conan CLI call will end up traversing the PWD until it finds such an .conanrc file and use it.

This will allow us to make the repository the real source of truth, instead of relying on a central cache. This can be an issue for example if you are working on different projects that use different, conflicting hooks.

This idea is heavily inspired by bazel's .bazelrc, and can be expanded to other use-cases:

  • define custom path to .conan/config, so it utilizes the repos filesystem instead of creating a new one, making conan config install calls obsolete. This would cover pofiles, hooks, remotes, templates...

  • I've read the CONTRIBUTING guide.

@memsharded
Copy link
Member

Lets do it in 2 steps:

  • Recover the storage.path configuration in the home global.conf
  • Define a .conanrc that contains env-var CONAN_HOME to define the location of the home (can be relative path to the .conanrc file, to define a local home per project)

@memsharded
Copy link
Member

Both features, the necessary storage-path configuration and the .conanrc file to define the home location, have been merged, and will be available in beta.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants