On 23/04/2012, at 4:52 PM, Peter Niederwieser wrote:

> I have some code that detects use of labels in build scripts. I think it's
> important to flag these because labels are often used accidentally, e.g.:
> 
> task foo {
>  dependsOn: bar
> }
> 
> Typically this will result in a no-op and thus can go undetected for some
> time.
> 
> I propose to flag use of labels as an error. This is a breaking change, but
> I think it's justified because virtually every use of labels will be
> accidental. Alternatively, we could issue a warning. But I dislike warnings,
> especially in such clear-cut cases. Thoughts?

I think it's a good idea. One question is whether we want to prevent the use of 
labels in the script methods and body (i.e. the DSL), but allow them in other 
classes that happen to be in the script (e.g. task implementations)?

We should start with a deprecation warning in 1.1, and make labels an error in 
2.0.


--
Adam Murdoch
Gradle Co-founder
http://www.gradle.org
VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting
http://www.gradleware.com

Reply via email to