<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:55:52 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>[YANGTOOLS-1341] Rework yang-repo-api in terms of java.nio</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-1341</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt;we have a very much free-standing yang-repo-api, which has a weird placement between being user-facing and internal.&lt;/p&gt;

&lt;p&gt;This is centered around SchemaSourceRepresentation:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
@Beta
&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;interface&lt;/span&gt; SchemaSourceRepresentation &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Identifiable&amp;lt;SourceIdentifier&amp;gt;, Immutable {
    @Override
    SourceIdentifier getIdentifier();
    /**
     * Return the concrete representation type.
     *
     * @&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; The type of representation.
     */
    @NonNull &lt;span class=&quot;code-object&quot;&gt;Class&lt;/span&gt;&amp;lt;? &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; SchemaSourceRepresentation&amp;gt; getType();
    /**
     * Return the symbolic name, &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; available. This name has no semantic meaning beyond being useful &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; debugging
     * by humans.
     *
     * @&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; Symbolic name, &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; available
     */
    Optional&amp;lt;&lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt;&amp;gt; getSymbolicName();
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;which is a type-safe baseline for things like YangTextFileSchemaSource, which little more than a ByteSource, i.e. an API-enriched Supplier&amp;lt;InputStream&amp;gt;. What it has is some additional metadata related to import/include statement handling, so that these can be cross-related. Most of the metadata is static, some is actually validated against the actual content.&lt;/p&gt;

&lt;p&gt;That metadata is encapsulated in SourceIdentifier, which is an internable concepts.Identifier composed of a String name and an optional Revision. There is a SemVer version which adds an optional concepts.SemVer, which is our try at versions based on OpenConfig.&lt;/p&gt;

&lt;p&gt;Reactor side of SemVer is scary, but I think the logic could use some amount of decoupling before we decide what to do with it.&lt;/p&gt;

&lt;p&gt;Now we are typically already interfacing java.nio, for example YangTextFileSchemaSource actually does:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
    @Override
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; InputStream openStream() &lt;span class=&quot;code-keyword&quot;&gt;throws&lt;/span&gt; IOException {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; Files.newInputStream(file.toPath());
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;So at the very least it would be nice if we started talking java.nio.file.Path instead of java.io.File() &#8211; hence &lt;a href=&quot;https://jira.opendaylight.org/browse/YANGTOOLS-1342&quot; title=&quot;Carry java.nio.file.Path in {Yang,Yin}TextFileSchemaSource&quot; class=&quot;issue-link&quot; data-issue-key=&quot;YANGTOOLS-1342&quot;&gt;&lt;del&gt;YANGTOOLS-1342&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now if we look at other YangTextFileSchemaSource implementations, these are just a number of variations on how the input stream is supplied and perhaps passing some more information from the upper layer. There is a provision to supply that content potentially lazily, which really all about connecting to a Path (or a URI) and retrieving the stream there.&lt;/p&gt;

&lt;p&gt;So now we have something which is a java.nio.file.Path implementation providing metadata and binary content &#8211; which fits exactly with how a file system operates: it provides a set of files and those files have attributes. It can additionally provide other services as well, if we provide utilities similar to java.nio.file.Files and our implementation of Path to hold the attached data, we just expose SchemaSourceRepresentation as something you can acquire from the appropriate java.nio.file.attribute.AttributeView.&lt;/p&gt;</description>
                <environment></environment>
        <key id="34606">YANGTOOLS-1341</key>
            <summary>Rework yang-repo-api in terms of java.nio</summary>
                <type id="10000" iconUrl="https://jira.opendaylight.org/images/icons/issuetypes/epic.svg">Epic</type>
                                            <priority id="1" iconUrl="https://jira.opendaylight.org/images/icons/priorities/blocker.svg">Highest</priority>
                        <status id="10003" iconUrl="https://jira.opendaylight.org/images/icons/status_generic.gif" description="">Confirmed</status>
                    <statusCategory id="2" key="new" colorName="blue-gray"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="rovarga">Robert Varga</reporter>
                        <labels>
                            <label>pt</label>
                    </labels>
                <created>Fri, 1 Oct 2021 16:04:03 +0000</created>
                <updated>Thu, 18 Jan 2024 10:42:40 +0000</updated>
                                                            <fixVersion>14.0.0</fixVersion>
                    <fixVersion>13.0.2</fixVersion>
                                    <component>parser</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="70300" author="rovarga" created="Tue, 30 Nov 2021 09:11:40 +0000"  >&lt;p&gt;There is also another data point, which is&#160;&lt;a href=&quot;https://datatracker.ietf.org/doc/html/rfc8525#page-7&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;RFC8525&lt;/a&gt; model of how modules and submodules are organized. In that world submodule names are only unique within a module. This model also further constrains effective module resolution, as it allows only a single revision of a module to be implemented, while multiple module revisions may be &apos;import-only&apos;.&lt;/p&gt;

&lt;p&gt;We will need to somehow reconcile the two views (random files and YANG Library pre-organized) so they can be fed into the parser with the expected results coming out.&lt;/p&gt;</comment>
                            <comment id="70301" author="rovarga" created="Tue, 30 Nov 2021 09:29:45 +0000"  >&lt;p&gt;Since the YANG Library view is explicit in what modules are import-only vs. which are implemented, we need the solution here to cover the requirements of &lt;a href=&quot;https://jira.opendaylight.org/browse/YANGTOOLS-837&quot; title=&quot;Add support for varied model conformance&quot; class=&quot;issue-link&quot; data-issue-key=&quot;YANGTOOLS-837&quot;&gt;&lt;del&gt;YANGTOOLS-837&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="73010" author="rovarga" created="Fri, 5 Jan 2024 15:11:59 +0000"  >&lt;p&gt;At the end of the day, we do have a proper construct in yang-parser-api, which is YangLibModuleSet and YangLibResolver.&lt;br/&gt;
Unfortunately their implementations fall back to talking to BuildAction, which flattens the defintions.&lt;/p&gt;

&lt;p&gt;A chunk of this work relates to &lt;a href=&quot;https://jira.opendaylight.org/browse/YANGTOOLS-1150&quot; title=&quot;Resolve yang-parser-spi naming&quot; class=&quot;issue-link&quot; data-issue-key=&quot;YANGTOOLS-1150&quot;&gt;YANGTOOLS-1150&lt;/a&gt;, which ends up moving quite a few things around &amp;#8211; most notably introducing SourceInfo, which is a light-weight information about how a particular SchemaSource is supposed to link to other sources.&lt;/p&gt;

&lt;p&gt;What we now need is three things:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;define the reactor-equivalent of YangLibModuleSet, yang.parser.spi.source.BuildSpectification &amp;#8211; which holds all the bits we need in BuildAction, plus module-&amp;gt;submodule linkage in a way that is unambiguous&lt;/li&gt;
	&lt;li&gt;provide utilities for turning a flat set of SchemaSources into a BuildSpecification&lt;/li&gt;
	&lt;li&gt;rework yang-parser-reactor to operate exclusively on BuildSpecification&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                            <outwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="28881">YANGTOOLS-837</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </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_10005" key="com.pyxis.greenhopper.jira:gh-epic-color">
                        <customfieldname>Epic Color</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>ghx-label-1</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10004" key="com.pyxis.greenhopper.jira:gh-epic-label">
                        <customfieldname>Epic Name</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>YANG Filesystem</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10003" key="com.pyxis.greenhopper.jira:gh-epic-status">
                        <customfieldname>Epic Status</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[To Do]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i03zwn:</customfieldvalue>

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