-
Notifications
You must be signed in to change notification settings - Fork 592
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
C# Metadata Questions #3246
Comments
|
Seems the right thing to do. |
Apparently we actually do this in some of our tests, so I'm going to add this to my PR, instead of doing it after-the-fact. |
Because sorted list is a collection of key/value pairs and it implements IDictionary, see https://learn.microsoft.com/en-us/dotnet/api/system.collections.sortedlist?view=net-9.0 |
Yes, you're right. I should of looked closer at |
Currently, we allow |
I've been working on #117 (improve metadata validation).
For my PR, I'm trying to keep the current behavior as much as possible (to avoid changing too much in one PR),
but I've across a few oddities that don't seem right to me. I intend to fix these in a follow-up PR, but wanted to list them here,
in case anyone had any thoughts/explanations to offer.
We support
SortedList
as an argument tocs:generic
on dictionaries:This seems nonsensical to me, why would you map a dictionary to a list, instead of using a sequence?
Also, in the documentation, we only list
SortedDictionary
, notSortedList
.EDIT: @pepone points out that
SortedList
is actually anIDictionary
, so we should keep support for it.We only support
cs:implements
on structs and interfaces. Why don't we support this on classes?Note that in the documentation, we state that it's supported on struct, class, and interface.
It's not clear if the documentation is outdated, or if this is a bug in the current validation logic.
EDIT: after looking at it further, this metadata seems useless and will be removed instead.
Should we allow
cs:attribute
on enumerators?If you put this metadata on an enumerator, we don't reject it, but we also don't seem to generate code for it.
It's just silently ignored. Is there a reason we'd disallow this? Or is this just missing functionality.
I intend to change
slice2cs
to generate attributes on enumerators like we do for everything else.Should we allow
cs:property
on exceptions?The documentation says it's only supported on structs and classes, but the validation logic allowed it through:
ice/cpp/src/slice2cs/CsUtil.cpp
Lines 2015 to 2017 in 2c85ea7
The text was updated successfully, but these errors were encountered: