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

CodeGen: Add support for F# interfaces #1369

Merged
merged 1 commit into from Feb 5, 2016
Merged

CodeGen: Add support for F# interfaces #1369

merged 1 commit into from Feb 5, 2016

Conversation

cata
Copy link
Contributor

@cata cata commented Feb 4, 2016

Fixes #1349, includes corresponding tests.

Background

F# interface definitions do not require parameter names. It is idiomatic to omit parameter names for trivial interface methods:

type Interface1 =
    abstract member Multiply : int -> int -> int

However, Orleans code generation requires parameter names to be present. The PR addresses this by generating such names when not present, by suffixing the string "arg" with the parameter's index (arg0, arg1, etc.).

@cata
Copy link
Contributor Author

cata commented Feb 5, 2016

@jthelin: This is a regression from 1.0.9 - I think it qualifies as a bug.
Is there anything holding this from being merged? I'll happily make the required changes.

@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to add another project? Can't this be added to TestGrainInterfaces.csproj instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need another project to test that one can indeed derive from a C# interface in an external assembly.

@jthelin
Copy link
Member

jthelin commented Feb 5, 2016

LGTM. Just a few minor queries from @sergeybykov then should be able to merge i think @ca-ta

sergeybykov added a commit that referenced this pull request Feb 5, 2016
CodeGen: Add support for F# interfaces
@sergeybykov sergeybykov merged commit e4fb9c4 into dotnet:master Feb 5, 2016
@sergeybykov
Copy link
Contributor

Thank you, @ca-ta!

@cata
Copy link
Contributor Author

cata commented Feb 5, 2016

@sergeybykov, @jthelin - Thank you for the CR, and thanks for merging!

@cata cata deleted the F#_interface_support branch February 29, 2016 00:34
@github-actions github-actions bot locked and limited conversation to collaborators Dec 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code generation fails for grain interfaces derived from interface(s) in an external F# assembly
4 participants