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

Grpc generated file in c# does not add using System.Collections.Generic #623

Closed
acgull opened this issue Sep 24, 2017 · 1 comment
Closed
Assignees
Labels

Comments

@acgull
Copy link

acgull commented Sep 24, 2017

When using a generic method in a service if the generic parameter is a collection the generated code fails to compile because gbc doesn't add using System.Collections.Generic; to generated file.

To reproduce - compile the following file generic_service.txt with the follwing command:
gbc.exe c# --grpc generic_service.txt (renamed to txt so I can upload here)

@chwarr chwarr self-assigned this Sep 25, 2017
@chwarr chwarr added the bug label Sep 25, 2017
@chwarr
Copy link
Member

chwarr commented Sep 25, 2017

Thanks for the report. I see the problem. I'm working on a fix and regression tests.

chwarr added a commit to chwarr/bond that referenced this issue Sep 27, 2017
If a service use a generic type like bond.Box<T> with a collection type
argument as a parameter/return type, the generated code was missing an
import of System.Collections.Generic. This has been fixed.

An example, demonstrating how to use bond.Box to wrap scalar service
arguments has been added. This also serves to test the fixed codegen.

A helper method Bond.Box.Create() has been added to enable creation of
Bond.Box<T> instances via type deduction.

Fixes microsoft#623
chwarr added a commit to chwarr/bond that referenced this issue Sep 28, 2017
If a service use a generic type like bond.Box<T> with a collection type
argument as a parameter/return type, the generated code was missing an
import of System.Collections.Generic. This has been fixed.

An example, demonstrating how to use bond.Box to wrap scalar service
arguments has been added. This also serves to test the fixed codegen.

A helper method Bond.Box.Create() has been added to enable creation of
Bond.Box<T> instances via type deduction.

Fixes microsoft#623
chwarr added a commit to chwarr/bond that referenced this issue Sep 28, 2017
If a service use a generic type like bond.Box<T> with a collection type
argument as a parameter/return type, the generated code was missing an
import of System.Collections.Generic. This has been fixed.

An example, demonstrating how to use bond.Box to wrap scalar service
arguments has been added. This also serves to test the fixed codegen.

A helper method Bond.Box.Create() has been added to enable creation of
Bond.Box<T> instances via type deduction.

Fixes microsoft#623
chwarr added a commit to chwarr/bond that referenced this issue Sep 29, 2017
If a service use a generic type like bond.Box<T> with a collection type
argument as a parameter/return type, the generated code was missing an
import of System.Collections.Generic. This has been fixed.

An example, demonstrating how to use bond.Box to wrap scalar service
arguments has been added. This also serves to test the fixed codegen.

A helper method Bond.Box.Create() has been added to enable creation of
Bond.Box<T> instances via type deduction.

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

No branches or pull requests

2 participants