On 28 November 2016 at 10:51, Gary Gregory <garydgreg...@gmail.com> wrote: > On Sun, Nov 27, 2016 at 3:41 PM, sebb <seb...@gmail.com> wrote: > >> On 27 November 2016 at 22:31, Gary Gregory <garydgreg...@gmail.com> wrote: >> > On Sun, Nov 27, 2016 at 2:14 PM, sebb <seb...@gmail.com> wrote: >> > >> >> On 27 November 2016 at 22:03, Gary Gregory <garydgreg...@gmail.com> >> wrote: >> >> > These annotations are the SAME as have been published all over the >> place, >> >> > so I do not think we need a PR for review. Reviewing the code in the >> repo >> >> > should be enough, but I'm not sure _what_ there is to review really. >> I've >> >> > already posted a link to the sources (a pastebin link). I'll create a >> >> Jira >> >> > of course. >> >> >> >> There is one aspect that needs review: does the annotation belong in >> LANG? >> >> If we want to use the annotation in other components, do they have to >> >> depend on LANG? >> >> >> > >> > No see below and previous messages. >> > >> > >> >> If not, do they all have their own copies? >> >> >> > >> > No. >> > >> > >> >> >> >> And what happens when LANG needs a non-BC release? >> >> >> > >> > What is the issue I am missing? >> > >> >> The package name for the annotation might need to change >> That would be a downstream nuisance. >> > > Hi All, > > How is that different than changing the package name for any of our other > lang types? > > If you want move a package, you have to break BC and we have clear > guidelines for that task. > > Since already have a package called org.apache.commons.lang3.concurrent, I > propose we place these annottaions in > org.apache.commons.lang3.concurrent.annotation. > > >> >> >> >> My expectation for such annotations is that they would be >> >> self-contained (or built-in to the languange, not LANG). >> >> >> > >> > It is _because_ they are NOT built-in the language or JRE that we are >> > proposing they belong in [lang]. >> > >> > Since we are providing the annotation with CLASS retention only >> > (initially), there is no hard dependency on [lang] at runtime. >> > >> > Is there some subtlety we are missing? >> >> Yes, the compile-time dependency. >> > > No surprise, right? You can't use an annotation without compiling the > source file. > > >> AFAIK it's not possible to have a Maven compile-only dependency; >> compile-time implies run-time. >> > > That's a tooling issue of course which should not invalidate the worthiness > of this feature. > > If I am a downstream user of Commons Lang's new annotations, I would need a > Maven scope that says "I need [lang] as a compile time only dependency" I > do not see such a scope on > https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope
It isn't defined as a scope, but the "optional" flag, when combined with the "compile" scope is described on that page as: "It may be helpful to think of optional dependencies as "excluded by default." That will remove lang from the default list of dependencies if a user specifies optional=true. My previous experience with optional=true is from the META-INF/services generator created by Kohsuke Kawaguchi, which worked for me to not inherit the generator in dependent modules: http://metainf-services.kohsuke.org/ Cheers, Peter --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org