[SERVER-72684] Deduplicate IDL library used by Async RPC API Created: 10/Jan/23 Updated: 12/Jan/23 |
|
| Status: | Open |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Jason Chan | Assignee: | Backlog - Service Architecture |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Service Arch
|
||||||||
| Participants: | |||||||||
| Description |
|
The plan was to hand-craft the types that represented the generic arguments and replies. However, when we tried this, we found that the types we wrote looked almost identical to the IDL-generated structures. (See https://github.com/10gen/mongo/pull/8622) Therefore, we tried to see if we could use the IDL generated types instead of hand-crafting our own. The problem here was that when we attempted to add types to the IDL-generated code, we ran into a difficult circular-dependency problem, because the server_base library depends on the generic_arguments IDL structure to generate parsers for other IDL defined-types, and the types of each generic_argument are often IDL-defined. We decided to get around this by simply duplicating the geneeric_arguments IDL structure, and having the typed version as its own library that isn’t dependent-upon by base libraries needed to generate parsers. The workaround above is not ideal given the duplication of code, and this ticket should be to investigate and implement a way to remove the duplication. |