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] Profile include precedence #17583

Open
1 task done
jasal82 opened this issue Jan 16, 2025 · 1 comment
Open
1 task done

[feature] Profile include precedence #17583

jasal82 opened this issue Jan 16, 2025 · 1 comment

Comments

@jasal82
Copy link
Contributor

jasal82 commented Jan 16, 2025

What is your suggestion?

Currently the include mechanism seems to always prefer files in the $CONAN_HOME/profiles directory. Imagine the following situation:

  • We have a base profile base and a profile profile in $CONAN_HOME/profiles
  • The profile profile has a statement include(base)
  • When referencing the profile using -pr:h profile in a Conan command, the files are consumed as expected

But if we have a local snapshot of these profiles (both base and profile) in another directory (let's call that /path) and we reference the profile there using -pr:h /path/profile then Conan always includes the base file in $CONAN_HOME/profiles and not the one in /path.

I'd like to request a change of that behaviour. Conan should try to find the include in the directory of the parent profile first and then fall back to CONAN_HOME. If that cannot be made default for whatever reason, it could be added behind an opt-in via global.conf setting.

Have you read the CONTRIBUTING guide?

  • I've read the CONTRIBUTING guide
@jasal82
Copy link
Contributor Author

jasal82 commented Jan 16, 2025

I looked into the code and found that include(./base) works in this case. However, this is rather surprising (because usually ./x is considered equal to x) and not currently documented.

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

No branches or pull requests

1 participant