<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:59:45 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>[CXX-618] scons install does not copy mongo/bson/bson_validate.h</title>
                <link>https://jira.mongodb.org/browse/CXX-618</link>
                <project id="11980" key="CXX">C++ Driver</project>
                    <description>&lt;p&gt;This header is not copied into include path during scons install, which means mongo::validateBSON(const char*, uint64) can&apos;t be used from client applications.&lt;/p&gt;

&lt;p&gt;I&apos;m setting priority Minor since this affects only a single function and the workaround is to copy the header to the correct place manually after installing.&lt;/p&gt;</description>
                <environment></environment>
        <key id="214973">CXX-618</key>
            <summary>scons install does not copy mongo/bson/bson_validate.h</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="9">Done</resolution>
                                        <assignee username="andrew.morrow@mongodb.com">Andrew Morrow</assignee>
                                    <reporter username="ms7s">Martin Sucha</reporter>
                        <labels>
                            <label>legacy-cxx</label>
                    </labels>
                <created>Mon, 6 Jul 2015 10:54:22 +0000</created>
                <updated>Tue, 6 Dec 2016 07:35:34 +0000</updated>
                            <resolved>Mon, 6 Jul 2015 20:18:30 +0000</resolved>
                                    <version>legacy-1.0.3</version>
                                    <fixVersion>legacy-1.0.4</fixVersion>
                                    <component>Build</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="959157" author="ms7s" created="Tue, 7 Jul 2015 07:12:46 +0000"  >&lt;p&gt;Thank you!&lt;/p&gt;</comment>
                            <comment id="958806" author="xgen-internal-githook" created="Mon, 6 Jul 2015 20:17:57 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;acmorrow&apos;, u&apos;name&apos;: u&apos;Andrew Morrow&apos;, u&apos;email&apos;: u&apos;acm@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CXX-618&quot; title=&quot;scons install does not copy mongo/bson/bson_validate.h&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-618&quot;&gt;&lt;del&gt;CXX-618&lt;/del&gt;&lt;/a&gt; Export validateBSON method&lt;br/&gt;
Branch: legacy&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/commit/a34b0a8140723d2d2e7357603214791644b8ac70&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/commit/a34b0a8140723d2d2e7357603214791644b8ac70&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="958739" author="acm" created="Mon, 6 Jul 2015 19:12:09 +0000"  >&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/pull/299&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/pull/299&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="958342" author="acm" created="Mon, 6 Jul 2015 13:53:16 +0000"  >&lt;p&gt;I think that is a reasonable use case. The alternative would be to use a non-owning BSONObj and then call its ::valid method, which would in turn call validateBSON, but that is somewhat sketchy because there is no way to specify a maximum valid memory region when using the BSONObj constructor.&lt;/p&gt;

&lt;p&gt;If you are interested, please send us a github pull request. The steps to fix this should be fairly easy:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Add the bson_validate.h header to the list of published headers&lt;/li&gt;
	&lt;li&gt;Add the necessary export macro to the declaration of validateBSON.&lt;/li&gt;
	&lt;li&gt;Add bson_validate.h to the bson.h facade header.&lt;/li&gt;
	&lt;li&gt;Write (or extend) a client example that uses validateBSON, to ensure that consumers of the driver can see the header and link against the symbol.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Otherwise we will try to get this done for the next release.&lt;/p&gt;
</comment>
                            <comment id="958313" author="ms7s" created="Mon, 6 Jul 2015 13:22:12 +0000"  >&lt;p&gt;Thank you for quick response.&lt;/p&gt;

&lt;p&gt;In addition to querying MongoDB, we need to be able to process BSON objects encoded in a network stream using another network protocol. For this to work, we need to be able to validate BSON objects in arbitrary memory buffer.&lt;/p&gt;</comment>
                            <comment id="958291" author="acm" created="Mon, 6 Jul 2015 12:46:54 +0000"  >&lt;p&gt;Thanks for the report.&lt;/p&gt;

&lt;p&gt;No export macro is attached to the declaration of validateBSON, so copying the header alone is insufficient when mongoclient is compiled as a shared library. When separating the driver from the server repository, headers were added to the install target (and annotated with export macros as needed) only if they were reachable from either the bson.h or dbclient.h facade headers, since these headers represent the user facing interface to the library. The bson_validate.h header is not reachable from either bson.h or dbclient.h, so it was never annotated or added to the install target.&lt;/p&gt;

&lt;p&gt;Our default position is to not expand the public interface of the driver without a compelling use case. Could you please describe why you need to call validateBSON directly? Please note that you can configure the driver to automatically do validation of BSON returned from the server by way of the mongo::client::Options::setValidateObjects API call.&lt;/p&gt;
</comment>
                    </comments>
                    <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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hsay5r:</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>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="575">Platform 6 07/17/15</customfieldvalue>

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