Skip to content

Commit

Permalink
use Python implementation of docca
Browse files Browse the repository at this point in the history
  • Loading branch information
grisumbras committed May 13, 2024
1 parent dc95216 commit cb9c8e7
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 60 deletions.
2 changes: 1 addition & 1 deletion .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def main(ctx):
linux_cxx("gcc 11 s390x", "g++-11", packages="g++-11", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu2004:multiarch", environment={'B2_TOOLSET': 'gcc-11', 'B2_CXXSTD': '17,2a'}, arch="s390x", globalenv=globalenv),
linux_cxx("Clang 12 arm64", "clang++-12", packages="clang-12 libstdc++-9-dev", llvm_os="focal", llvm_ver="12", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu2004:multiarch", environment={'B2_TOOLSET': 'clang-12', 'B2_CXXSTD': '17,20', 'DRONE_JOB_UUID': '7719a1c783m'}, arch="arm64", globalenv=globalenv),
linux_cxx("gcc 11 arm64", "g++-11", packages="g++-11", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu2004:multiarch", environment={'B2_TOOLSET': 'gcc-11', 'B2_CXXSTD': '17,2a', 'DRONE_JOB_UUID': '0716d9708dm'}, arch="arm64", globalenv=globalenv),
linux_cxx("docs", "g++", packages="docbook docbook-xml docbook-xsl xsltproc libsaxonhe-java default-jre-headless flex libfl-dev bison unzip rsync", buildtype="docs", buildscript="drone", image="cppalliance/droneubuntu1804:1", environment={'COMMENT': 'docs', 'DRONE_JOB_UUID': 'b6589fc6ab'}, globalenv=globalenv),
linux_cxx("docs", "g++", packages="docbook docbook-xml docbook-xsl python3-jinja2 xsltproc flex libfl-dev bison unzip rsync", buildtype="docs", buildscript="drone", image="cppalliance/droneubuntu1804:1", environment={'COMMENT': 'docs', 'DRONE_JOB_UUID': 'b6589fc6ab'}, globalenv=globalenv),
linux_cxx("codecov", "g++-8", packages="g++-8", buildtype="codecov", buildscript="drone", image=linuxglobalimage, environment={'COMMENT': 'codecov.io', 'LCOV_BRANCH_COVERAGE': '0', 'B2_CXXSTD': '11', 'B2_TOOLSET': 'gcc-8', 'B2_DEFINES': 'BOOST_JSON_EXPENSIVE_TESTS BOOST_NO_STRESS_TEST=1', 'CODECOV_TOKEN': {'from_secret': 'codecov_token'}, 'DRONE_JOB_UUID': '356a192b79'}, globalenv=globalenv),
linux_cxx("Valgrind", "clang++-14", packages="clang-14 libc6-dbg libc++-dev libstdc++-9-dev", llvm_os="jammy", llvm_ver="14", buildscript="drone", buildtype="valgrind", image="cppalliance/droneubuntu2204:1", environment={'COMMENT': 'valgrind', 'B2_TOOLSET': 'clang-14', 'B2_CXXSTD': '11,14,17', 'B2_DEFINES': 'BOOST_NO_STRESS_TEST=1', 'B2_VARIANT': 'debug', 'B2_TESTFLAGS': 'testing.launcher=valgrind', 'VALGRIND_OPTS': '--error-exitcode=1'}, globalenv=globalenv),
linux_cxx("ASan GCC", "g++-12", packages="g++-12", buildscript="drone", buildtype="boost", image="cppalliance/droneubuntu2204:1", environment={'COMMENT': 'asan', 'B2_VARIANT': 'debug', 'B2_TOOLSET': 'gcc-12', 'B2_CXXSTD': '11,14,17', 'B2_ASAN': '1', 'B2_DEFINES': 'BOOST_NO_STRESS_TEST=1', 'DRONE_EXTRA_PRIVILEGED': 'True'}, globalenv=globalenv, privileged=True),
Expand Down
6 changes: 1 addition & 5 deletions .drone/drone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,6 @@ cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Release
cd build
sudo make install
cd ../..
if [ ! -f saxonhe.zip ]; then wget -O saxonhe.zip https://sourceforge.net/projects/saxon/files/Saxon-HE/9.9/SaxonHE9-9-1-4J.zip/download && echo "not-cached" ; else echo "cached" ; fi
unzip -o saxonhe.zip
sudo rm /usr/share/java/Saxon-HE.jar
sudo cp saxon9he.jar /usr/share/java/Saxon-HE.jar
cd ..
BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
git clone -b $BOOST_BRANCH https://github.com/boostorg/boost.git boost-root --depth 1
Expand All @@ -121,7 +117,7 @@ python tools/boostdep/depinst/depinst.py ../tools/quickbook

echo '==================================> SCRIPT'

echo "using doxygen ; using boostbook ; using saxonhe ;" > tools/build/src/user-config.jam
echo "using doxygen ; using boostbook ; using python : : python3 ;" > tools/build/src/user-config.jam
./b2 -j3 libs/$SELF/doc//boostrelease

elif [ "$DRONE_JOB_BUILDTYPE" == "codecov" ]; then
Expand Down
24 changes: 3 additions & 21 deletions doc/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,11 @@ project json/doc ;
import boostbook ;
import ../../../tools/docca/docca.jam ;


docca.reference reference.qbk
docca.pyreference reference.qbk
:
xsl/custom-overrides.xsl
[ glob-tree-ex ../include/boost/json : *.hpp *.ipp : detail impl ]
:
<doxygen:param>PROJECT_NAME=JSON
<doxygen:param>PROJECT_BRIEF="JSON Library"
<doxygen:param>ALIASES="esafe=\"@par Exception Safety\""
<doxygen:param>FILE_PATTERNS=
<doxygen:param>EXAMPLE_PATTERNS=
<doxygen:param>DISTRIBUTE_GROUP_DOC=YES
<doxygen:param>MACRO_EXPANSION=YES
<doxygen:param>EXPAND_ONLY_PREDEF=YES
Expand All @@ -38,24 +32,12 @@ docca.reference reference.qbk
<doxygen:param>JAVADOC_AUTOBRIEF=YES
<doxygen:param>AUTOLINK_SUPPORT=NO
<doxygen:param>EXTRACT_ALL=YES
<doxygen:param>EXTRACT_PRIVATE=YES
<doxygen:param>EXTRACT_LOCAL_CLASSES=NO
<doxygen:param>SHOW_INCLUDE_FILES=NO
<doxygen:param>INLINE_INFO=NO
<doxygen:param>SORT_MEMBER_DOCS=NO
<doxygen:param>SORT_MEMBERS_CTORS_1ST=YES
<doxygen:param>SHOW_USED_FILES=NO
<doxygen:param>SHOW_FILES=NO
<doxygen:param>SHOW_NAMESPACES=NO
<doxygen:param>CLASS_DIAGRAMS=NO
<doxygen:param>STRIP_FROM_PATH=include/

# <doxygen:param>ALLOW_UNICODE_NAMES=NO
# <doxygen:param>GROUP_NESTED_COMPOUNDS=NO
# <doxygen:param>HIDE_COMPOUND_REFERENCE=NO
# <doxygen:param>WARN_AS_ERROR=NO
<docca:config>config.json
;


#-------------------------------------------------------------------------------
#
# Produce the Boost.Book XML from the QuickBook
Expand Down
9 changes: 9 additions & 0 deletions doc/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{ "include_private": false
, "legacy_behavior": false
, "link_prefix": "json.ref."
, "default_namespace": "boost::json"
, "convenience_header": "boost/json.hpp"
, "replace_strings":
{ "__see_below__": "``['see-below]``"
}
}
10 changes: 5 additions & 5 deletions doc/qbk/main.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,15 @@
[include benchmarks.qbk]
[include comparison.qbk]

[section:quickref Reference]
[section:ref Reference]
[xinclude quickref.xml]
[endsect]
[block'''<reference id="json_hidden"><title>This Page Intentionally Left Blank 1/2</title>''']
[section:ref This Page Intentionally Left Blank 2/2]

[block'''<reference id="json_hidden"><title>This Page Intentionally Left Blank</title>''']
[include reference.qbk]
[endsect]
[block'''</reference>''']

[endsect]

[include release_notes.qbk]

[xinclude index.xml]
2 changes: 1 addition & 1 deletion doc/qbk/release_notes.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
[*New Features]

* [issue 800] [link json.ref.boost__json__value.set_at_pointer `set_at_pointer`].
* [issue 570] [link json.ref.boost__json__value.hash_value `boost::hash` support].
* [issue 570] [link json.ref.boost__json__value.hash_value_fr `boost::hash` support].

[*Improvements]

Expand Down
25 changes: 0 additions & 25 deletions doc/xsl/custom-overrides.xsl

This file was deleted.

4 changes: 2 additions & 2 deletions include/boost/json/value.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3543,8 +3543,8 @@ class value
parsing fails, `std::ios_base::failbit` will be set for `is` and
`jv` will be left unchanged. Regardless of whether `skipws` flag is set
on `is`, consumes whitespace before and after JSON, because whitespace
is considered a part of JSON. Behaves as [_FormattedInputFunction_]
(https://en.cppreference.com/w/cpp/named_req/FormattedInputFunction).<br>
is considered a part of JSON. Behaves as
[_FormattedInputFunction_](https://en.cppreference.com/w/cpp/named_req/FormattedInputFunction).
Note: this operator cannot assume that the stream only contains a
single JSON document, which may result in **very underwhelming
Expand Down

0 comments on commit cb9c8e7

Please sign in to comment.