You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to create a base package to be reused through python_requires. In Conan 1.58, the options from the base package were propagated. In Conan 2.0.2, I am getting errors during install.
To better understand what was going on, I added a call to traceback.print_stack() on the line that throws the above exception:
# conans/model/options.py line 85defvalidate(self):
# check that this has a valid option value definedifself._valueisnotNone:
returnifNonenotinself._possible_values:
importtracebacktraceback.print_stack()
raiseConanException("'options.%s' value not defined"%self._name)
This traceback is printed under the Computing necessary packages section:
<omitted>
======== Computing necessary packages ========
File "C:\Users\timzo\dev\pyenv\Scripts\conan-script.py", line 33, in <module>
sys.exit(load_entry_point('conan==2.0.2', 'console_scripts', 'conan')())
File "C:\Users\timzo\dev\pyenv\Lib\site-packages\conans\conan.py", line 7, in run
main(sys.argv[1:])
File "C:\Users\timzo\dev\pyenv\Lib\site-packages\conan\cli\cli.py", line 272, in main
cli.run(args)
File "C:\Users\timzo\dev\pyenv\Lib\site-packages\conan\cli\cli.py", line 171, in run
command.run(self._conan_api, self._commands[command_argument].parser, args[0][1:])
File "C:\Users\timzo\dev\pyenv\Lib\site-packages\conan\cli\command.py", line 156, in run
info = self._method(conan_api, parser, *args)
File "C:\Users\timzo\dev\pyenv\Lib\site-packages\conan\cli\commands\install.py", line 74, in install
conan_api.graph.analyze_binaries(deps_graph, args.build, remotes=remotes, update=args.update,
File "C:\Users\timzo\dev\pyenv\Lib\site-packages\conan\api\subapi\graph.py", line 190, in analyze_binaries
binaries_analyzer.evaluate_graph(graph, build_mode, lockfile, remotes, update)
File "C:\Users\timzo\dev\pyenv\Lib\site-packages\conans\client\graph\graph_binaries.py", line 316, in evaluate_graph
self._evaluate_package_id(node)
File "C:\Users\timzo\dev\pyenv\Lib\site-packages\conans\client\graph\graph_binaries.py", line 292, in _evaluate_package_id
compute_package_id(node, self._cache.new_config) # TODO: revise compute_package_id()
File "C:\Users\timzo\dev\pyenv\Lib\site-packages\conans\client\graph\compute_pid.py", line 59, in compute_package_id
run_validate_package_id(conanfile)
File "C:\Users\timzo\dev\pyenv\Lib\site-packages\conans\client\graph\compute_pid.py", line 81, in run_validate_package_id
conanfile.info.validate()
File "C:\Users\timzo\dev\pyenv\Lib\site-packages\conans\model\info.py", line 399, in validate
self.options.validate()
File "C:\Users\timzo\dev\pyenv\Lib\site-packages\conans\model\options.py", line 147, in validate
child.validate()
File "C:\Users\timzo\dev\pyenv\Lib\site-packages\conans\model\options.py", line 91, in validate
traceback.print_stack()
<omitted>
This was not happening in Conan 1.58.0. Also note that there are no issues stitching together the two collections of options in the init method of the deriving conanfile.
From the newest documentation, it is not clear to me if this should still be supported in 2.0 or not. The 1.58 docs already make no mention of inheriting options anymore.
Have you read the CONTRIBUTING guide?
I've read the CONTRIBUTING guide
The text was updated successfully, but these errors were encountered:
When init() is called, the options object is already created. Updating the default_options has no effect, the values can be passed to the self.options.update() as second argument.
I'll add a unit test to make this explicit and to introduce a note in the docs.
What is your question?
I am trying to create a base package to be reused through
python_requires
. In Conan 1.58, the options from the base package were propagated. In Conan 2.0.2, I am getting errors during install.The base package:
The consumer package:
When exporting the base package and trying to run install for the derived package:
I get the following error:
To better understand what was going on, I added a call to
traceback.print_stack()
on the line that throws the above exception:This traceback is printed under the
Computing necessary packages
section:This was not happening in Conan 1.58.0. Also note that there are no issues stitching together the two collections of options in the
init
method of the deriving conanfile.From the newest documentation, it is not clear to me if this should still be supported in 2.0 or not. The 1.58 docs already make no mention of inheriting options anymore.
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: