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

Drop support for cs:implements metadata #3247

Open
pepone opened this issue Dec 9, 2024 · 5 comments
Open

Drop support for cs:implements metadata #3247

pepone opened this issue Dec 9, 2024 · 5 comments
Milestone

Comments

@pepone
Copy link
Member

pepone commented Dec 9, 2024

See also #3246

https://doc.zeroc.com/ice/3.7/the-slice-language/slice-metadata-directives#id-.SliceMetadataDirectivesv3.7-cs:implements:type

Given than C# generated types are always partial types, you can manually declare this additional interfaces in a separate partial struct/class that also provides the implementation.

For example:

// In Foo.cs (generated by slice2cs)
partial class Foo {}

// In Foo.Disposable.cs (written by the user)
partial class Foo : IDisposable
{
    public void Dispose()
    {
        throw new NotImplementedException();
    }
}
@InsertCreativityHere
Copy link
Member

InsertCreativityHere commented Dec 9, 2024

This proposal is absolutely doable, but I don't see any advantage to it.
If we were designing this from the ground up, then sure, this proposal is fine (which is why icerpc works exactly as described).

But, Ice does support this metadata, and users are probably already using it.
Removing this feature, and making users add the attribute 'by-hand' is just annoying to them.
And it's not like there's any benefit to adding metadata via a partial, they are functionally equivalent.

@pepone
Copy link
Member Author

pepone commented Dec 9, 2024

The only example we provide in the docs is for a local Slice, which makes me thing that was the most common use case. Then just adding and interface to the list of inherited interfaces doesn't seems that useful, you still need to provide an implementation.

@bernardnormier
Copy link
Member

I agree with Jose, I doubt cs:implements is used much if at all.

@pepone pepone added this to the 3.8.0 milestone Dec 10, 2024
@InsertCreativityHere
Copy link
Member

Indeed, searching on GitHub shows that the only user of this metadata was us (for local Slice).
I'll remove it.

@bernardnormier
Copy link
Member

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

3 participants