-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rolling deprecation support #66
Comments
Why doesn't 'x' appear in 0.3.0 apply? When is "0.4.0 reached"? |
Added |
I think it would be simpler to just remove the field from the definition when working towards 0.4.0. |
Being able to deprecate fields is good though. But it should generate deprecation annotations that include a "since" version and a message. What if there are multiple fields to deprecate? They need to all be annotated and all share the same deprecation message. What could be a lot of duplication. |
Added def apply(value: String, x: Int): Greeting = Macro.restligeist("0.2.0 apply no longer exists.") |
I though it might be useful to express the removal along side the still-alive fields, but I guess it doesn't add much. |
For instance: type Greeting {
value: String!
sshUsername: String @since("0.2.0") @deprecated("0.3.0", "Use ssh agent instead")
sshPassword: String @since("0.2.0") @deprecated("0.3.0", "Use ssh agent instead")
number: Long @since("0.3.0")
} Generates object Greeting {
// 0.0.0
def apply(value: String): Greeting = new Greeting(value, None, None)
// 0.2.0
@deprecated("0.3.0", "Use ssh agent instead")
def apply(value: String, sshUsername: String, sshPassword: String): Greeting = new Greeting(value, Some(sshUsername), Some(sshPassword), None)
// 0.3.0
def apply(value: String, number: Long): Greeting = new Greeting(value, None, None, Some(number))
} |
lol I always get my "since" and "message" the other way round (until I check). Should be |
Maybe we'll use |
While I do really prefer that order, personally, let's not (semi) arbitrarily switch the order. |
Yea. I was kidding on the ordering. (Although it might be interesting to give warning when we detect flipping.) |
Indeed. I think I saw commits in scala/scala fixing the same mistake. It's an easy mistake to make when they're both strings.. |
I always write |
For a contained ecosystem, rolling deprecation feature might be useful.
This could generate
Once 0.4.0 is reached, remove the field altogether:
The text was updated successfully, but these errors were encountered: