Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-5253

using Result in result name generates wrong IAsync interface

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.13.0
    • 0.14.0
    • netstd - Compiler
    • None

    Description

      Example:

       

      struct GetStringResult{
          1: string thisIsAString
      }
      
      service MyService{
          GetStringResult GetString(1:GetStringParameters getStringParams)
      }
      

       

      This produces two different classes with same Name; one in GetStringResult.cs is the "correct" class and one in the service class.

      When implementing an IAsync handler class something like this is generated:

      public Task<MyService.GetStringResult> GetStringAsync(GetStringParameters getStringParams, CancellationToken cancellationToken = default(CancellationToken))
      {
      }
      

      So in this case this is the wrong GetStringResult class.

      A workaround is to move the result struct into a different thrift file with different namespace

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jensg Jens Geyer
            MaJu Matthias Jüttner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 20m
                20m

                Slack

                  Issue deployment