abapGit / ADT_Backend

DEPRECATED/NOT WORKING abapGit ADT Backend
MIT License
32 stars 13 forks source link

Error fetching abapGit Repositories #32

Closed petrhos closed 5 years ago

petrhos commented 5 years ago

In Eclipse (ADT last version) when opening the abapGit tab I get a dump:

What happened? Error in the ABAP application program.

The current ABAP program "CL_REST_ROUTER================CP" had to be
 terminated because it found a
statement that could not be executed.
In include "ZCL_ABAPGIT_RES_REPOS=========CCIMP     ", in line 70 of program
 "ZCL_ABAPGIT_RES_REPOS=========CP        ", the following syntax errors
have occurred:
The parameter name can only be omitted if the method has only one IMPORTING parameter  not optional or optional, identified by "PREFERRED PARAMETER". by "PREFERRED PARAMETER".

Class: CL_REST_ROUTER -> IF_REST_HANDLER~HANDLE

Line 33:

    TRY.
      IF ls_match_info-handler_class_parameter IS INITIAL.
      »»  CREATE OBJECT lo_object TYPE (ls_match_info-handler_class).
      ELSE.
        CREATE OBJECT lo_object TYPE (ls_match_info-handler_class) PARAMETER-TABLE ls_match_info-handler_class_parameter.
      ENDIF.

Thanks

absap commented 5 years ago

Hi, thanks for opening that bug, will take a look at it. Which zabapGit version did you have installed on your system?

petrhos commented 5 years ago

My current version is 1.88.0

larshp commented 5 years ago

can you help opening the class in SE24, and run the syntax check, it will show where the syntax error is

petrhos commented 5 years ago

Class: ZCL_ABAPGIT_RES_REPOS Action: Syntax check

Output: @5C\QError@ 70 Local Types ZCL_ABAPGIT_RES_REPOS The parameter name can be omitted only if the method has only one non-optional IMPORTING parameter or one optional IMPORTING parameter identified by "PREFERRED PARAMETER". by "PREFERRED PARAMETER".

Action: Display Output: Local Definitions/Implementations

  METHOD lif_abapgit_provider~perform_import.

    "Set the default transport request
    IF is_request_data-transportrequest IS NOT INITIAL.
      zcl_abapgit_default_transport=>get_instance( )->set( CONV #( is_request_data-transportrequest ) ).
    ENDIF.

    "Create online repo
    DATA(lo_repo) = zcl_abapgit_repo_srv=>get_instance( )->new_online(
         iv_url         = is_request_data-url
         iv_branch_name = is_request_data-branch
         iv_package     = CONV devclass( is_request_data-package ) ).

    "Pull objects
    lo_repo->refresh( ).

    DATA(ls_checks) = lo_repo->deserialize_checks( ).

    "Overwrite existing objects
    LOOP AT ls_checks-overwrite ASSIGNING FIELD-SYMBOL(<ls_overwrite>).
      <ls_overwrite>-decision = 'Y'.
    ENDLOOP.

    LOOP AT ls_checks-warning_package ASSIGNING FIELD-SYMBOL(<ls_warning_package>).
      <ls_warning_package>-decision = 'Y'.
    ENDLOOP.

    "Import objects
    ls_checks-transport-transport = is_request_data-transportrequest.
    lo_repo->deserialize( ls_checks ). <--------------------------------- Line 70

  ENDMETHOD.
absap commented 5 years ago

@petrhos please feel free to open up also a PR