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
Support Implied Keys #1339
Support Implied Keys #1339
Conversation
Another question: do implied keys apply to unions? If we're being consistent I think these rules should apply to union discriminators as well: If a union field or array field in a struct is marked as a key or implied to be a key, then the discriminator is assumed to be the key unless marked with |
This reverts commit dab13ca. See OpenDDS#1339 (comment) and DOCGroup/ACE_TAO#975
I wonder if the Github user key has blocked me by now. |
Another thought following my previous ones: If a user has marked a field in a struct of another type (union or struct) and all the possible keys have been marked with @key(FALSE), what does that mean? Is it an error or a possible chance to warn the user? Right now I think it would error with structs, which is the behavior before this PR. |
Right... I'm trying to use |
I could see it going either way. The other argument would be that the semantics of |
So I'm kinda confused. I changed the PR Jenkins configure step like 2 days ago to use |
I wasn't thinking of it applying it to a struct necessarily, I was thinking of applying it directly to the union field like so:
Although I think it also apply indirectly as well if the union is implied to be a key:
|
This is exactly the one I was referring to. Does it make sense to say that "union_value is the key of StructType"? It's not really, only the discriminator can be a key so the union value as a whole isn't. |
Yes, of course you can't use the whole union value, but it's always possible use the discriminator as a key, so it would be used unless the IDL writer says explicitly not to using |
Update guidelines based on cases such OpenDDS#1379 (comment) and OpenDDS#1339 (comment) Removed bit in Doxygen, because it doesn't really work like I thought it did.
@key
, all the fields in the nested struct are implied to be marked with@key
.opendds_idl
will now error if the set IDL version is less than 4.