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

Defaulted struct parameters on a service generates invalid Haskell.

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Haskell - Compiler
    • Labels:
      None
    • Environment:

      GHC 7.6.3
      GHC 7.8.4

      Description

      If we have a service definition that looks something like:

      struct ServiceRequest {
        1: optional bool shouldWork;
      }
      
      service MyService{
        void myService(1:ServiceRequest request = {});
      }
      

      The code generation relating to the service call includes an invocation like this:

      ... = default_ServiceRequest{}
      

      Which is invalid as empty record updates are not allowed.

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              seanparsons Sean Parsons

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment