Skip to content
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

Add support to deprecate aliases #283

Closed
patriksvensson opened this issue Jul 17, 2015 · 1 comment
Closed

Add support to deprecate aliases #283

patriksvensson opened this issue Jul 17, 2015 · 1 comment
Assignees
Labels
Milestone

Comments

@patriksvensson
Copy link
Member

Right now it's not possible to deprecate aliases in a nice way.
It should be possible to mark an alias with an Obsolete attribute.

[CakeMethodAlias]
[Obsolete("You should use DoNewMagic instead.", false)]
public static void DoMagic(this ICakeContext context)
{
}

Would result in a warning message when running:

Warning: The alias DoMagic is obsolete. You should use DoNewMagic instead.

If the Obsolete attribute is configured to be an error, an exception should be thrown instead with the same message as the warning.

@patriksvensson patriksvensson modified the milestones: v0.5.1, v0.5.2 Jul 21, 2015
@patriksvensson patriksvensson modified the milestones: v0.5.2, v0.5.3 Aug 6, 2015
@patriksvensson patriksvensson modified the milestones: v0.5.3, v0.5.4 Aug 31, 2015
@patriksvensson patriksvensson modified the milestones: v0.5.4, v0.5.5, v0.5.6 Sep 11, 2015
@devlead devlead modified the milestones: v0.6.0, v0.6.1 Nov 4, 2015
@patriksvensson patriksvensson self-assigned this Nov 7, 2015
@patriksvensson
Copy link
Member Author

@devlead @gep13 Would appreciate if one of you took a look at this 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants