Skip to content

ConstSugar logic can remove marker interfaces #752

@jpobst

Description

@jpobst

Context: xamarin/GooglePlayServicesComponents#404

Previously GPS had this construct:

public static interface ApiOptions { ... other interfaces and classes, no methods or fields ... }
public static interface HasOptions extends ApiOptions { ... empty ... }

This generated correctly. Then a new static field was added to ApiOptions:

public static interface ApiOptions { 
  public static final NoOptions NO_OPTIONS = new NoOptions(null);
  
  ... other interfaces and classes ...
}

This led our ConstSugar logic to determine that HasOptions wasn't needed and removed the interface from the binding.

Our ConstSugar logic may be too Mono.Android specific. We might be better off removing the logic and using metadata to remove any undesired empty interfaces it creates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugComponent does not function as intendedgeneratorIssues binding a Java library (generator, class-parse, etc.)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions