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

[question] Binary package id with default options #14301

Closed
1 task done
alessiosacco opened this issue Jul 14, 2023 · 2 comments
Closed
1 task done

[question] Binary package id with default options #14301

alessiosacco opened this issue Jul 14, 2023 · 2 comments
Assignees

Comments

@alessiosacco
Copy link

What is your question?

PR #14194 changes the default behaviour for some of the options. Do the options affect the binary artifact id?

If I build a package without specifying the default options in the recipe using conan 2.0.7 and conan 2.0.8, will the generated binary artifact id be the same?

Have you read the CONTRIBUTING guide?

  • I've read the CONTRIBUTING guide
@AbrilRBS AbrilRBS self-assigned this Jul 15, 2023
@AbrilRBS
Copy link
Member

Hi @alessiosacco thanks a lot for your question, great to see interest in super new features, we appreciate the feedback and questions we get regarding those as they help us to make better informed decisions!

So, you have a few questions:

Do the options affect the binary artifact id?

Yes, recipe options (As well as settings) affect the resulting package id, so that for example you don't end up with shared and static packages having the same id.

If I build a package without specifying the default options in the recipe using conan 2.0.7 and conan 2.0.8, will the generated binary artifact id be the same?

A few cases to consider:

  • If you do not define any options, the id's will be the same in both versions
  • If you defined the options, and also the configure(), config_options() & package_id() methods, the package id will be the same. Conan does not handle those methods by itself if they are already defined
  • If you defined the options, but did not define the methods, then yes, the resulting id might be different. This is expected. In 99.999% of cases, what Conan automatically handles is something that your recipe should already be doing, else it's a sign that something's up with it. If you have a really good reason not to let Conan handle those options (We know of some cases were some users were for example not removing the compiler for header-only libraries, for example), you can always define a the methods like:
def configure():
    pass

to opt out the automatic handling

Let me know if this helps, else I'll be happy to answer any other question you should have!

@memsharded
Copy link
Member

This has been reverted in 2.0.9, making it opt-in, please check:

I think we can close this ticket now, thanks very much for reporting, don't hesitate to open new tickets for any further question or issue.

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