A tool to create Boost module dependency reports
boostorg / boostdep Goto Github PK
View Code? Open in Web Editor NEWA tool to create Boost module dependency reports
Home Page: https://boost.org/tools/boostdep
A tool to create Boost module dependency reports
Home Page: https://boost.org/tools/boostdep
It was suggested I should use github instead :)
Executive summary: msm uses fusion, which uses utility, but boostdep does not list "utility" as a dependency of "msm".
In an effort of migrating from bintray downloads (with caching) on CI I wanted to use boostdep with older boost versions (Use case: Install a subset of the libraries)
The problem I'm running into is that some modules didn't exist yet. So for example FileSystem includes boost/functional/hash_fwd.hpp
which is mapped to container_hash
via exceptions.txt. But that module doesn't exist so the subsequent git submodule update
fails.
A potential (partial) solution is to check the modules in the exceptions file via is_module
and skip the following mappings if the module doesn't exist.
Downside: Moved headers such as in 9d58908#diff-6935182ccded16172f0fa2c6a34a6bb4 or b87f4a3#diff-6935182ccded16172f0fa2c6a34a6bb4 won't be correct.
But at least it runs through which is a bit better and such known things could be manually specified by the user
Using Python3 (default on e.g. Windows GHA) depinst raises:
File "tools/boostdep/depinst/depinst.py", line 57
print 'Cannot determine module for header', h
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('Cannot determine module for header', h)?
I'd propose to make the tool at least Python3 compatible if not Python3 only given that Python2 is EOL already. However as current system python
are often Python2 this might cause to much fallout.
An easy fix would be to use print('Cannot determine module for header ' + h)
style which is equivalent in Python2 or python 3 or use the future
module which allows print('Cannot determine module for header', h)
syntax in Python2 (actually it works already but prints ('Cannot determine module for header', 'aa')
)
... because it would be useful.
I saw this in a build on Appveyor this morning:
https://ci.appveyor.com/project/jeking3/uuid/builds/24529878/job/rwc2r69ccmy50yii#L39
C:\projects\boost-root>python tools/boostdep/depinst/depinst.py --include benchmark --include example --include examples --include tools uuid || EXIT /B
fatal: unable to access 'https://github.com/boostorg/container_hash.git/': Failed to connect to github.com port 443: Timed out
fatal: clone of 'https://github.com/boostorg/container_hash.git' into submodule path 'C:/projects/boost-root/libs/container_hash' failed
Failed to clone 'libs/container_hash'. Retry scheduled
fatal: unable to access 'https://github.com/boostorg/core.git/': Failed to connect to github.com port 443: Timed out
fatal: clone of 'https://github.com/boostorg/core.git' into submodule path 'C:/projects/boost-root/libs/core' failed
Failed to clone 'libs/core'. Retry scheduled
fatal: unable to access 'https://github.com/boostorg/lexical_cast.git/': Failed to connect to github.com port 443: Timed out
fatal: clone of 'https://github.com/boostorg/lexical_cast.git' into submodule path 'C:/projects/boost-root/libs/lexical_cast' failed
Failed to clone 'libs/lexical_cast'. Retry scheduled
fatal: unable to access 'https://github.com/boostorg/move.git/': Failed to connect to github.com port 443: Timed out
fatal: clone of 'https://github.com/boostorg/move.git' into submodule path 'C:/projects/boost-root/libs/move' failed
Failed to clone 'libs/move'. Retry scheduled
fatal: unable to access 'https://github.com/boostorg/numeric_conversion.git/': Failed to connect to github.com port 443: Timed out
fatal: clone of 'https://github.com/boostorg/numeric_conversion.git' into submodule path 'C:/projects/boost-root/libs/numeric/conversion' failed
Failed to clone 'libs/numeric/conversion'. Retry scheduled
fatal: unable to access 'https://github.com/boostorg/mpl.git/': Failed to connect to github.com port 443: Timed out
fatal: clone of 'https://github.com/boostorg/mpl.git' into submodule path 'C:/projects/boost-root/libs/mpl' failed
Failed to clone 'libs/mpl'. Retry scheduled
fatal: unable to access 'https://github.com/boostorg/preprocessor.git/': Could not resolve host: github.com
fatal: clone of 'https://github.com/boostorg/preprocessor.git' into submodule path 'C:/projects/boost-root/libs/preprocessor' failed
Failed to clone 'libs/preprocessor'. Retry scheduled
fatal: unable to access 'https://github.com/boostorg/range.git/': Could not resolve host: github.com
fatal: clone of 'https://github.com/boostorg/range.git' into submodule path 'C:/projects/boost-root/libs/range' failed
Failed to clone 'libs/range'. Retry scheduled
fatal: unable to access 'https://github.com/boostorg/smart_ptr.git/': Could not resolve host: github.com
fatal: clone of 'https://github.com/boostorg/smart_ptr.git' into submodule path 'C:/projects/boost-root/libs/smart_ptr' failed
Failed to clone 'libs/smart_ptr'. Retry scheduled
fatal: unable to access 'https://github.com/boostorg/spirit.git/': Could not resolve host: github.com
fatal: clone of 'https://github.com/boostorg/spirit.git' into submodule path 'C:/projects/boost-root/libs/spirit' failed
Failed to clone 'libs/spirit'. Retry scheduled
fatal: unable to access 'https://github.com/boostorg/system.git/': Could not resolve host: github.com
fatal: clone of 'https://github.com/boostorg/system.git' into submodule path 'C:/projects/boost-root/libs/system' failed
Failed to clone 'libs/system'. Retry scheduled
fatal: unable to access 'https://github.com/boostorg/unordered.git/': Could not resolve host: github.com
fatal: clone of 'https://github.com/boostorg/unordered.git' into submodule path 'C:/projects/boost-root/libs/unordered' failed
Failed to clone 'libs/unordered'. Retry scheduled
fatal: unable to access 'https://github.com/boostorg/utility.git/': Could not resolve host: github.com
fatal: clone of 'https://github.com/boostorg/utility.git' into submodule path 'C:/projects/boost-root/libs/utility' failed
Failed to clone 'libs/utility'. Retry scheduled
fatal: unable to access 'https://github.com/boostorg/variant.git/': Could not resolve host: github.com
fatal: clone of 'https://github.com/boostorg/variant.git' into submodule path 'C:/projects/boost-root/libs/variant' failed
Failed to clone 'libs/variant'. Retry scheduled
fatal: unable to access 'https://github.com/boostorg/mpl.git/': Could not resolve host: github.com
fatal: clone of 'https://github.com/boostorg/mpl.git' into submodule path 'C:/projects/boost-root/libs/mpl' failed
Failed to clone 'libs/mpl' a second time, aborting
Installing: config, headers, ../tools/boost_install, ../tools/build
Installing: core, static_assert, random, io, winapi, predef, move, timer, assert, tti, type_traits, lexical_cast, container_hash, test, serialization, array, config, throw_exception, numeric/conversion
Installing: detail, integer, iterator, utility, multiprecision, container, system, dynamic_bitset, smart_ptr, function, mpl, variant, conversion, preprocessor, optional, spirit, function_types, exception, algorithm, chrono, bind, range, math, unordered
C:\projects\boost-root>REM Bootstrap is not expecting cxxflags content so we zero it out for the bootstrap only
C:\projects\boost-root>SET OLD_CXXFLAGS=
The command I run uses || EXIT /B
so that it will exit the batch script if it returns anything non-zero, but in this case it looks like even though github could not be reached, depinst returned 0 indicating success.
I know this was intentional, but the addition of non-ascii path names caused scripts I had running (python 2 shutil.copytree on windows) to fail. Others may experience other issues with this.
Git 2.8.0 added the --jobs
param to fetch submodules in parallel. E.g. git submodule -q update --init --jobs 3 libs/config libs/headers libs/../tools/boost_install libs/../tools/build libs/../tools/cmake
Would be great if boostdep had an option to auto-use that when possible. Checking the git version in Bash is a bit cumbersome and using --git_args "--jobs 3"
is leading to errors for older git versions
Currently boostdep
will report as a dependency every include of every header it finds within an include folder. It would be nice if there was a way to tell boostdep
that the header is optional, lets say with something like a comment line that contains boostdep:integration_header
. To sanitize misuse of such headers they must not be included from other headers within a library that are not marked as well optional. When integration header is used from other libraries it is considered a dependency though, and the mark should be ignored.
Some libraries have benchmark, example, and tool directories. Currently the python method to scan for dependencies does not look for either. Instead perhaps, could the tool simply scan for all source code files in the entire project directory?
When I added a "tool" directory with program source that uses boost::program_options into Boost.Format, boostdep failed to pick that up.
Ideally if one could ask bjam for a list of all sources within a project, that would be even better.
Starting some time in the last 24 hours many of the Boost.Math CI tests are failing due to a missing boost/format.hpp, see for example: https://github.com/boostorg/math/actions/runs/6768902679/job/18401577644?pr=1046
The annoying thing is I see no changes in Math, Boostdep, or Format that would cause this!
Hoping you have more ideas than I do...
And yes, this is a bit of a release blocker for us :(
Refs boostorg/math#1046.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.