-
Notifications
You must be signed in to change notification settings - Fork 22
Rolling deprecation support #66
Copy link
Copy link
Open
Labels
uncategorizedUsed for Waffle integrationUsed for Waffle integration
Description
For a contained ecosystem, rolling deprecation feature might be useful.
type Greeting {
value: String!
x: Int @since("0.2.0") @deprecated("0.3.0") @remove("0.4.0")
number: Long @since("0.3.0")
}This could generate
object Greeting {
// 0.0.0
def apply(value: String): Greeting = new Greeting(value, None, None)
// 0.2.0
@deprecated
def apply(value: String, x: Int): Greeting = new Greeting(value, Some(x), None)
// 0.3.0
def apply(value: String, number: Long): Greeting = new Greeting(value, None, Some(number))
}Once 0.4.0 is reached, remove the field altogether:
object Greeting {
// 0.0.0
def apply(value: String): Greeting = new Greeting(value, None)
// 0.2.0
def apply(value: String, x: Int): Greeting = Macro.restligeist("0.2.0 apply no longer exists.")
// 0.3.0
def apply(value: String, number: Long): Greeting = new Greeting(value, Some(number))
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
uncategorizedUsed for Waffle integrationUsed for Waffle integration