Deprecated binding constructs #1200
Labels
enhancement
Proposed change to current functionality
generator
Issues binding a Java library (generator, class-parse, etc.)
This issue documents the constructs we have marked as
[Obsolete]
to inform if we want to remove them in the future.Additionally, we would need to decide if any changes are global (affecting both
Mono.Android
and outside users) or if we will feature flag them and whether the flag will be opt-in or opt-out.Scenario 1 - Interface Alternative Classes
When C# 8 added support for
static interface
members, matching Java's support, it removed the need for many workarounds we had previously employed to make these members available. Previously, we had copied thesestatic
members to a similarly namedclass
. As of API-30, we place thestatic
members in their originalinterface
and mark these "alternative" classes as[Obsolete]
.Example:
As of API-35 there are 179 of these "alternative" classes.
Possible next deprecation step(s):
[Obsolete ("...", error: true)]
Scenario 2 - Enumified Constants
When we create an
enum
from a set of constants as part of enumification, we use to leave the constant in its original location. At some point we decided this was confusing, and as of API-30 we mark these original locations with[Obsolete ("...", error: true)]
.Example:
As of API-35 there are 7501 instances of these
[Obsolete ("...", error: true)]
constants.Possible next deprecation step(s):
Scenario 3 - Interface Consts Alternative Classes
Before we created scenario 1, we originally moved interface constants to an alternative
type
with aConsts
suffix where they could be accessed.Example:
This alternative class is always
error: true
, and is not generated at all if C# 8's interface constants feature is turned on. (lang-features=interface-constants
)As
Mono.Android
usesinterface-constants
, there are 0 of these types in API-35.The text was updated successfully, but these errors were encountered: