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.
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.htmlSent
from the gradle-dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To
unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email