<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:57:25 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>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[JAVA-2521] Repackage the driver so that packages are no longer divided</title>
                <link>https://jira.mongodb.org/browse/JAVA-2521</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;h5&gt;&lt;a name=&quot;Problemstatement&quot;&gt;&lt;/a&gt;Problem statement&lt;/h5&gt;

&lt;p&gt;The 3.x driver releases have a number of problems when considered in relation to Jigsaw modules:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;The same packages are included in multiple jar files.  The mongo-java-driver is an &quot;uber&quot; jar that includes all classes from bson, driver-core, and driver.  If anyone tried to put both the regular and uber jars in the module path it would result in a failure, as only one module can contain a given package.&lt;/li&gt;
	&lt;li&gt;Packages are split across jar files, and for the same reason as above those jars can not be made into modules.  In particular:
	&lt;ul&gt;
		&lt;li&gt;com.mongodb is split across driver-core and driver&lt;/li&gt;
		&lt;li&gt;org.bson is split across bson and driver&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;


&lt;h5&gt;&lt;a name=&quot;Java9Modulestructure&quot;&gt;&lt;/a&gt;Java 9 Module structure&lt;/h5&gt;

&lt;ul&gt;
	&lt;li&gt;bson
	&lt;ul&gt;
		&lt;li&gt;Include all classes in the bson source module&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;mongodb-driver-core
	&lt;ul&gt;
		&lt;li&gt;Include all classes in the driver-core source module&lt;/li&gt;
		&lt;li&gt;Move com.mongodb.connection.netty from driver-core to driver-async or to driver-async-netty.  The latter has advantages because then Netty doesn&apos;t have to be an optional module dependency but a true dependency, and users can just decide whether to depend on the driver-async-netty module explicitly.&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;mongodb-driver-async
	&lt;ul&gt;
		&lt;li&gt;Include all classes in the driver-async source module&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;mongodb-driver
	&lt;ul&gt;
		&lt;li&gt;Include the following packages from the driver source module
		&lt;ul&gt;
			&lt;li&gt;com.mongodb.client
			&lt;ul&gt;
				&lt;li&gt;Add a new entry point into the CRUD API that doesn&apos;t include the legacy API.  It includes a &lt;tt&gt;com.mongodb.client.MongoClients&lt;/tt&gt; factory and a &lt;tt&gt;com.mongodb.client.MongoClient&lt;/tt&gt; interface, mirroring the async version&lt;/li&gt;
			&lt;/ul&gt;
			&lt;/li&gt;
			&lt;li&gt;com.mongodb.client.gridfs&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;mongo-java-driver
	&lt;ul&gt;
		&lt;li&gt;Includes the following packages from the current driver source module
		&lt;ul&gt;
			&lt;li&gt;com.mongodb&lt;/li&gt;
			&lt;li&gt;com.mongodb.client.jndi&lt;/li&gt;
			&lt;li&gt;com.mongodb.client.model&lt;/li&gt;
			&lt;li&gt;com.mongodb.gridfs&lt;/li&gt;
			&lt;li&gt;com.mongodb.util&lt;/li&gt;
			&lt;li&gt;org.bson&lt;/li&gt;
			&lt;li&gt;org.bson.io&lt;/li&gt;
			&lt;li&gt;org.bson.types&lt;/li&gt;
			&lt;li&gt;org.bson.util&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
		&lt;li&gt;Packaged only as an uber jar including all classes in bson, driver-core, and driver, and mongo-java-driver
		&lt;ul&gt;
			&lt;li&gt;Perhaps exclude the new &lt;tt&gt;com.mongodb.client.MongoClients&lt;/tt&gt; and &lt;tt&gt;com.mongodb.client.MongoClient&lt;/tt&gt; classes to avoid having multiple &lt;tt&gt;MongoClient&lt;/tt&gt; classes in the uber jar&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
		&lt;li&gt;Perhaps deprecate &lt;tt&gt;com.mongodb.MongoClient&lt;/tt&gt;&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;


&lt;h6&gt;&lt;a name=&quot;Advantages&quot;&gt;&lt;/a&gt;Advantages &lt;/h6&gt;

&lt;ul&gt;
	&lt;li&gt;The module structure is nice and clean for those using the standard API, with no need for an uber jar or inclusion of packages that are unnecessary.&lt;/li&gt;
	&lt;li&gt;No need to include the legacy driver API when pulling in driver-async, as was required by the original proposal&lt;/li&gt;
	&lt;li&gt;No need to include the legacy bson API (the part that&apos;s in the driver source module) when using the non-legacy API&lt;/li&gt;
	&lt;li&gt;Only users of the legacy API have to use the uber-jar&lt;/li&gt;
&lt;/ul&gt;


&lt;h6&gt;&lt;a name=&quot;Disadvantages&quot;&gt;&lt;/a&gt;Disadvantages &lt;/h6&gt;

&lt;ul&gt;
	&lt;li&gt;It&apos;s sort of a breaking change for anyone currently relying on mongodb-driver, as it will no longer contain the legacy API.  If that&apos;s too onerous, we could instead choose a new module name for the non-legacy API, e.g. mongodb-driver-sync, and continue to publish mongodb-driver as is, though it can&apos;t be a Java 9 module due to the package splitting.&lt;/li&gt;
	&lt;li&gt;Any application that uses just the CRUD API but also needs DBObject will have to depend on the entire mongo-java-driver uber jar (driver-async users have the same problem now).&lt;/li&gt;
	&lt;li&gt;It will not be possible to mix use of the legacy API and the async API on the module path. The problem is that module dependencies are based on module names rather than packages, so mongodb-driver-async has to depend on &lt;em&gt;either&lt;/em&gt; mongodb-driver-core &lt;em&gt;or&lt;/em&gt; mongo-java-driver, but can&apos;t depend on both.&lt;/li&gt;
&lt;/ul&gt;



&lt;h5&gt;&lt;a name=&quot;Originalproposal&quot;&gt;&lt;/a&gt;Original proposal&lt;/h5&gt;

&lt;ul&gt;
	&lt;li&gt;Move org.bson.* classes currently included in the driver module into the bson module.  Consider a separate source root for them like bson/legacy/main&lt;/li&gt;
	&lt;li&gt;Move com.mongodb.connection.netty from driver-core to driver-async or to driver-async-netty.  The latter has advantages because then Netty doesn&apos;t have to be an optional module dependency but a true dependency, and users can just decide whether to depend on the driver-async-netty module explicitly.&lt;/li&gt;
	&lt;li&gt;Combine driver and driver-core into a single module so that com.mongodb is no longer split.  It will depend on the bson module&lt;/li&gt;
	&lt;li&gt;The driver-async module will depend on this combined module.  The downside is that users of driver-async have a dependency, though unused, on the high level sync CRUD API as well as the high level legacy API.  Without breaking binary compatibility in a major way by moving classes to different packages, there may be nothing we can do about this.&lt;/li&gt;
&lt;/ul&gt;

</description>
                <environment></environment>
        <key id="387610">JAVA-2521</key>
            <summary>Repackage the driver so that packages are no longer divided</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="13201">Fixed</resolution>
                                        <assignee username="jeff.yemin@mongodb.com">Jeffrey Yemin</assignee>
                                    <reporter username="jeff.yemin@mongodb.com">Jeffrey Yemin</reporter>
                        <labels>
                    </labels>
                <created>Fri, 26 May 2017 21:19:30 +0000</created>
                <updated>Sun, 29 Oct 2023 02:32:42 +0000</updated>
                            <resolved>Fri, 26 Jan 2018 17:22:56 +0000</resolved>
                                                    <fixVersion>3.7.0</fixVersion>
                                    <component>Packaging</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1786127" author="xgen-internal-githook" created="Fri, 26 Jan 2018 17:22:53 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jeff Yemin&apos;, &apos;email&apos;: &apos;jeff.yemin@10gen.com&apos;, &apos;username&apos;: &apos;jyemin&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2521&quot; title=&quot;Repackage the driver so that packages are no longer divided&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2521&quot;&gt;&lt;del&gt;JAVA-2521&lt;/del&gt;&lt;/a&gt;: Remove Automatic-Module-Name from mongo-java-driver jar&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/b7ff3c75b87403e18ec206061e250a22f769b99f&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/b7ff3c75b87403e18ec206061e250a22f769b99f&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1782468" author="xgen-internal-githook" created="Tue, 23 Jan 2018 18:13:29 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jeff Yemin&apos;, &apos;email&apos;: &apos;jeff.yemin@10gen.com&apos;, &apos;username&apos;: &apos;jyemin&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2521&quot; title=&quot;Repackage the driver so that packages are no longer divided&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2521&quot;&gt;&lt;del&gt;JAVA-2521&lt;/del&gt;&lt;/a&gt;: Add mongodb-driver uber-jar containing driver-sync and driver-legacy.&lt;/p&gt;

&lt;p&gt;Note: this can not be a Java module due to the split of the com.mongodb package between driver-legacy and driver-core.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/dced1698eda4aa892af0098e87c492e7dbc4bad9&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/dced1698eda4aa892af0098e87c492e7dbc4bad9&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1782467" author="xgen-internal-githook" created="Tue, 23 Jan 2018 18:13:27 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jeff Yemin&apos;, &apos;email&apos;: &apos;jeff.yemin@10gen.com&apos;, &apos;username&apos;: &apos;jyemin&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2521&quot; title=&quot;Repackage the driver so that packages are no longer divided&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2521&quot;&gt;&lt;del&gt;JAVA-2521&lt;/del&gt;&lt;/a&gt;: Rename driver directory to driver-sync&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/8a25c0722f36dd8e2b3d83dc07c1f89823b1b095&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/8a25c0722f36dd8e2b3d83dc07c1f89823b1b095&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1782466" author="xgen-internal-githook" created="Tue, 23 Jan 2018 18:13:26 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jeff Yemin&apos;, &apos;email&apos;: &apos;jeff.yemin@10gen.com&apos;, &apos;username&apos;: &apos;jyemin&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2521&quot; title=&quot;Repackage the driver so that packages are no longer divided&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2521&quot;&gt;&lt;del&gt;JAVA-2521&lt;/del&gt;&lt;/a&gt;: Move DBObject-related classes from driver-legacy to driver-core&lt;/p&gt;

&lt;p&gt;This makes it possible to use DBObject using the new CRUD API without pulling in the whole legacy driver API&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/66531c9601f622711e4190a8358275611e395801&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/66531c9601f622711e4190a8358275611e395801&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1782465" author="xgen-internal-githook" created="Tue, 23 Jan 2018 18:13:24 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jeff Yemin&apos;, &apos;email&apos;: &apos;jeff.yemin@10gen.com&apos;, &apos;username&apos;: &apos;jyemin&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2521&quot; title=&quot;Repackage the driver so that packages are no longer divided&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2521&quot;&gt;&lt;del&gt;JAVA-2521&lt;/del&gt;&lt;/a&gt;: Move org.bson package in driver-legacy into the bson module&lt;/p&gt;

&lt;p&gt;This avoids package-splitting issue that make it impossible to modularize the artifacts for Java 9.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/517b70f0130248fcb9d0b83963fc4760adadb523&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/517b70f0130248fcb9d0b83963fc4760adadb523&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1772170" author="xgen-internal-githook" created="Thu, 11 Jan 2018 22:13:19 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;jeff.yemin@10gen.com&apos;, &apos;name&apos;: &apos;Jeff Yemin&apos;, &apos;username&apos;: &apos;jyemin&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2521&quot; title=&quot;Repackage the driver so that packages are no longer divided&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2521&quot;&gt;&lt;del&gt;JAVA-2521&lt;/del&gt;&lt;/a&gt;: Document public classes in com.mongodb.client.internal as not part of the public API&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/ab6828082e901a9188a19469157e4b6ec31649bf&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/ab6828082e901a9188a19469157e4b6ec31649bf&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1769724" author="xgen-internal-githook" created="Tue, 9 Jan 2018 23:03:19 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;jeff.yemin@10gen.com&apos;, &apos;name&apos;: &apos;Jeff Yemin&apos;, &apos;username&apos;: &apos;jyemin&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2521&quot; title=&quot;Repackage the driver so that packages are no longer divided&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2521&quot;&gt;&lt;del&gt;JAVA-2521&lt;/del&gt;&lt;/a&gt;: Replace use of org.mongodb.assertions with com.mongodb.assertions in driver-async&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/3d5e177ccca52459a6ac747d7a30a60cab1a4817&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/3d5e177ccca52459a6ac747d7a30a60cab1a4817&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1769723" author="xgen-internal-githook" created="Tue, 9 Jan 2018 23:03:12 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;jeff.yemin@10gen.com&apos;, &apos;name&apos;: &apos;Jeff Yemin&apos;, &apos;username&apos;: &apos;jyemin&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2521&quot; title=&quot;Repackage the driver so that packages are no longer divided&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2521&quot;&gt;&lt;del&gt;JAVA-2521&lt;/del&gt;&lt;/a&gt;: Modularize the driver sub-project by splitting the legacy API from the standard CRUD API&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/ce655bb474b224c971ae43db4c30131692fe8db8&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/ce655bb474b224c971ae43db4c30131692fe8db8&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1746664" author="jeff.yemin" created="Fri, 8 Dec 2017 12:32:15 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=aharris&quot; class=&quot;user-hover&quot; rel=&quot;aharris&quot;&gt;aharris&lt;/a&gt; yes, they should be.  Note that currently the mongodb-driver module is &lt;em&gt;not&lt;/em&gt; OSGI-compatibile due to the fact that it contains classes from both the org.bson package and the com.mongodb package.  This new structure would rectify that situation by avoiding all package splitting across modules.&lt;/p&gt;</comment>
                            <comment id="1746602" author="aharris" created="Fri, 8 Dec 2017 10:03:42 +0000"  >&lt;p&gt;Would these changes still be compatible with OSGi?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="472556">JAVA-2705</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>JAVA-2508</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr8zpr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>