<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:34:55 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>[GODRIVER-769] Remove use of internal package from connstring package</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-769</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;p&gt;The &lt;tt&gt;connstring&lt;/tt&gt; package uses the internal package to wrap errors, but that package directly imports the testing package. Either we need to remove the code that&apos;s testing related from the &lt;tt&gt;internal&lt;/tt&gt; package or we need to remove the use of the &lt;tt&gt;internal&lt;/tt&gt; package from the &lt;tt&gt;connstring&lt;/tt&gt; package. This dependency is currently causing the &lt;tt&gt;testing&lt;/tt&gt; package to register it&apos;s flags which affects any user applications importing the driver.&lt;/p&gt;

&lt;p&gt;(original description below)&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;I am using MongoDB go driver&#160;in my project. Everything works fine reading and writing the database. However, as I add MongoDB go driver&#160;as a dependency, the help message shows the unit testing commands like in the following screenshot.&#160;&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;https://jira.mongodb.org/secure/attachment/206478/206478_image-2019-01-16-13-27-20-888.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;This is a sign that the production code depends&#160;on the testing package. I then used godepgraph&#160;(&lt;a href=&quot;https://github.com/kisielk/godepgraph&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/kisielk/godepgraph&lt;/a&gt;)&#160; to figure out which package depends on the testing package. I can identify that the internal package is where the problem is and this line (&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/blob/422ba92f7d4e819d4f08b95ab7ca067f9612d437/internal/channel_connection.go#L11&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/blob/422ba92f7d4e819d4f08b95ab7ca067f9612d437/internal/channel_connection.go#L11&lt;/a&gt;) suggests that the testing package is used in a file that is not ended with `_test`.&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Am I using the mongodb-go-driver in a wrong way? Or if I am correct, can someone fix this problem?&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment>Ubuntu 18.04</environment>
        <key id="673472">GODRIVER-769</key>
            <summary>Remove use of internal package from connstring package</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.mongodb.org/images/icons/priorities/critical.svg">Critical - P2</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="divjot.arora@mongodb.com">Divjot Arora</assignee>
                                    <reporter username="sunyifan112358">Yifan Sun</reporter>
                        <labels>
                    </labels>
                <created>Wed, 16 Jan 2019 18:34:51 +0000</created>
                <updated>Sat, 28 Oct 2023 11:39:10 +0000</updated>
                            <resolved>Thu, 24 Jan 2019 15:25:40 +0000</resolved>
                                                    <fixVersion>0.3.0</fixVersion>
                                    <component>Internal</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="2125876" author="xgen-internal-githook" created="Thu, 24 Jan 2019 15:24:53 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;divjot.arora@10gen.com&apos;, &apos;name&apos;: &apos;Divjot Arora&apos;, &apos;username&apos;: &apos;divjotarora&apos;}
&lt;p&gt;Message: Remove testing dependency from internal&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-769&quot; title=&quot;Remove use of internal package from connstring package&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-769&quot;&gt;&lt;del&gt;GODRIVER-769&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Change-Id: I6cd5f9e1f48b2256f6308b6f59e9a2ba945c260b&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/commit/ceee14bded1c58ee34ace29896831314b856095a&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/commit/ceee14bded1c58ee34ace29896831314b856095a&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="206478" name="image-2019-01-16-13-27-20-888.png" size="30200" author="sunyifan112358" created="Wed, 16 Jan 2019 18:27:21 +0000"/>
                    </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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr8btj:</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>