gir.core icon indicating copy to clipboard operation
gir.core copied to clipboard

Unsupported APIs

Open badcel opened this issue 2 years ago • 0 comments

If some API is not available on the host system because it is older than the dotnet library there can be several problems:

  • [ ] Types could be not available and should not be registered.
  • [ ] For a programmer the version should be mentioned in the doc comments
  • [ ] Remove the version attribute again as it adds little value for the user. It is more important to have the information in the docs.
  • [ ] It should be clear from the nuget package against which version it is build
  • [ ] Add nullable Module.RuntimeVersion property which returns a cached version of the module if available. Classes with a since attribute can have an internal static “IsAvailable” method on them checking their since data with the runtime version allowing the type registration to only register types which are actually available.

Examples:

Could not register class type 'BindingGroup': Unable to find an entry point named 'g_binding_group_get_type' in shared library 'GObject'.
Could not register class type 'SignalGroup': Unable to find an entry point named 'g_signal_group_get_type' in shared library 'GObject'.

badcel avatar Apr 23 '22 07:04 badcel