Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle name conflicts in cmg #260

Open
raphael opened this issue Jul 25, 2023 · 0 comments
Open

Handle name conflicts in cmg #260

raphael opened this issue Jul 25, 2023 · 0 comments

Comments

@raphael
Copy link
Member

raphael commented Jul 25, 2023

For each client method the cmg tool generates a Add<method name> and a Set<method name> method on the mock to set the implementation. There is currently no protection against existing client method with identical names which causes the tool to generate duplicate method names.

One approach might be for the tool to use scopes when generating method names so it can keep track of already generated names and append suffixes as necessary, a simpler version of https://github.com/goadesign/goa/blob/v3/codegen/scope.go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant