question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[feature] Revisit precedence of values assigned to requirements' options (ATM, hardcoded value in configure method cannot be overridden)

See original GitHub issue

Right now a recipe can do:

def configure(self):
    self.options["mydep"].myoption = "value"

This has absolute precedence. It can never be overridden, even from command line doing -o mydep:myoption=othervalue

I would suggest to change this in Conan 2.0:

  • This has the same precedence as defining it in default_options, can be overriden by command line
  • Recipes will be able to validate(), post graph expansion and raise if they do not accept some upstream configuration.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
jgsogocommented, Oct 5, 2020

Unfortunately, Conan v1.x is not enforcing the scope for some attributes (access and modification) and it hasn’t been exhaustively documented, so we feel like changing it (or being more strict) might be considered breaking. Conan v2 should enforce it and make available to each function only the attributes that can be modified. At some point in time we will be more strict in ConanCenter so we detect these errors and fix them before moving to Conan 2.0 (probably we will take advantage of CONAN_V2_MODE variable).

1reaction
SpaceImcommented, Oct 2, 2020

I misunderstood, sorry, so this modification sounds good to me 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

[feature] Method to be run after the graph is resolved · Issue #7591 ...
[feature] Revisit precedence of values assigned to requirements' options (ATM, hardcoded value in configure method cannot be overridden) #7786.
Read more >
Default order settings for dimensions and product variants
Default order settings define the site and warehouse where items will be sourced from or stored, the minimum, maximum, multiple and standard ...
Read more >
Hibernate ORM 5.2.18.Final User Guide - Red Hat on GitHub
Default value for database column; 4.5. Columns unique constraint; 4.6. Columns index. 5. Persistence Contexts. 5.1. Accessing Hibernate APIs from JPA; 5.2.
Read more >
35 Common Merchant Center Errors + How to Fix Them
A complete guide of the 35 most common Merchant Center errors plus how to prevent and fix them. Price mismatch, missing shipping, incorrect...
Read more >
RFC 7950: The YANG 1.1 Data Modeling Language
This document also specifies the YANG mappings to the Network Configuration Protocol (NETCONF). Status of This Memo This is an Internet Standards Track ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found