23. April 2012 12:41
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.

+1
+1, ran into this issue in the griffon codebase at the last weekend.
 


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




--
Szczepan Faber
Principal engineer@gradleware
Lead@mockito
23. April 2012 11:27



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

23. April 2012 08:52
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?

Cheers,
Peter

--
View this message in context: http://gradle.1045684.n5.nabble.com/Statement-labels-in-build-scripts-tp5658497p5658497.html
Sent from the gradle-dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




Reply via email to