Interfaces defined in WIG does not use correct JavaScript name #633

Closed
Jand42 opened this Issue Dec 7, 2016 · 1 comment

Comments

Projects
None yet
1 participant
@Jand42
Member

Jand42 commented Dec 7, 2016

WIG compiler generates an Inline attribute which is then ignored by the Reflector creating the WS metadata for the assembly. Should generate Name attribute instead, which also allows proper inheriting by user-defined classes.

@Jand42

This comment has been minimized.

Show comment
Hide comment
@Jand42

Jand42 Feb 17, 2017

Member

Previously, compiling calls against WIG-defined interface methods was wrong, used the .NET name instead of any inlines set in WIG definition.
This change has both an upside and a downside:

  • WIG-defined interfaces are using only the Name attribute, so no custom inlines defined on them will have an effect (WIG API still allows it...).
  • They are now able to be implemented with your custom classes

The upside is the smaller, so this can be changed back partially so this is a non-breaking change:

  • WIG Interfaces with only methods defined on them with no custom inlines create interface metadata (using Name), allowing inheriting/implementing from your own WS-defined interfaces/classes.
  • all other WIG interfaces (having a JS property and/or custom inline) create class-like metadata (using Inlines). Trying to inherit/implement them in WS-code will fail, but they are perfect for defining mixins in WIG, and translation will use the inline correctly if you call the member through the interface.
Member

Jand42 commented Feb 17, 2017

Previously, compiling calls against WIG-defined interface methods was wrong, used the .NET name instead of any inlines set in WIG definition.
This change has both an upside and a downside:

  • WIG-defined interfaces are using only the Name attribute, so no custom inlines defined on them will have an effect (WIG API still allows it...).
  • They are now able to be implemented with your custom classes

The upside is the smaller, so this can be changed back partially so this is a non-breaking change:

  • WIG Interfaces with only methods defined on them with no custom inlines create interface metadata (using Name), allowing inheriting/implementing from your own WS-defined interfaces/classes.
  • all other WIG interfaces (having a JS property and/or custom inline) create class-like metadata (using Inlines). Trying to inherit/implement them in WS-code will fail, but they are perfect for defining mixins in WIG, and translation will use the inline correctly if you call the member through the interface.

@Jand42 Jand42 reopened this Feb 17, 2017

@Jand42 Jand42 closed this in 0178f3f Feb 17, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment