Igniters,
As you may know we had only 2 dependencies at ignite-core: jcache and ignite-shmen. IGNITE-3323 Get rid of copypasted JB annotations, use dependency instead. <https://issues.apache.org/jira/browse/IGNITE-3323> brings one more dependency to org.jetbrains.annotations. This solves problems for people using JB annotations at their projects. but makes ignite-core less dependency-lightweight. JB annotaions are used to highlight null problems in IDE and provide some understanding to users on whether null is allowed/possible in concrete place. I doubt other products/frameworks use it much. But, do we really need them? As for me, we can replace all these annotations by asserts. I propose to discontinue usage of jb annotation and replace them by asserts. Thoughts? |
I don't think that JB annotations is a runtime dependency, we should need
them only at compile time, no? Sergi 2016-07-28 11:09 GMT+03:00 Anton Vinogradov <[hidden email]>: > Igniters, > > As you may know we had only 2 dependencies at ignite-core: jcache and > ignite-shmen. > > IGNITE-3323 Get rid of copypasted JB annotations, use dependency instead. > <https://issues.apache.org/jira/browse/IGNITE-3323> brings one more > dependency to org.jetbrains.annotations. > This solves problems for people using JB annotations at their projects. but > makes ignite-core less dependency-lightweight. > > JB annotaions are used to highlight null problems in IDE and provide some > understanding to users on whether null is allowed/possible in concrete > place. I doubt other products/frameworks use it much. > > But, do we really need them? As for me, we can replace all these > annotations by asserts. > > I propose to discontinue usage of jb annotation and replace them by > asserts. > > Thoughts? > |
Possible, what's the solution in this case?
On Thu, Jul 28, 2016 at 11:17 AM, Sergi Vladykin <[hidden email]> wrote: > I don't think that JB annotations is a runtime dependency, we should need > them only at compile time, no? > > Sergi > > 2016-07-28 11:09 GMT+03:00 Anton Vinogradov <[hidden email]>: > > > Igniters, > > > > As you may know we had only 2 dependencies at ignite-core: jcache and > > ignite-shmen. > > > > IGNITE-3323 Get rid of copypasted JB annotations, use dependency instead. > > <https://issues.apache.org/jira/browse/IGNITE-3323> brings one more > > dependency to org.jetbrains.annotations. > > This solves problems for people using JB annotations at their projects. > but > > makes ignite-core less dependency-lightweight. > > > > JB annotaions are used to highlight null problems in IDE and provide some > > understanding to users on whether null is allowed/possible in concrete > > place. I doubt other products/frameworks use it much. > > > > But, do we really need them? As for me, we can replace all these > > annotations by asserts. > > > > I propose to discontinue usage of jb annotation and replace them by > > asserts. > > > > Thoughts? > > > |
Anton, compile-time annotations should mean that Ignite should not require
these libraries at runtime. Did you try it already and run into issues? On Thu, Jul 28, 2016 at 4:34 AM, Anton Vinogradov <[hidden email]> wrote: > Possible, what's the solution in this case? > > On Thu, Jul 28, 2016 at 11:17 AM, Sergi Vladykin <[hidden email] > > > wrote: > > > I don't think that JB annotations is a runtime dependency, we should need > > them only at compile time, no? > > > > Sergi > > > > 2016-07-28 11:09 GMT+03:00 Anton Vinogradov <[hidden email]>: > > > > > Igniters, > > > > > > As you may know we had only 2 dependencies at ignite-core: jcache and > > > ignite-shmen. > > > > > > IGNITE-3323 Get rid of copypasted JB annotations, use dependency > instead. > > > <https://issues.apache.org/jira/browse/IGNITE-3323> brings one more > > > dependency to org.jetbrains.annotations. > > > This solves problems for people using JB annotations at their projects. > > but > > > makes ignite-core less dependency-lightweight. > > > > > > JB annotaions are used to highlight null problems in IDE and provide > some > > > understanding to users on whether null is allowed/possible in concrete > > > place. I doubt other products/frameworks use it much. > > > > > > But, do we really need them? As for me, we can replace all these > > > annotations by asserts. > > > > > > I propose to discontinue usage of jb annotation and replace them by > > > asserts. > > > > > > Thoughts? > > > > > > |
Dmitriy,
Annotations have @Retention(RetentionPolicy.CLASS) which means * Annotations are to be recorded in the class file by the compiler * but need not be retained by the VM at run time. This is the default * behavior. So, from what I understand, everyone using ignite API with such annotations still require them, correct? On Thu, Jul 28, 2016 at 4:16 PM, Dmitriy Setrakyan <[hidden email]> wrote: > Anton, compile-time annotations should mean that Ignite should not require > these libraries at runtime. Did you try it already and run into issues? > > On Thu, Jul 28, 2016 at 4:34 AM, Anton Vinogradov < > [hidden email]> > wrote: > > > Possible, what's the solution in this case? > > > > On Thu, Jul 28, 2016 at 11:17 AM, Sergi Vladykin < > [hidden email] > > > > > wrote: > > > > > I don't think that JB annotations is a runtime dependency, we should > need > > > them only at compile time, no? > > > > > > Sergi > > > > > > 2016-07-28 11:09 GMT+03:00 Anton Vinogradov <[hidden email]>: > > > > > > > Igniters, > > > > > > > > As you may know we had only 2 dependencies at ignite-core: jcache and > > > > ignite-shmen. > > > > > > > > IGNITE-3323 Get rid of copypasted JB annotations, use dependency > > instead. > > > > <https://issues.apache.org/jira/browse/IGNITE-3323> brings one more > > > > dependency to org.jetbrains.annotations. > > > > This solves problems for people using JB annotations at their > projects. > > > but > > > > makes ignite-core less dependency-lightweight. > > > > > > > > JB annotaions are used to highlight null problems in IDE and provide > > some > > > > understanding to users on whether null is allowed/possible in > concrete > > > > place. I doubt other products/frameworks use it much. > > > > > > > > But, do we really need them? As for me, we can replace all these > > > > annotations by asserts. > > > > > > > > I propose to discontinue usage of jb annotation and replace them by > > > > asserts. > > > > > > > > Thoughts? > > > > > > > > > > |
According to the JLS [1], adding or removing annotations has no effect on
the correct linkage of the binary representations of programs in the Java programming language. Even if these annotations were RUNTIME, a user could successfully use Ignite unless he explicitly uses those classes in runtime. See also [2] [1] https://docs.oracle.com/javase/specs/jls/se7/html/jls-13.html#jls-13.5.7 [2] http://bugs.java.com/view_bug.do?bug_id=6322301 2016-07-28 16:29 GMT+03:00 Anton Vinogradov <[hidden email]>: > Dmitriy, > > Annotations have @Retention(RetentionPolicy.CLASS) > which means > * Annotations are to be recorded in the class file by the compiler > * but need not be retained by the VM at run time. This is the default > * behavior. > > So, from what I understand, everyone using ignite API with such annotations > still require them, correct? > > On Thu, Jul 28, 2016 at 4:16 PM, Dmitriy Setrakyan <[hidden email]> > wrote: > > > Anton, compile-time annotations should mean that Ignite should not > require > > these libraries at runtime. Did you try it already and run into issues? > > > > On Thu, Jul 28, 2016 at 4:34 AM, Anton Vinogradov < > > [hidden email]> > > wrote: > > > > > Possible, what's the solution in this case? > > > > > > On Thu, Jul 28, 2016 at 11:17 AM, Sergi Vladykin < > > [hidden email] > > > > > > > wrote: > > > > > > > I don't think that JB annotations is a runtime dependency, we should > > need > > > > them only at compile time, no? > > > > > > > > Sergi > > > > > > > > 2016-07-28 11:09 GMT+03:00 Anton Vinogradov <[hidden email]>: > > > > > > > > > Igniters, > > > > > > > > > > As you may know we had only 2 dependencies at ignite-core: jcache > and > > > > > ignite-shmen. > > > > > > > > > > IGNITE-3323 Get rid of copypasted JB annotations, use dependency > > > instead. > > > > > <https://issues.apache.org/jira/browse/IGNITE-3323> brings one > more > > > > > dependency to org.jetbrains.annotations. > > > > > This solves problems for people using JB annotations at their > > projects. > > > > but > > > > > makes ignite-core less dependency-lightweight. > > > > > > > > > > JB annotaions are used to highlight null problems in IDE and > provide > > > some > > > > > understanding to users on whether null is allowed/possible in > > concrete > > > > > place. I doubt other products/frameworks use it much. > > > > > > > > > > But, do we really need them? As for me, we can replace all these > > > > > annotations by asserts. > > > > > > > > > > I propose to discontinue usage of jb annotation and replace them by > > > > > asserts. > > > > > > > > > > Thoughts? > > > > > > > > > > > > > > > |
Alexey, thanks for tips.
Seems maven dependency's "optional" tag can handle this. See pullrequest <https://github.com/apache/ignite/pull/909> for details. P.s. I'm not pretty sure this change will not brake something, need to recheck it twice. On Thu, Jul 28, 2016 at 5:15 PM, Alexey Goncharuk < [hidden email]> wrote: > According to the JLS [1], adding or removing annotations has no effect on > the correct linkage of the binary representations of programs in the Java > programming language. Even if these annotations were RUNTIME, a user could > successfully use Ignite unless he explicitly uses those classes in runtime. > See also [2] > > [1] > https://docs.oracle.com/javase/specs/jls/se7/html/jls-13.html#jls-13.5.7 > [2] http://bugs.java.com/view_bug.do?bug_id=6322301 > > 2016-07-28 16:29 GMT+03:00 Anton Vinogradov <[hidden email]>: > > > Dmitriy, > > > > Annotations have @Retention(RetentionPolicy.CLASS) > > which means > > * Annotations are to be recorded in the class file by the compiler > > * but need not be retained by the VM at run time. This is the > default > > * behavior. > > > > So, from what I understand, everyone using ignite API with such > annotations > > still require them, correct? > > > > On Thu, Jul 28, 2016 at 4:16 PM, Dmitriy Setrakyan < > [hidden email]> > > wrote: > > > > > Anton, compile-time annotations should mean that Ignite should not > > require > > > these libraries at runtime. Did you try it already and run into issues? > > > > > > On Thu, Jul 28, 2016 at 4:34 AM, Anton Vinogradov < > > > [hidden email]> > > > wrote: > > > > > > > Possible, what's the solution in this case? > > > > > > > > On Thu, Jul 28, 2016 at 11:17 AM, Sergi Vladykin < > > > [hidden email] > > > > > > > > > wrote: > > > > > > > > > I don't think that JB annotations is a runtime dependency, we > should > > > need > > > > > them only at compile time, no? > > > > > > > > > > Sergi > > > > > > > > > > 2016-07-28 11:09 GMT+03:00 Anton Vinogradov <[hidden email]>: > > > > > > > > > > > Igniters, > > > > > > > > > > > > As you may know we had only 2 dependencies at ignite-core: jcache > > and > > > > > > ignite-shmen. > > > > > > > > > > > > IGNITE-3323 Get rid of copypasted JB annotations, use dependency > > > > instead. > > > > > > <https://issues.apache.org/jira/browse/IGNITE-3323> brings one > > more > > > > > > dependency to org.jetbrains.annotations. > > > > > > This solves problems for people using JB annotations at their > > > projects. > > > > > but > > > > > > makes ignite-core less dependency-lightweight. > > > > > > > > > > > > JB annotaions are used to highlight null problems in IDE and > > provide > > > > some > > > > > > understanding to users on whether null is allowed/possible in > > > concrete > > > > > > place. I doubt other products/frameworks use it much. > > > > > > > > > > > > But, do we really need them? As for me, we can replace all these > > > > > > annotations by asserts. > > > > > > > > > > > > I propose to discontinue usage of jb annotation and replace them > by > > > > > > asserts. > > > > > > > > > > > > Thoughts? > > > > > > > > > > > > > > > > > > > > > |
Free forum by Nabble | Edit this page |