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

Test 'test_overrides.py' fails with CastXML-0.6.1 #164

Open
dl1jbe opened this issue Aug 8, 2023 · 0 comments
Open

Test 'test_overrides.py' fails with CastXML-0.6.1 #164

dl1jbe opened this issue Aug 8, 2023 · 0 comments

Comments

@dl1jbe
Copy link

dl1jbe commented Aug 8, 2023

With CastXML-0.6.1 installed "test_overrides.py" fails for >=pygccxml-2.2.1 with the following trace-back.

ERROR: test (unittests.test_overrides.Test.test)
Check that the override information is populated for the

Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pygccxml-2.3.0/work/pygccxml-2.3.0/unittests/test_overrides.py", line 26, in setUp
    decls = parser.parse([self.header], self.config)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/tmp/portage/dev-python/pygccxml-2.3.0/work/pygccxml-2.3.0/pygccxml/parser/__init__.py", line 51, in parse
    declarations = parser.read_files(files, compilation_mode)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/tmp/portage/dev-python/pygccxml-2.3.0/work/pygccxml-2.3.0/pygccxml/parser/project_reader.py", line 264, in read_files
    return self.__parse_file_by_file(files)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/tmp/portage/dev-python/pygccxml-2.3.0/work/pygccxml-2.3.0/pygccxml/parser/project_reader.py", line 292, in __parse_file_by_file
    decls = reader.read_file(header)
            ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/tmp/portage/dev-python/pygccxml-2.3.0/work/pygccxml-2.3.0/pygccxml/parser/source_reader.py", line 303, in read_file
    return self.read_cpp_source_file(source_file)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/tmp/portage/dev-python/pygccxml-2.3.0/work/pygccxml-2.3.0/pygccxml/parser/source_reader.py", line 323, in read_cpp_source_file
    decls, files = self.__parse_xml_file(xml_file)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/tmp/portage/dev-python/pygccxml-2.3.0/work/pygccxml-2.3.0/pygccxml/parser/source_reader.py", line 421, in __parse_xml_file
    patcher.fix_calldef_decls(
  File "/var/tmp/portage/dev-python/pygccxml-2.3.0/work/pygccxml-2.3.0/pygccxml/parser/patcher.py", line 261, in fix_calldef_decls
    default_arg_patcher(decl)
  File "/var/tmp/portage/dev-python/pygccxml-2.3.0/work/pygccxml-2.3.0/pygccxml/parser/patcher.py", line 23, in __call__
    fixer = self.__find_fixer(decl, arg)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/tmp/portage/dev-python/pygccxml-2.3.0/work/pygccxml-2.3.0/pygccxml/parser/patcher.py", line 32, in __find_fixer
    elif self.__is_invalid_integral(func, arg):
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/tmp/portage/dev-python/pygccxml-2.3.0/work/pygccxml-2.3.0/pygccxml/parser/patcher.py", line 75, in __is_invalid_integral
    if not declarations.is_integral(type_):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/tmp/portage/dev-python/pygccxml-2.3.0/work/pygccxml-2.3.0/pygccxml/declarations/type_traits.py", line 213, in is_integral
    return remove_alias(type_) in _integral_def
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/tmp/portage/dev-python/pygccxml-2.3.0/work/pygccxml-2.3.0/pygccxml/declarations/cpptypes.py", line 31, in __eq__
    return self.decl_string == other.decl_string
                               ^^^^^^^^^^^^^^^^^
  File "/var/tmp/portage/dev-python/pygccxml-2.3.0/work/pygccxml-2.3.0/pygccxml/declarations/cpptypes.py", line 50, in decl_string
    self.cache.decl_string = self.build_decl_string()
                             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/tmp/portage/dev-python/pygccxml-2.3.0/work/pygccxml-2.3.0/pygccxml/declarations/cpptypes.py", line 596, in build_decl_string
    if hasattr(self.base.declaration, "elaborated_type_specifier"):
               ^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'int_t' object has no attribute 'declaration'

Works without problems for CastXML-0.5.1. Not sure on which side (CastXML or PyGCCXML) the problem is.

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

No branches or pull requests

1 participant