Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-89351

Combine generic argument structs

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0, 8.0.0-rc5
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Service Arch
    • Fully Compatible
    • v8.0
    • Service Arch 2024-04-15, Service Arch 2024-04-29, Service Arch 2024-05-13

      In generic_argument.idl, there are two separate structs defined: GenericArgsAPIV1 and GenericArgsAPIV1Unstable. They're separated this way to allow the IDL compatibility scripts to ensure we don't remove any stable generic arguments. However, having two structs makes using generic arguments cumbersome, since in a lot of cases both structs need to be passed alongside each other. It also requires users to remember which argument is stable and which is unstable every time they interact with them, which isn't true of any of our other arguments. We should combine them into a single GenericArguments struct to eliminate these concerns.

      Once we've done that, we can change the marker of stability to be the IDL stability field, rather than the arbitrary name of generic argument list. This will require the compatibility checking script to update its unit tests to use structs for generic arguments rather than generic_argument_lists, so as part of this work we should just remove the concept of generic_argument_lists altogether (they're undocumented and have no use case outside of these unit tests currently).

            Assignee:
            patrick.freed@mongodb.com Patrick Freed
            Reporter:
            patrick.freed@mongodb.com Patrick Freed
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: