Bug 60727 - [Generator] Add support for [BaseType] to StrongDictionary
Summary: [Generator] Add support for [BaseType] to StrongDictionary
Status: CONFIRMED
Alias: None
Product: iOS
Classification: Xamarin
Component: Tools ()
Version: master
Hardware: PC Mac OS
: Lowest enhancement
Target Milestone: Future Cycle (TBD)
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-11-16 17:56 UTC by Vincent Dondain [MSFT]
Modified: 2017-11-20 21:11 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: No
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 60727 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Vincent Dondain [MSFT] 2017-11-16 17:56:04 UTC
In an attempt to convert https://github.com/xamarin/xamarin-macios/blob/master/src/CoreImage/CIImageInitializationOptions.cs#L37-L85 to [StrongDictionary] I found out that we don't handle inheritance with [StrongDictionary].

Something like:

[StrongDictionary ("CIImageInitializationOptionsKeys")]
interface CIImageInitializationOptions {
	CGColorSpace ColorSpace { get; set; }
}

[StrongDictionary ("CIImageInitializationOptionsKeys")]
[BaseType (typeof (CIImageInitializationOptions))]
interface CIImageInitializationOptionsWithMetadata {
	CoreGraphics.CGImageProperties Properties { get; set; }
}

...should work.
Comment 1 Alex Soto [MSFT] 2017-11-20 18:07:46 UTC
We are going to wait for this feature to be implemented if a better case shows up.
Comment 2 Sebastien Pouliot 2017-11-20 21:11:28 UTC
Rationale

The grouping of keys into a strong dictionary is something we (Microsoft) define based on the documented (Apple) keys used in _weak_ dictionaries. In most cases (at least the ones that comes in mind) there is no clear hierarchy.

E.g. It's very common to have optional keys. Also some keys might not apply to X while they apply to Y. Having different strong dictionaries for all possibilities is not helpful (but rather confusing) and often many keys lack such documentation.

E.g. futur SDK might add keys (new or existing) in different context that would break the logic behind our hierarchy.