Skip to content

Replace AttributeOptions with more extensible type #718

@1ec5

Description

@1ec5

AttributeOptions has historically been an OptionSet for convenience and to avoid redundancy: #118 (comment). However, after we made it an OptionSet, it became apparent that the Directions API could arbitrarily begin accepting or returning new unrecognized values.

OptionSet is essentially syntactic sugar and a more compact representation of Set composed with an enumeration. We should replace it with an explicit Set and an “extensible enumeration”. This could take the form of either a struct with constants or an enumeration with an unrecognized(_:) case (taking the raw string as an associated value). A less compact representation in memory won’t be a problem, because it’s unlikely that a request would ever specify more than a handful of attributes anyways.

This would be a backwards-incompatible change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backwards incompatiblechanges that break backwards compatibility of public APIjira-sync-completeop-exRefactoring, Tech Debt or any other operational excellence work.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions