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
Environment Details (include every applicable attribute)
Operating System+version: macOS 12.3
Compiler+version: Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Conan version: Conan version 1.51.3
Python version: Python 3.7.1
Steps to reproduce (Include if Applicable)
run simple recipe doing:
def validate_build(self):
from conan.errors import ConanInvalidConfiguration
from conan.tools.apple import is_apple_os
if is_apple_os(self):
raise ConanInvalidConfiguration("xxx")
as a result, sometimes it may raise ConanException instead of returning True/False as documented - it's not documented it can raise in any circumstances
Logs (Executed commands with output) (Include/Attach if Applicable)
if is_apple_os(self):
ConanException: 'self.settings' access in 'validate()' method is forbidden
The text was updated successfully, but these errors were encountered:
$ cat conanfile.py
from conan import ConanFile
class ConanFile1(ConanFile):
name = "dummy"
version = "1.0"
def validate_build(self):
from conan.tools.apple import is_apple_os
from conan.errors import ConanInvalidConfiguration
if is_apple_os(self):
raise ConanInvalidConfiguration("xxx")
def validate(self):
from conan.tools.apple import is_apple_os
from conan.errors import ConanInvalidConfiguration
if is_apple_os(self):
raise ConanInvalidConfiguration("xxx")
$ conan export . && conan install . --build=*
dummy/1.0: Exporting package recipe
dummy/1.0: Using the exported files summary hash as the recipe revision: 0ad93b2d3fb89162b6344ada30e388b3
dummy/1.0: A new conanfile.py version was exported
dummy/1.0: Folder: /home/conan/.conan2/p/a0d1a1c1d0eeed7f/e
dummy/1.0: Exported revision: 0ad93b2d3fb89162b6344ada30e388b3
Exported recipe: dummy/1.0#0ad93b2d3fb89162b6344ada30e388b3 (2022-09-16 14:11:28 UTC)
-------- Input profiles --------
Profile host:
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=gnu14
compiler.libcxx=libstdc++11
compiler.version=10
os=Linux
Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=gnu14
compiler.libcxx=libstdc++11
compiler.version=10
os=Linux
-------- Computing dependency graph --------
Graph root
conanfile.py (dummy/1.0): /home/conan/conanfile.py
-------- Computing necessary packages --------
ERROR: conanfile.py (dummy/1.0): Error in validate() method, line 14
if is_apple_os(self):
ConanException: 'self.settings' access in 'validate()' method is forbidden
Environment Details (include every applicable attribute)
Operating System+version: macOS 12.3
Compiler+version: Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Conan version: Conan version 1.51.3
Python version: Python 3.7.1
Steps to reproduce (Include if Applicable)
run simple recipe doing:
as a result, sometimes it may raise
ConanException
instead of returning True/False as documented - it's not documented it can raise in any circumstancesLogs (Executed commands with output) (Include/Attach if Applicable)
The text was updated successfully, but these errors were encountered: