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

some fixes and allow arbitrary types at get/setitem #188

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jpfeuffer
Copy link
Contributor

@jpfeuffer jpfeuffer commented Nov 7, 2024

User description

related to #184


PR Type

enhancement, bug_fix


Description

  • Enhanced the __getitem__ and __setitem__ methods to support arbitrary types, not just size_t and similar.
  • Added checks to ensure getitem and setitem methods only support a single argument.
  • Removed unnecessary signedness checks for indices in __getitem__.
  • Updated method signatures to accommodate arbitrary types, improving flexibility.
  • Modified matching_python_type in ConversionProvider to return "int" for non-pointer types.

Changes walkthrough 📝

Relevant files
Enhancement
CodeGenerator.py
Enhance `getitem` and `setitem` methods to support arbitrary types

autowrap/CodeGenerator.py

  • Added support for arbitrary types in __getitem__ and __setitem__
    methods.
  • Introduced checks for single argument support in getitem and setitem
    methods.
  • Removed unnecessary signedness checks for indices.
  • Updated method signatures to accommodate arbitrary types.
  • +20/-14 
    ConversionProvider.py
    Update matching Python type for non-pointer C++ types       

    autowrap/ConversionProvider.py

  • Updated matching_python_type to return "int" for non-pointer types.
  • +1/-1     

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    Copy link

    qodo-merge-pro bot commented Nov 7, 2024

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    🎫 Ticket compliance analysis 🔶

    184 - Partially compliant

    Fully compliant requirements:

    • Fix incorrect handling of size types in get_item
    • Address signedness warnings due to using signed long type after checking positivity

    Not compliant requirements:

    • Support get_item with strings for dict-like objects
    • Check for invalid indexes before converting to a fitting datatype
    ⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Incomplete Implementation
    The PR adds support for arbitrary types in getitem and setitem, but doesn't specifically handle strings for dict-like objects as requested in the ticket.

    Missing Validation
    The code doesn't check for invalid indexes before converting to a fitting datatype, which was a requirement in the ticket.

    Type Consistency
    The setitem method uses different type annotations in the stub code and the actual implementation. This inconsistency should be addressed.

    Copy link

    qodo-merge-pro bot commented Nov 7, 2024

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Score
    Possible bug
    Add bounds checking for array index access

    Consider adding error handling for cases where the index might be out of bounds,
    especially since the signedness check has been removed.

    autowrap/CodeGenerator.py [1676]

     cdef $ctype _idx = $call_arg
    +if _idx < 0 or _idx >= self._size:  # Assuming self._size exists
    +    raise IndexError("Index out of range")
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    Why: This suggestion adds important bounds checking that was removed in the PR. It helps prevent potential index out of range errors, significantly improving the robustness of the code.

    8
    Possible issue
    Implement a type check for the getitem method argument

    Consider adding a check to ensure that ctype is a basic type (class or builtin, not
    list/dict) before proceeding with the method implementation.

    autowrap/CodeGenerator.py [1664-1665]

    -# TODO make sure it is a basic type (class or builtin, no list/dict)
     ctype, _ = mdcl.arguments[0]
    +if not isinstance(ctype, (Class, Builtin)):
    +    raise TypeError("getitem method only supports basic types (class or builtin)")
    • Apply this suggestion
    Suggestion importance[1-10]: 7

    Why: This suggestion addresses an important TODO comment and adds a crucial type check, which could prevent potential runtime errors. It's a valuable addition to ensure type safety.

    7
    Add type checking for the value parameter in __setitem__ method

    Consider adding a type check for the 'value' parameter in the setitem method to
    ensure it matches the expected type.

    autowrap/CodeGenerator.py [1774-1776]

     def __setitem__(self, $ctype_in key, $res_t_base value):
         """$docstring"""
         assert isinstance(key, int), 'arg index wrong type'
    +    assert isinstance(value, $res_t_base), 'value is of wrong type'
    • Apply this suggestion
    Suggestion importance[1-10]: 6

    Why: The suggestion adds a valuable type check for the 'value' parameter, which complements the existing check for the 'key'. This improves type safety and can prevent potential bugs.

    6
    Maintainability
    Use more descriptive variable names to enhance code readability

    Consider using a more descriptive variable name instead of ctype to improve code
    readability and maintainability.

    autowrap/CodeGenerator.py [1665]

    -ctype, _ = mdcl.arguments[0]
    +index_type, _ = mdcl.arguments[0]
    • Apply this suggestion
    Suggestion importance[1-10]: 3

    Why: The suggestion improves code readability slightly by using a more descriptive variable name. However, the impact is minimal as the current name 'ctype' is already somewhat clear in context.

    3

    💡 Need additional feedback ? start a PR chat

    Copy link

    qodo-merge-pro bot commented Nov 7, 2024

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    CI Failure Feedback 🧐

    Action: test (<=0.29.21, 3.9)

    Failed stage: run tests [❌]

    Failed test name: test_stl_libcpp

    Failure summary:

    The action failed due to two test failures:

  • test_minimal in tests/test_code_generator_minimal.py failed with an AssertionError. The failure
    occurred because the subprocess command to build the extension did not return a zero exit code,
    indicating a build failure.
  • test_stl_libcpp in tests/test_code_generator_stllibcpp.py failed with an AttributeError. The error
    was caused by an attempt to access the base_type attribute on an EncodedString object, which does
    not have this attribute.

  • Relevant error logs:
    1:  ##[group]Operating System
    2:  Ubuntu
    ...
    
    643:  tests/test_code_generator_stllibcpp.py F                                 [ 16%]
    644:  tests/test_cython_build_process.py ..                                    [ 18%]
    645:  tests/test_decl_resolver.py ..........................                   [ 51%]
    646:  tests/test_full_library.py .                                             [ 52%]
    647:  tests/test_main.py ..                                                    [ 55%]
    648:  tests/test_pxd_parser.py ..........................                      [ 87%]
    649:  tests/test_types.py .....                                                [ 93%]
    650:  tests/test_utils.py .....                                                [100%]
    651:  =================================== FAILURES ===================================
    ...
    
    698:  import sys
    699:  tempdir = tempfile.mkdtemp()
    700:  if debug:
    701:  print("\n")
    702:  print("tempdir=", tempdir)
    703:  print("\n")
    704:  for source_file in source_files:
    705:  if source_file[-4:] != ".pyx" and source_file[-4:] != ".cpp":
    706:  raise NameError("Expected pyx and/or cpp files as source files for compilation.")
    ...
    
    742:  print("-" * 70)
    743:  print("\n")
    744:  >       assert (
    745:  subprocess.Popen(
    746:  "%s setup.py build_ext --force --inplace" % sys.executable, shell=True
    747:  ).wait()
    748:  == 0
    749:  )
    750:  E       AssertionError
    751:  /home/runner/work/autowrap/autowrap/autowrap/Utils.py:132: AssertionError
    ...
    
    902:  def __set__(self, bool m_bool):
    903:  self.inst.get().m_bool = (<bool>m_bool)
    904:  def __get__(self):
    905:  cdef bool _r = self.inst.get().m_bool
    906:  py_result = <bool>_r
    907:  return py_result
    908:  property m_const:
    909:  def __set__(self, int m_const):
    910:  raise AttributeError("Cannot set constant")
    911:  def __get__(self):
    912:  cdef int _r = self.inst.get().m_const
    913:  py_result = <int>_r
    914:  return py_result
    915:  property m_constdef:
    916:  def __set__(self, int m_constdef):
    917:  raise AttributeError("Cannot set constant")
    ...
    
    1218:  return py_result
    1219:  def __getitem__(self,  index ):
    1220:  """
    1221:  __getitem__(self, index: int ) -> int
    1222:  """
    1223:  assert isinstance(index, int) and index >= 0, 'arg index wrong type'
    1224:  cdef index _idx = (<size_t>index)
    1225:  if _idx >= self.inst.get().size():
    1226:  raise IndexError("invalid index %d" % _idx)
    ...
    
    1413:  def __irshift__(Minimal self, Minimal other not None):
    1414:  cdef _Minimal * this = self.inst.get()
    1415:  cdef _Minimal * that = other.inst.get()
    1416:  _irshift(this, that)
    1417:  return self
    1418:  def __richcmp__(self, other, op):
    1419:  if op not in (2,):
    1420:  op_str = {0: '<', 2: '==', 4: '>', 1: '<=', 3: '!=', 5: '>='}[op]
    1421:  raise NotImplementedError("Comparison operator %s not implemented" % op_str)
    1422:  if not isinstance(other, Minimal):
    1423:  raise NotImplementedError("Comparison currently only allowed with objects of the same type. Use isinstance and define yourself.")
    ...
    
    1450:  building 'wrapped' extension
    1451:  creating build
    1452:  creating build/temp.linux-x86_64-3.9
    1453:  gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/runner/work/autowrap/autowrap/autowrap/data_files/boost -I/home/runner/work/autowrap/autowrap/autowrap/data_files -I/home/runner/work/autowrap/autowrap/autowrap/data_files/autowrap -I/home/runner/work/autowrap/autowrap/tests/test_files -I/opt/hostedtoolcache/Python/3.9.20/x64/include/python3.9 -c minimal.cpp -o build/temp.linux-x86_64-3.9/minimal.o -std=c++11 -Wno-unused-but-set-variable
    1454:  gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/runner/work/autowrap/autowrap/autowrap/data_files/boost -I/home/runner/work/autowrap/autowrap/autowrap/data_files -I/home/runner/work/autowrap/autowrap/autowrap/data_files/autowrap -I/home/runner/work/autowrap/autowrap/tests/test_files -I/opt/hostedtoolcache/Python/3.9.20/x64/include/python3.9 -c minimal_wrapper.cpp -o build/temp.linux-x86_64-3.9/minimal_wrapper.o -std=c++11 -Wno-unused-but-set-variable
    1455:  ----------------------------- Captured stderr call -----------------------------
    1456:  /opt/hostedtoolcache/Python/3.9.20/x64/lib/python3.9/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/tmprzwhd2he/minimal_wrapper.pyx
    1457:  tree = Parsing.p_module(s, pxd, full_module_name)
    1458:  Error compiling Cython file:
    ...
    
    1461:  """
    1462:  __getitem__(self, index: int ) -> int
    1463:  """
    1464:  assert isinstance(index, int) and index >= 0, 'arg index wrong type'
    1465:  cdef index _idx = (<size_t>index)
    1466:  ^
    1467:  ------------------------------------------------------------
    1468:  minimal_wrapper.pyx:517:13: 'index' is not a type identifier
    1469:  minimal_wrapper.cpp:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation.
    1470:  1 | #error Do not use this file, it is the result of a failed Cython compilation.
    1471:  |  ^~~~~
    1472:  error: command '/usr/bin/gcc' failed with exit code 1
    ...
    
    1563:  self = <autowrap.ConversionProvider.ConverterRegistry object at 0x7f28d4b103a0>
    1564:  cpp_type = 'index'
    1565:  def get(self, cpp_type: CppType) -> TypeConverterBase:
    1566:  """
    1567:  Gets a conversion provider that inherits from TypeConverterBase and matches both cpp_type.base_type
    1568:  and the matches function from the successfully looked-up TypeConverter
    1569:  :param cpp_type: CppType
    1570:  :return: TypeConverterBase
    1571:  :except: NameError
    1572:  """
    1573:  >       rv = [conv for conv in self.lookup[cpp_type.base_type] if conv.matches(cpp_type)]
    1574:  E       AttributeError: 'EncodedString' object has no attribute 'base_type'
    1575:  /home/runner/work/autowrap/autowrap/autowrap/ConversionProvider.py:2209: AttributeError
    ...
    
    1612:  INFO     autowrap:DeclResolver.py:603 resolve method decl: 'CppMethodOrFunctionDecl: libcpp_map[IntWrapper,int] process_8_map (['int in_'])'
    1613:  INFO     autowrap:DeclResolver.py:603 resolve method decl: 'CppMethodOrFunctionDecl: int process_9_map (['libcpp_map[int,IntWrapper] & in_'])'
    1614:  INFO     autowrap:DeclResolver.py:603 resolve method decl: 'CppMethodOrFunctionDecl: libcpp_map[int,IntWrapper] process_10_map (['int in_'])'
    1615:  INFO     autowrap:DeclResolver.py:603 resolve method decl: 'CppMethodOrFunctionDecl: shared_ptr[const IntWrapper] process_11_const ([])'
    1616:  INFO     autowrap:DeclResolver.py:603 resolve method decl: 'CppMethodOrFunctionDecl: int process_12_map (['libcpp_map[libcpp_string,IntWrapper] & in_'])'
    1617:  INFO     autowrap:DeclResolver.py:603 resolve method decl: 'CppMethodOrFunctionDecl: int process_13_map (['libcpp_map[IntWrapper,libcpp_vector[int]] & in_'])'
    1618:  INFO     autowrap:DeclResolver.py:603 resolve method decl: 'CppMethodOrFunctionDecl: int process_14_map (['libcpp_map[IntWrapper,IntVecWrapper] & in_'])'
    1619:  =========================== short test summary info ============================
    1620:  FAILED tests/test_code_generator_minimal.py::test_minimal - AssertionError
    1621:  FAILED tests/test_code_generator_stllibcpp.py::test_stl_libcpp - AttributeError: 'EncodedString' object has no attribute 'base_type'
    1622:  ======================== 2 failed, 78 passed in 46.09s =========================
    1623:  ##[error]Process completed with exit code 1.
    

    ✨ CI feedback usage guide:

    The CI feedback tool (/checks) automatically triggers when a PR has a failed check.
    The tool analyzes the failed checks and provides several feedbacks:

    • Failed stage
    • Failed test name
    • Failure summary
    • Relevant error logs

    In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:

    /checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}"
    

    where {repo_name} is the name of the repository, {run_number} is the run number of the failed check, and {job_number} is the job number of the failed check.

    Configuration options

    • enable_auto_checks_feedback - if set to true, the tool will automatically provide feedback when a check is failed. Default is true.
    • excluded_checks_list - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list.
    • enable_help_text - if set to true, the tool will provide a help message with the feedback. Default is true.
    • persistent_comment - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true.
    • final_update_message - if persistent_comment is true and updating a previous checks message, the tool will also create a new message: "Persistent checks updated to latest commit". Default is true.

    See more information about the checks tool in the docs.

    Copy link

    qodo-merge-pro bot commented Nov 7, 2024

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    CI Failure Feedback 🧐

    Action: test (<=0.29.21, 3.7)

    Failed stage: run tests [❌]

    Failed test name: test_stl_libcpp

    Failure summary:

    The action failed due to two test failures:

  • test_minimal in tests/test_code_generator_minimal.py failed with an AssertionError. The assertion
    failed because the subprocess command for building extensions did not return a zero exit status,
    indicating a failure in the build process.
  • test_stl_libcpp in tests/test_code_generator_stllibcpp.py failed with an AttributeError. The error
    occurred because an 'EncodedString' object was accessed for an attribute base_type that does not
    exist.

  • Relevant error logs:
    1:  ##[group]Operating System
    2:  Ubuntu
    ...
    
    665:  tests/test_code_generator_stllibcpp.py F                                 [ 16%]
    666:  tests/test_cython_build_process.py ..                                    [ 18%]
    667:  tests/test_decl_resolver.py ..........................                   [ 51%]
    668:  tests/test_full_library.py .                                             [ 52%]
    669:  tests/test_main.py ..                                                    [ 55%]
    670:  tests/test_pxd_parser.py ..........................                      [ 87%]
    671:  tests/test_types.py .....                                                [ 93%]
    672:  tests/test_utils.py .....                                                [100%]
    673:  =================================== FAILURES ===================================
    ...
    
    720:  import sys
    721:  tempdir = tempfile.mkdtemp()
    722:  if debug:
    723:  print("\n")
    724:  print("tempdir=", tempdir)
    725:  print("\n")
    726:  for source_file in source_files:
    727:  if source_file[-4:] != ".pyx" and source_file[-4:] != ".cpp":
    728:  raise NameError("Expected pyx and/or cpp files as source files for compilation.")
    ...
    
    764:  print("-" * 70)
    765:  print("\n")
    766:  assert (
    767:  subprocess.Popen(
    768:  "%s setup.py build_ext --force --inplace" % sys.executable, shell=True
    769:  ).wait()
    770:  >           == 0
    771:  )
    772:  E       AssertionError
    773:  /home/runner/work/autowrap/autowrap/autowrap/Utils.py:136: AssertionError
    ...
    
    924:  def __set__(self, bool m_bool):
    925:  self.inst.get().m_bool = (<bool>m_bool)
    926:  def __get__(self):
    927:  cdef bool _r = self.inst.get().m_bool
    928:  py_result = <bool>_r
    929:  return py_result
    930:  property m_const:
    931:  def __set__(self, int m_const):
    932:  raise AttributeError("Cannot set constant")
    933:  def __get__(self):
    934:  cdef int _r = self.inst.get().m_const
    935:  py_result = <int>_r
    936:  return py_result
    937:  property m_constdef:
    938:  def __set__(self, int m_constdef):
    939:  raise AttributeError("Cannot set constant")
    ...
    
    1240:  return py_result
    1241:  def __getitem__(self,  index ):
    1242:  """
    1243:  __getitem__(self, index: int ) -> int
    1244:  """
    1245:  assert isinstance(index, int) and index >= 0, 'arg index wrong type'
    1246:  cdef index _idx = (<size_t>index)
    1247:  if _idx >= self.inst.get().size():
    1248:  raise IndexError("invalid index %d" % _idx)
    ...
    
    1435:  def __irshift__(Minimal self, Minimal other not None):
    1436:  cdef _Minimal * this = self.inst.get()
    1437:  cdef _Minimal * that = other.inst.get()
    1438:  _irshift(this, that)
    1439:  return self
    1440:  def __richcmp__(self, other, op):
    1441:  if op not in (2,):
    1442:  op_str = {0: '<', 2: '==', 4: '>', 1: '<=', 3: '!=', 5: '>='}[op]
    1443:  raise NotImplementedError("Comparison operator %s not implemented" % op_str)
    1444:  if not isinstance(other, Minimal):
    1445:  raise NotImplementedError("Comparison currently only allowed with objects of the same type. Use isinstance and define yourself.")
    ...
    
    1469:  Autowrap has wrapped 1 classes, 52 methods and 1 enums
    1470:  running build_ext
    1471:  cythoning minimal_wrapper.pyx to minimal_wrapper.cpp
    1472:  building 'wrapped' extension
    1473:  creating build
    1474:  creating build/temp.linux-x86_64-3.7
    1475:  gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/runner/work/autowrap/autowrap/autowrap/data_files/boost -I/home/runner/work/autowrap/autowrap/autowrap/data_files -I/home/runner/work/autowrap/autowrap/autowrap/data_files/autowrap -I/home/runner/work/autowrap/autowrap/tests/test_files -I/opt/hostedtoolcache/Python/3.7.17/x64/include/python3.7m -c minimal_wrapper.cpp -o build/temp.linux-x86_64-3.7/minimal_wrapper.o -std=c++11 -Wno-unused-but-set-variable
    1476:  ----------------------------- Captured stderr call -----------------------------
    1477:  minimal_wrapper.cpp:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation.
    1478:  1 | #error Do not use this file, it is the result of a failed Cython compilation.
    1479:  |  ^~~~~
    1480:  /opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/tmp200fgwmt/minimal_wrapper.pyx
    1481:  tree = Parsing.p_module(s, pxd, full_module_name)
    1482:  Error compiling Cython file:
    ...
    
    1485:  """
    1486:  __getitem__(self, index: int ) -> int
    1487:  """
    1488:  assert isinstance(index, int) and index >= 0, 'arg index wrong type'
    1489:  cdef index _idx = (<size_t>index)
    1490:  ^
    1491:  ------------------------------------------------------------
    1492:  minimal_wrapper.pyx:517:13: 'index' is not a type identifier
    1493:  error: command 'gcc' failed with exit status 1
    ...
    
    1584:  self = <autowrap.ConversionProvider.ConverterRegistry object at 0x7fb872b868d0>
    1585:  cpp_type = 'index'
    1586:  def get(self, cpp_type: CppType) -> TypeConverterBase:
    1587:  """
    1588:  Gets a conversion provider that inherits from TypeConverterBase and matches both cpp_type.base_type
    1589:  and the matches function from the successfully looked-up TypeConverter
    1590:  :param cpp_type: CppType
    1591:  :return: TypeConverterBase
    1592:  :except: NameError
    1593:  """
    1594:  >       rv = [conv for conv in self.lookup[cpp_type.base_type] if conv.matches(cpp_type)]
    1595:  E       AttributeError: 'EncodedString' object has no attribute 'base_type'
    1596:  /home/runner/work/autowrap/autowrap/autowrap/ConversionProvider.py:2209: AttributeError
    ...
    
    1633:  INFO     autowrap:DeclResolver.py:603 resolve method decl: 'CppMethodOrFunctionDecl: libcpp_map[IntWrapper,int] process_8_map (['int in_'])'
    1634:  INFO     autowrap:DeclResolver.py:603 resolve method decl: 'CppMethodOrFunctionDecl: int process_9_map (['libcpp_map[int,IntWrapper] & in_'])'
    1635:  INFO     autowrap:DeclResolver.py:603 resolve method decl: 'CppMethodOrFunctionDecl: libcpp_map[int,IntWrapper] process_10_map (['int in_'])'
    1636:  INFO     autowrap:DeclResolver.py:603 resolve method decl: 'CppMethodOrFunctionDecl: shared_ptr[const IntWrapper] process_11_const ([])'
    1637:  INFO     autowrap:DeclResolver.py:603 resolve method decl: 'CppMethodOrFunctionDecl: int process_12_map (['libcpp_map[libcpp_string,IntWrapper] & in_'])'
    1638:  INFO     autowrap:DeclResolver.py:603 resolve method decl: 'CppMethodOrFunctionDecl: int process_13_map (['libcpp_map[IntWrapper,libcpp_vector[int]] & in_'])'
    1639:  INFO     autowrap:DeclResolver.py:603 resolve method decl: 'CppMethodOrFunctionDecl: int process_14_map (['libcpp_map[IntWrapper,IntVecWrapper] & in_'])'
    1640:  =========================== short test summary info ============================
    1641:  FAILED tests/test_code_generator_minimal.py::test_minimal - AssertionError
    1642:  FAILED tests/test_code_generator_stllibcpp.py::test_stl_libcpp - AttributeError: 'EncodedString' object has no attribute 'base_type'
    1643:  ======================== 2 failed, 78 passed in 45.56s =========================
    1644:  ##[error]Process completed with exit code 1.
    

    ✨ CI feedback usage guide:

    The CI feedback tool (/checks) automatically triggers when a PR has a failed check.
    The tool analyzes the failed checks and provides several feedbacks:

    • Failed stage
    • Failed test name
    • Failure summary
    • Relevant error logs

    In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:

    /checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}"
    

    where {repo_name} is the name of the repository, {run_number} is the run number of the failed check, and {job_number} is the job number of the failed check.

    Configuration options

    • enable_auto_checks_feedback - if set to true, the tool will automatically provide feedback when a check is failed. Default is true.
    • excluded_checks_list - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list.
    • enable_help_text - if set to true, the tool will provide a help message with the feedback. Default is true.
    • persistent_comment - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true.
    • final_update_message - if persistent_comment is true and updating a previous checks message, the tool will also create a new message: "Persistent checks updated to latest commit". Default is true.

    See more information about the checks tool in the docs.

    Copy link

    qodo-merge-pro bot commented Nov 7, 2024

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    CI Failure Feedback 🧐

    Action: test (==3.0.0a10, 3.10)

    Failed stage: run tests [❌]

    Failed test name: test_stl_libcpp

    Failure summary:

    The action failed due to two test failures:

  • test_minimal in tests/test_code_generator_minimal.py failed with an AssertionError. The specific
    assertion that failed was checking the return code of a subprocess call to build extensions using
    Cython.
  • test_stl_libcpp in tests/test_code_generator_stllibcpp.py failed with an AttributeError. The error
    occurred because an EncodedString object did not have the expected attribute base_type.

  • Relevant error logs:
    1:  ##[group]Operating System
    2:  Ubuntu
    ...
    
    647:  tests/test_code_generator_stllibcpp.py F                                 [ 16%]
    648:  tests/test_cython_build_process.py ..                                    [ 18%]
    649:  tests/test_decl_resolver.py ..........................                   [ 51%]
    650:  tests/test_full_library.py .                                             [ 52%]
    651:  tests/test_main.py ..                                                    [ 55%]
    652:  tests/test_pxd_parser.py ..........................                      [ 87%]
    653:  tests/test_types.py .....                                                [ 93%]
    654:  tests/test_utils.py .....                                                [100%]
    655:  =================================== FAILURES ===================================
    ...
    
    702:  import sys
    703:  tempdir = tempfile.mkdtemp()
    704:  if debug:
    705:  print("\n")
    706:  print("tempdir=", tempdir)
    707:  print("\n")
    708:  for source_file in source_files:
    709:  if source_file[-4:] != ".pyx" and source_file[-4:] != ".cpp":
    710:  raise NameError("Expected pyx and/or cpp files as source files for compilation.")
    ...
    
    746:  print("-" * 70)
    747:  print("\n")
    748:  assert (
    749:  >           subprocess.Popen(
    750:  "%s setup.py build_ext --force --inplace" % sys.executable, shell=True
    751:  ).wait()
    752:  == 0
    753:  )
    754:  E       AssertionError
    755:  /home/runner/work/autowrap/autowrap/autowrap/Utils.py:133: AssertionError
    ...
    
    906:  def __set__(self, bool m_bool):
    907:  self.inst.get().m_bool = (<bool>m_bool)
    908:  def __get__(self):
    909:  cdef bool _r = self.inst.get().m_bool
    910:  py_result = <bool>_r
    911:  return py_result
    912:  property m_const:
    913:  def __set__(self, int m_const):
    914:  raise AttributeError("Cannot set constant")
    915:  def __get__(self):
    916:  cdef int _r = self.inst.get().m_const
    917:  py_result = <int>_r
    918:  return py_result
    919:  property m_constdef:
    920:  def __set__(self, int m_constdef):
    921:  raise AttributeError("Cannot set constant")
    ...
    
    1222:  return py_result
    1223:  def __getitem__(self,  index ):
    1224:  """
    1225:  __getitem__(self, index: int ) -> int
    1226:  """
    1227:  assert isinstance(index, int) and index >= 0, 'arg index wrong type'
    1228:  cdef index _idx = (<size_t>index)
    1229:  if _idx >= self.inst.get().size():
    1230:  raise IndexError("invalid index %d" % _idx)
    ...
    
    1417:  def __irshift__(Minimal self, Minimal other not None):
    1418:  cdef _Minimal * this = self.inst.get()
    1419:  cdef _Minimal * that = other.inst.get()
    1420:  _irshift(this, that)
    1421:  return self
    1422:  def __richcmp__(self, other, op):
    1423:  if op not in (2,):
    1424:  op_str = {0: '<', 2: '==', 4: '>', 1: '<=', 3: '!=', 5: '>='}[op]
    1425:  raise NotImplementedError("Comparison operator %s not implemented" % op_str)
    1426:  if not isinstance(other, Minimal):
    1427:  raise NotImplementedError("Comparison currently only allowed with objects of the same type. Use isinstance and define yourself.")
    ...
    
    1450:  run_static_extra_arg = __static_Minimal_run_static_extra_arg 
    1451:  Autowrap has wrapped 1 classes, 52 methods and 1 enums
    1452:  running build_ext
    1453:  [1/1] Cythonizing minimal_wrapper.pyx
    1454:  ----------------------------- Captured stderr call -----------------------------
    1455:  WARNING: '.' not a valid package name; please use only .-separated package names in setup.py
    1456:  /opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/Cython/Compiler/Main.py:346: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /tmp/tmp33uoyhg_/minimal_wrapper.pyx
    1457:  tree = Parsing.p_module(s, pxd, full_module_name)
    1458:  Error compiling Cython file:
    ...
    
    1487:  self._build_extensions_serial()
    1488:  File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 492, in _build_extensions_serial
    1489:  self.build_extension(ext)
    1490:  File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/Cython/Distutils/build_ext.py", line 122, in build_extension
    1491:  new_ext = cythonize(
    1492:  File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1117, in cythonize
    1493:  cythonize_one(*args)
    1494:  File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1284, in cythonize_one
    1495:  raise CompileError(None, pyx_file)
    1496:  Cython.Compiler.Errors.CompileError: minimal_wrapper.pyx
    ...
    
    1587:  self = <autowrap.ConversionProvider.ConverterRegistry object at 0x7f80b4d1f400>
    1588:  cpp_type = 'index'
    1589:  def get(self, cpp_type: CppType) -> TypeConverterBase:
    1590:  """
    1591:  Gets a conversion provider that inherits from TypeConverterBase and matches both cpp_type.base_type
    1592:  and the matches function from the successfully looked-up TypeConverter
    1593:  :param cpp_type: CppType
    1594:  :return: TypeConverterBase
    1595:  :except: NameError
    1596:  """
    1597:  >       rv = [conv for conv in self.lookup[cpp_type.base_type] if conv.matches(cpp_type)]
    1598:  E       AttributeError: 'EncodedString' object has no attribute 'base_type'
    1599:  /home/runner/work/autowrap/autowrap/autowrap/ConversionProvider.py:2209: AttributeError
    ...
    
    1636:  INFO     autowrap:DeclResolver.py:603 resolve method decl: 'CppMethodOrFunctionDecl: libcpp_map[IntWrapper,int] process_8_map (['int in_'])'
    1637:  INFO     autowrap:DeclResolver.py:603 resolve method decl: 'CppMethodOrFunctionDecl: int process_9_map (['libcpp_map[int,IntWrapper] & in_'])'
    1638:  INFO     autowrap:DeclResolver.py:603 resolve method decl: 'CppMethodOrFunctionDecl: libcpp_map[int,IntWrapper] process_10_map (['int in_'])'
    1639:  INFO     autowrap:DeclResolver.py:603 resolve method decl: 'CppMethodOrFunctionDecl: shared_ptr[const IntWrapper] process_11_const ([])'
    1640:  INFO     autowrap:DeclResolver.py:603 resolve method decl: 'CppMethodOrFunctionDecl: int process_12_map (['libcpp_map[libcpp_string,IntWrapper] & in_'])'
    1641:  INFO     autowrap:DeclResolver.py:603 resolve method decl: 'CppMethodOrFunctionDecl: int process_13_map (['libcpp_map[IntWrapper,libcpp_vector[int]] & in_'])'
    1642:  INFO     autowrap:DeclResolver.py:603 resolve method decl: 'CppMethodOrFunctionDecl: int process_14_map (['libcpp_map[IntWrapper,IntVecWrapper] & in_'])'
    1643:  =========================== short test summary info ============================
    1644:  FAILED tests/test_code_generator_minimal.py::test_minimal - AssertionError
    1645:  FAILED tests/test_code_generator_stllibcpp.py::test_stl_libcpp - AttributeError: 'EncodedString' object has no attribute 'base_type'
    1646:  =================== 2 failed, 78 passed in 63.17s (0:01:03) ====================
    1647:  ##[error]Process completed with exit code 1.
    

    ✨ CI feedback usage guide:

    The CI feedback tool (/checks) automatically triggers when a PR has a failed check.
    The tool analyzes the failed checks and provides several feedbacks:

    • Failed stage
    • Failed test name
    • Failure summary
    • Relevant error logs

    In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:

    /checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}"
    

    where {repo_name} is the name of the repository, {run_number} is the run number of the failed check, and {job_number} is the job number of the failed check.

    Configuration options

    • enable_auto_checks_feedback - if set to true, the tool will automatically provide feedback when a check is failed. Default is true.
    • excluded_checks_list - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list.
    • enable_help_text - if set to true, the tool will provide a help message with the feedback. Default is true.
    • persistent_comment - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true.
    • final_update_message - if persistent_comment is true and updating a previous checks message, the tool will also create a new message: "Persistent checks updated to latest commit". Default is true.

    See more information about the checks tool in the docs.

    Copy link

    qodo-merge-pro bot commented Nov 7, 2024

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    CI Failure Feedback 🧐

    Action: test (>0.29.21, 3.7)

    Failed stage: run tests [❌]

    Failed test name: test_stl_libcpp

    Failure summary:

    The action failed due to two test failures:

  • test_minimal in tests/test_code_generator_minimal.py failed with an AssertionError. The specific
    assertion failure is not detailed in the log.
  • test_stl_libcpp in tests/test_code_generator_stllibcpp.py failed with an AttributeError. The error
    occurred because an EncodedString object was accessed with a non-existent attribute base_type.

  • Relevant error logs:
    1:  ##[group]Operating System
    2:  Ubuntu
    ...
    
    665:  tests/test_code_generator_stllibcpp.py F                                 [ 16%]
    666:  tests/test_cython_build_process.py ..                                    [ 18%]
    667:  tests/test_decl_resolver.py ..........................                   [ 51%]
    668:  tests/test_full_library.py .                                             [ 52%]
    669:  tests/test_main.py ..                                                    [ 55%]
    670:  tests/test_pxd_parser.py ..........................                      [ 87%]
    671:  tests/test_types.py .....                                                [ 93%]
    672:  tests/test_utils.py .....                                                [100%]
    673:  =================================== FAILURES ===================================
    ...
    
    720:  import sys
    721:  tempdir = tempfile.mkdtemp()
    722:  if debug:
    723:  print("\n")
    724:  print("tempdir=", tempdir)
    725:  print("\n")
    726:  for source_file in source_files:
    727:  if source_file[-4:] != ".pyx" and source_file[-4:] != ".cpp":
    728:  raise NameError("Expected pyx and/or cpp files as source files for compilation.")
    ...
    
    764:  print("-" * 70)
    765:  print("\n")
    766:  assert (
    767:  subprocess.Popen(
    768:  "%s setup.py build_ext --force --inplace" % sys.executable, shell=True
    769:  ).wait()
    770:  >           == 0
    771:  )
    772:  E       AssertionError
    773:  /home/runner/work/autowrap/autowrap/autowrap/Utils.py:136: AssertionError
    ...
    
    924:  def __set__(self, bool m_bool):
    925:  self.inst.get().m_bool = (<bool>m_bool)
    926:  def __get__(self):
    927:  cdef bool _r = self.inst.get().m_bool
    928:  py_result = <bool>_r
    929:  return py_result
    930:  property m_const:
    931:  def __set__(self, int m_const):
    932:  raise AttributeError("Cannot set constant")
    933:  def __get__(self):
    934:  cdef int _r = self.inst.get().m_const
    935:  py_result = <int>_r
    936:  return py_result
    937:  property m_constdef:
    938:  def __set__(self, int m_constdef):
    939:  raise AttributeError("Cannot set constant")
    ...
    
    1240:  return py_result
    1241:  def __getitem__(self,  index ):
    1242:  """
    1243:  __getitem__(self, index: int ) -> int
    1244:  """
    1245:  assert isinstance(index, int) and index >= 0, 'arg index wrong type'
    1246:  cdef index _idx = (<size_t>index)
    1247:  if _idx >= self.inst.get().size():
    1248:  raise IndexError("invalid index %d" % _idx)
    ...
    
    1435:  def __irshift__(Minimal self, Minimal other not None):
    1436:  cdef _Minimal * this = self.inst.get()
    1437:  cdef _Minimal * that = other.inst.get()
    1438:  _irshift(this, that)
    1439:  return self
    1440:  def __richcmp__(self, other, op):
    1441:  if op not in (2,):
    1442:  op_str = {0: '<', 2: '==', 4: '>', 1: '<=', 3: '!=', 5: '>='}[op]
    1443:  raise NotImplementedError("Comparison operator %s not implemented" % op_str)
    1444:  if not isinstance(other, Minimal):
    1445:  raise NotImplementedError("Comparison currently only allowed with objects of the same type. Use isinstance and define yourself.")
    ...
    
    1467:  run_static = __static_Minimal_run_static
    1468:  run_static_extra_arg = __static_Minimal_run_static_extra_arg 
    1469:  Autowrap has wrapped 1 classes, 52 methods and 1 enums
    1470:  running build_ext
    1471:  [1/1] Cythonizing minimal_wrapper.pyx
    1472:  ----------------------------- Captured stderr call -----------------------------
    1473:  /opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /tmp/tmpi1hc3q4j/minimal_wrapper.pyx
    1474:  tree = Parsing.p_module(s, pxd, full_module_name)
    1475:  Error compiling Cython file:
    ...
    
    1500:  self._build_extensions_serial()
    1501:  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/distutils/command/build_ext.py", line 474, in _build_extensions_serial
    1502:  self.build_extension(ext)
    1503:  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/Cython/Distutils/build_ext.py", line 131, in build_extension
    1504:  ext,force=self.force, quiet=self.verbose == 0, **options
    1505:  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize
    1506:  cythonize_one(*args)
    1507:  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_one
    1508:  raise CompileError(None, pyx_file)
    1509:  Cython.Compiler.Errors.CompileError: minimal_wrapper.pyx
    ...
    
    1600:  self = <autowrap.ConversionProvider.ConverterRegistry object at 0x7fb6c72be290>
    1601:  cpp_type = 'index'
    1602:  def get(self, cpp_type: CppType) -> TypeConverterBase:
    1603:  """
    1604:  Gets a conversion provider that inherits from TypeConverterBase and matches both cpp_type.base_type
    1605:  and the matches function from the successfully looked-up TypeConverter
    1606:  :param cpp_type: CppType
    1607:  :return: TypeConverterBase
    1608:  :except: NameError
    1609:  """
    1610:  >       rv = [conv for conv in self.lookup[cpp_type.base_type] if conv.matches(cpp_type)]
    1611:  E       AttributeError: 'EncodedString' object has no attribute 'base_type'
    1612:  /home/runner/work/autowrap/autowrap/autowrap/ConversionProvider.py:2209: AttributeError
    ...
    
    1649:  INFO     autowrap:DeclResolver.py:603 resolve method decl: 'CppMethodOrFunctionDecl: libcpp_map[IntWrapper,int] process_8_map (['int in_'])'
    1650:  INFO     autowrap:DeclResolver.py:603 resolve method decl: 'CppMethodOrFunctionDecl: int process_9_map (['libcpp_map[int,IntWrapper] & in_'])'
    1651:  INFO     autowrap:DeclResolver.py:603 resolve method decl: 'CppMethodOrFunctionDecl: libcpp_map[int,IntWrapper] process_10_map (['int in_'])'
    1652:  INFO     autowrap:DeclResolver.py:603 resolve method decl: 'CppMethodOrFunctionDecl: shared_ptr[const IntWrapper] process_11_const ([])'
    1653:  INFO     autowrap:DeclResolver.py:603 resolve method decl: 'CppMethodOrFunctionDecl: int process_12_map (['libcpp_map[libcpp_string,IntWrapper] & in_'])'
    1654:  INFO     autowrap:DeclResolver.py:603 resolve method decl: 'CppMethodOrFunctionDecl: int process_13_map (['libcpp_map[IntWrapper,libcpp_vector[int]] & in_'])'
    1655:  INFO     autowrap:DeclResolver.py:603 resolve method decl: 'CppMethodOrFunctionDecl: int process_14_map (['libcpp_map[IntWrapper,IntVecWrapper] & in_'])'
    1656:  =========================== short test summary info ============================
    1657:  FAILED tests/test_code_generator_minimal.py::test_minimal - AssertionError
    1658:  FAILED tests/test_code_generator_stllibcpp.py::test_stl_libcpp - AttributeError: 'EncodedString' object has no attribute 'base_type'
    1659:  =================== 2 failed, 78 passed in 64.77s (0:01:04) ====================
    1660:  ##[error]Process completed with exit code 1.
    

    ✨ CI feedback usage guide:

    The CI feedback tool (/checks) automatically triggers when a PR has a failed check.
    The tool analyzes the failed checks and provides several feedbacks:

    • Failed stage
    • Failed test name
    • Failure summary
    • Relevant error logs

    In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:

    /checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}"
    

    where {repo_name} is the name of the repository, {run_number} is the run number of the failed check, and {job_number} is the job number of the failed check.

    Configuration options

    • enable_auto_checks_feedback - if set to true, the tool will automatically provide feedback when a check is failed. Default is true.
    • excluded_checks_list - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list.
    • enable_help_text - if set to true, the tool will provide a help message with the feedback. Default is true.
    • persistent_comment - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true.
    • final_update_message - if persistent_comment is true and updating a previous checks message, the tool will also create a new message: "Persistent checks updated to latest commit". Default is true.

    See more information about the checks tool in the docs.

    Copy link

    qodo-merge-pro bot commented Nov 7, 2024

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    CI Failure Feedback 🧐

    Action: test (==3.0.0a10, 3.7)

    Failed stage: run tests [❌]

    Failed test name: test_stl_libcpp

    Failure summary:

    The action failed due to two test failures:

  • test_minimal in tests/test_code_generator_minimal.py failed with an AssertionError. The specific
    assertion that failed was checking the return code of a subprocess call to build extensions, which
    did not return 0 as expected.
  • test_stl_libcpp in tests/test_code_generator_stllibcpp.py failed with an AttributeError. The error
    occurred because an EncodedString object was accessed for a non-existent attribute base_type.

  • Relevant error logs:
    1:  ##[group]Operating System
    2:  Ubuntu
    ...
    
    665:  tests/test_code_generator_stllibcpp.py F                                 [ 16%]
    666:  tests/test_cython_build_process.py ..                                    [ 18%]
    667:  tests/test_decl_resolver.py ..........................                   [ 51%]
    668:  tests/test_full_library.py .                                             [ 52%]
    669:  tests/test_main.py ..                                                    [ 55%]
    670:  tests/test_pxd_parser.py ..........................                      [ 87%]
    671:  tests/test_types.py .....                                                [ 93%]
    672:  tests/test_utils.py .....                                                [100%]
    673:  =================================== FAILURES ===================================
    ...
    
    720:  import sys
    721:  tempdir = tempfile.mkdtemp()
    722:  if debug:
    723:  print("\n")
    724:  print("tempdir=", tempdir)
    725:  print("\n")
    726:  for source_file in source_files:
    727:  if source_file[-4:] != ".pyx" and source_file[-4:] != ".cpp":
    728:  raise NameError("Expected pyx and/or cpp files as source files for compilation.")
    ...
    
    764:  print("-" * 70)
    765:  print("\n")
    766:  assert (
    767:  subprocess.Popen(
    768:  "%s setup.py build_ext --force --inplace" % sys.executable, shell=True
    769:  ).wait()
    770:  >           == 0
    771:  )
    772:  E       AssertionError
    773:  /home/runner/work/autowrap/autowrap/autowrap/Utils.py:136: AssertionError
    ...
    
    924:  def __set__(self, bool m_bool):
    925:  self.inst.get().m_bool = (<bool>m_bool)
    926:  def __get__(self):
    927:  cdef bool _r = self.inst.get().m_bool
    928:  py_result = <bool>_r
    929:  return py_result
    930:  property m_const:
    931:  def __set__(self, int m_const):
    932:  raise AttributeError("Cannot set constant")
    933:  def __get__(self):
    934:  cdef int _r = self.inst.get().m_const
    935:  py_result = <int>_r
    936:  return py_result
    937:  property m_constdef:
    938:  def __set__(self, int m_constdef):
    939:  raise AttributeError("Cannot set constant")
    ...
    
    1240:  return py_result
    1241:  def __getitem__(self,  index ):
    1242:  """
    1243:  __getitem__(self, index: int ) -> int
    1244:  """
    1245:  assert isinstance(index, int) and index >= 0, 'arg index wrong type'
    1246:  cdef index _idx = (<size_t>index)
    1247:  if _idx >= self.inst.get().size():
    1248:  raise IndexError("invalid index %d" % _idx)
    ...
    
    1435:  def __irshift__(Minimal self, Minimal other not None):
    1436:  cdef _Minimal * this = self.inst.get()
    1437:  cdef _Minimal * that = other.inst.get()
    1438:  _irshift(this, that)
    1439:  return self
    1440:  def __richcmp__(self, other, op):
    1441:  if op not in (2,):
    1442:  op_str = {0: '<', 2: '==', 4: '>', 1: '<=', 3: '!=', 5: '>='}[op]
    1443:  raise NotImplementedError("Comparison operator %s not implemented" % op_str)
    1444:  if not isinstance(other, Minimal):
    1445:  raise NotImplementedError("Comparison currently only allowed with objects of the same type. Use isinstance and define yourself.")
    ...
    
    1467:  run_static = __static_Minimal_run_static
    1468:  run_static_extra_arg = __static_Minimal_run_static_extra_arg 
    1469:  Autowrap has wrapped 1 classes, 52 methods and 1 enums
    1470:  running build_ext
    1471:  [1/1] Cythonizing minimal_wrapper.pyx
    1472:  ----------------------------- Captured stderr call -----------------------------
    1473:  /opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/Cython/Compiler/Main.py:346: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /tmp/tmppcub55q0/minimal_wrapper.pyx
    1474:  tree = Parsing.p_module(s, pxd, full_module_name)
    1475:  Error compiling Cython file:
    ...
    
    1500:  self._build_extensions_serial()
    1501:  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/distutils/command/build_ext.py", line 474, in _build_extensions_serial
    1502:  self.build_extension(ext)
    1503:  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/Cython/Distutils/build_ext.py", line 123, in build_extension
    1504:  ext,force=self.force, quiet=self.verbose == 0, **options
    1505:  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/Cython/Build/Dependencies.py", line 1117, in cythonize
    1506:  cythonize_one(*args)
    1507:  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/Cython/Build/Dependencies.py", line 1284, in cythonize_one
    1508:  raise CompileError(None, pyx_file)
    1509:  Cython.Compiler.Errors.CompileError: minimal_wrapper.pyx
    ...
    
    1600:  self = <autowrap.ConversionProvider.ConverterRegistry object at 0x7fca222666d0>
    1601:  cpp_type = 'index'
    1602:  def get(self, cpp_type: CppType) -> TypeConverterBase:
    1603:  """
    1604:  Gets a conversion provider that inherits from TypeConverterBase and matches both cpp_type.base_type
    1605:  and the matches function from the successfully looked-up TypeConverter
    1606:  :param cpp_type: CppType
    1607:  :return: TypeConverterBase
    1608:  :except: NameError
    1609:  """
    1610:  >       rv = [conv for conv in self.lookup[cpp_type.base_type] if conv.matches(cpp_type)]
    1611:  E       AttributeError: 'EncodedString' object has no attribute 'base_type'
    1612:  /home/runner/work/autowrap/autowrap/autowrap/ConversionProvider.py:2209: AttributeError
    ...
    
    1649:  INFO     autowrap:DeclResolver.py:603 resolve method decl: 'CppMethodOrFunctionDecl: libcpp_map[IntWrapper,int] process_8_map (['int in_'])'
    1650:  INFO     autowrap:DeclResolver.py:603 resolve method decl: 'CppMethodOrFunctionDecl: int process_9_map (['libcpp_map[int,IntWrapper] & in_'])'
    1651:  INFO     autowrap:DeclResolver.py:603 resolve method decl: 'CppMethodOrFunctionDecl: libcpp_map[int,IntWrapper] process_10_map (['int in_'])'
    1652:  INFO     autowrap:DeclResolver.py:603 resolve method decl: 'CppMethodOrFunctionDecl: shared_ptr[const IntWrapper] process_11_const ([])'
    1653:  INFO     autowrap:DeclResolver.py:603 resolve method decl: 'CppMethodOrFunctionDecl: int process_12_map (['libcpp_map[libcpp_string,IntWrapper] & in_'])'
    1654:  INFO     autowrap:DeclResolver.py:603 resolve method decl: 'CppMethodOrFunctionDecl: int process_13_map (['libcpp_map[IntWrapper,libcpp_vector[int]] & in_'])'
    1655:  INFO     autowrap:DeclResolver.py:603 resolve method decl: 'CppMethodOrFunctionDecl: int process_14_map (['libcpp_map[IntWrapper,IntVecWrapper] & in_'])'
    1656:  =========================== short test summary info ============================
    1657:  FAILED tests/test_code_generator_minimal.py::test_minimal - AssertionError
    1658:  FAILED tests/test_code_generator_stllibcpp.py::test_stl_libcpp - AttributeError: 'EncodedString' object has no attribute 'base_type'
    1659:  =================== 2 failed, 78 passed in 62.57s (0:01:02) ====================
    1660:  ##[error]Process completed with exit code 1.
    

    ✨ CI feedback usage guide:

    The CI feedback tool (/checks) automatically triggers when a PR has a failed check.
    The tool analyzes the failed checks and provides several feedbacks:

    • Failed stage
    • Failed test name
    • Failure summary
    • Relevant error logs

    In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:

    /checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}"
    

    where {repo_name} is the name of the repository, {run_number} is the run number of the failed check, and {job_number} is the job number of the failed check.

    Configuration options

    • enable_auto_checks_feedback - if set to true, the tool will automatically provide feedback when a check is failed. Default is true.
    • excluded_checks_list - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list.
    • enable_help_text - if set to true, the tool will provide a help message with the feedback. Default is true.
    • persistent_comment - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true.
    • final_update_message - if persistent_comment is true and updating a previous checks message, the tool will also create a new message: "Persistent checks updated to latest commit". Default is true.

    See more information about the checks tool in the docs.

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    1 participant