<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:28:09 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[ODLPARENT-300] Revisit annotation artifact dependencies</title>
                <link>https://jira.opendaylight.org/browse/ODLPARENT-300</link>
                <project id="10149" key="ODLPARENT">odlparent</project>
                    <description>&lt;p&gt;When we build in Eclipse or VisualStudio we get the following errors:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;The type org.eclipse.jdt.annotation.NonNullByDefault cannot be resolved. It is indirectly referenced from required type org.opendaylight.yangtools.yang.parser.api.YangParserConfiguration{color}{color:#d4d4d4}Java(16777563)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This as per the below analysis, this seems to stem from &amp;lt;scope&amp;gt;provided&amp;lt;/scope&amp;gt; dependencies provided by odlparent/pom.xml. Downstreams which do not have those implicit dependencies can observe such missing references.&lt;/p&gt;</description>
                <environment></environment>
        <key id="36734">ODLPARENT-300</key>
            <summary>Revisit annotation artifact dependencies</summary>
                <type id="10100" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10310&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.opendaylight.org/images/icons/priorities/major.svg">Medium</priority>
                        <status id="5" iconUrl="https://jira.opendaylight.org/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="rovarga">Robert Varga</assignee>
                                    <reporter username="eraonel">mikael petterson</reporter>
                        <labels>
                            <label>pt</label>
                    </labels>
                <created>Fri, 10 Mar 2023 12:46:06 +0000</created>
                <updated>Sun, 4 Jun 2023 17:10:13 +0000</updated>
                            <resolved>Tue, 30 May 2023 13:26:59 +0000</resolved>
                                                    <fixVersion>13.0.0</fixVersion>
                                    <component>General</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="72048" author="rovarga" created="Mon, 13 Mar 2023 17:09:44 +0000"  >&lt;p&gt;Can you provide an example project?&lt;/p&gt;</comment>
                            <comment id="72051" author="JIRAUSER12915" created="Tue, 14 Mar 2023 14:12:10 +0000"  >&lt;p&gt;You can close it. I could bypass in Eclipse.&lt;/p&gt;</comment>
                            <comment id="72052" author="rovarga" created="Tue, 14 Mar 2023 20:30:40 +0000"  >&lt;p&gt;Thinking about this a bit &amp;#8211; I think I know what is going on.&lt;/p&gt;

&lt;p&gt;ODL projects are all derived from odlparent, which provides Eclipse annotations as &amp;lt;scope&amp;gt;provided&amp;lt;/scope&amp;gt;, so we do not generally see this issue &amp;#8211; but it kinda is a real one, as for our docs artifacts we need to spell them out.&lt;/p&gt;

&lt;p&gt;While annotations are completely optional at runtime, at least some of them end up being visible in our API contracts, hence rather than being scope=provided, they should be optional dependencies. This is certainly true of immutables.org and checker-qual (for which we already do some amount of dancing). JDT annotations seem to also fall into this category.&lt;/p&gt;

&lt;p&gt;At the end of the day these end up falling into three buckets based on their RetentionPolicy:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;RetentionPolicy.SOURCE are clearly scope=provided, as they do not leak outside of build project (@MetaInfServices falls here)&lt;/li&gt;
	&lt;li&gt;RetentionPolicy.CLASS are probably scope=compile, optional=true, which means we need to deal with their packaging (i.e. filter for features)&lt;/li&gt;
	&lt;li&gt;RetentionPolicy.RUNTIME are an extension of RetentionPolicy.CLASS, but we also need to evaluate how our supported runtimes interact with them&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="72058" author="JIRAUSER12915" created="Wed, 15 Mar 2023 13:06:28 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=rovarga&quot; class=&quot;user-hover&quot; rel=&quot;rovarga&quot;&gt;rovarga&lt;/a&gt;&#160;&lt;br/&gt;
Yes I just found a way to get around this in Eclipse. I disabled Null analysis.&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;https://jira.opendaylight.org/secure/attachment/18611/18611_image-2023-03-15-14-02-18-101.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;So there will be no fix until version 13? We use 8.0.9&lt;/p&gt;

&lt;p&gt;I guess I can live with it. Thanks for the explanation though.&lt;/p&gt;

&lt;p&gt;//mikael&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="72060" author="rovarga" created="Wed, 15 Mar 2023 19:03:58 +0000"  >&lt;p&gt;That&apos;s odlparent-13, which may or may not be Potassium.&lt;br/&gt;
The project you are seeing this in can be fixed by adding either&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;      &amp;lt;dependency&amp;gt;
        &amp;lt;groupId&amp;gt;org.eclipse.jdt&amp;lt;/groupId&amp;gt;
        &amp;lt;artifactId&amp;gt;org.eclipse.jdt.annotation&amp;lt;/artifactId&amp;gt;
        &amp;lt;version&amp;gt;2.2.700&amp;lt;/version&amp;gt;
        &amp;lt;scope&amp;gt;provided&amp;lt;/scope&amp;gt;
      &amp;lt;/dependency&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;(which is what all ODL projects do implicitly) or&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;      &amp;lt;dependency&amp;gt;
        &amp;lt;groupId&amp;gt;org.eclipse.jdt&amp;lt;/groupId&amp;gt;
        &amp;lt;artifactId&amp;gt;org.eclipse.jdt.annotation&amp;lt;/artifactId&amp;gt;
        &amp;lt;version&amp;gt;2.2.700&amp;lt;/version&amp;gt;
        &amp;lt;optional&amp;gt;true&amp;lt;/optional&amp;gt;
      &amp;lt;/dependency&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;(which what this issue will end up doing, I think)&lt;/p&gt;

&lt;p&gt;In both cases you can omit the version if you pick it from odlparent (through a &lt;a href=&quot;https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#importing-dependencies&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;dependencyManagement import&lt;/a&gt;)&lt;/p&gt;</comment>
                            <comment id="72221" author="rovarga" created="Tue, 30 May 2023 11:19:38 +0000"  >&lt;p&gt;An unfortunate side-effect of this is that &lt;a href=&quot;https://issues.apache.org/jira/browse/MNG-5227&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;optional stanza is not propagate via dependencyManagement&lt;/a&gt;, requiring users to repeat the declaration.&lt;/p&gt;</comment>
                            <comment id="72222" author="rovarga" created="Tue, 30 May 2023 12:51:50 +0000"  >&lt;p&gt;So the first cut is in &#8211; it requires all dependencies to be explicitly declared, which in turn ends up being quite invasive. We&apos;ll see where this goes.&lt;/p&gt;</comment>
                            <comment id="72225" author="rovarga" created="Tue, 30 May 2023 22:13:31 +0000"  >&lt;p&gt;Okay, so this ends up being ugly beyond words.&lt;/p&gt;

&lt;p&gt;The problem is not jdt.annotation, which ends up being an API contract &#8211; and hence we just end up &apos;requires static transitive&apos; it.&lt;/p&gt;

&lt;p&gt;The problem are other annotations on public class, which DO NOT form API contracts, like:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;@SuppressFBWarnings, which we definitely do not want to require transitive to, as they are purely local things to make SpotBugs behave. For that we essentially need to create package-private utility method holders, which are annotated and provide enough rope for the usual code&lt;/li&gt;
	&lt;li&gt;@SuppressModernizer, where we explicitly provide things like bridges to Future.transform(), which invariantly must take Guava&apos;s Function. For those we drop the annotation and widen suppression to cover the entire artifact&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;So we end up battling what is essentially insane tool semantics. I just do not get why a tool like Eclipse would need to resolve an upstream annotation on a private method in a subclass. It is &lt;b&gt;private&lt;/b&gt;&#160;and &lt;b&gt;retention=CLASS&lt;/b&gt; for $DEITY&apos;s sake, so the world is not fluffing coming down &#8211; but hey, we absolutely &lt;b&gt;MUST&lt;/b&gt; resolve it. Okay, yeah, that make some sense &#8211; in which universe?! It is by JLS definition a private detail (especially in JPMS world). Why in the seven circles of anti-Valhalla would a subclass ever even care about that?!&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                            <outwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="36969">ODLPARENT-302</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="18611" name="image-2023-03-15-14-02-18-101.png" size="2128" author="eraonel" created="Wed, 15 Mar 2023 13:02:19 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i044if:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>