microsoft / microsoft/vs-streamjsonrpc

Feature request: option\setting to prevent\disallow duplicate methods in targets

Open
#547 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue help wanted
Dominant language
C#
Stars
937
Forks
178
Avg merge
3d 1h
Merged PRs (30d)
28

Description

When adding multiple rpc target classes, if multiple targets contain the same\similar method, the method in first target added is used (as documented). But I miss an option to disallow duplicates, as this is (in my case) always an error. Alternatives:
-Preferably a setting on JsonRpc itself that produce error when AddLocalRpcTarget is called
-A setting on JsonRpc itself that produce error during runtime, when duplicate method is attempted called
-A setting in JsonRpcTargetOptions, that produce error when AddLocalRpcTarget is called
-A setting in JsonRpcTargetOptions, that produce error during runtime, when duplicate method is attempted called

Thanks.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at AddLocalRpcTarget and trace how duplicate methods across targets are currently resolved. Compare registration-time and invocation-time rejection, then define the option's scope and error behavior; done means one supported setting prevents duplicate methods and its behavior is covered by tests and documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.