Skip to content

Conversation

@AbrilRBS
Copy link
Member

@AbrilRBS AbrilRBS commented Nov 17, 2025

Changelog: Feature: Derive conanfile.version from latest available in conandata.yml as last alternative
Docs: TODO

This makes commands like conan source (note, no arguments!) possible to work if:

@AbrilRBS AbrilRBS changed the title What if version could be had from conan_data if unique when loading a conanfile? What if conanfile.version could be derived from conan_data when loading a conanfile if there's only 1 version declared? Nov 17, 2025
@AbrilRBS AbrilRBS marked this pull request as ready for review November 23, 2025 22:00
@AbrilRBS AbrilRBS added this to the 2.23.0 milestone Nov 23, 2025
@AbrilRBS AbrilRBS changed the title What if conanfile.version could be derived from conan_data when loading a conanfile if there's only 1 version declared? Derive conanfile.version from conan_data as last alternative Nov 23, 2025
@AbrilRBS AbrilRBS changed the title Derive conanfile.version from conan_data as last alternative Derive conanfile.version from latest available in conandata.yml as last alternative Nov 23, 2025
perseoGI
perseoGI previously approved these changes Nov 24, 2025
Copy link
Contributor

@perseoGI perseoGI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a really great addition for Conan UX.
Will avoid using a custom command 🚀

@uilianries
Copy link
Member

This feature sounds really interesting!!! But I would not keep it so magical due to the explicit design in Conan 2.x. Instead, I would suggest conan <command> --version=latest.

As a real example, when I need to validate recipes in CCI, I need to read the conandata.yml to list the latest version available.

@memsharded memsharded removed this from the 2.23.0 milestone Nov 24, 2025
@AbrilRBS AbrilRBS marked this pull request as draft November 24, 2025 20:26
@AbrilRBS AbrilRBS requested a review from perseoGI November 24, 2025 20:26
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

Successfully merging this pull request may close these issues.

5 participants