Repository navigation
gen_exports: unfollowed using-directives must be declared (skip-directive); detail groups of #2 confirmed droppable - #10
Merged
ZheFeng7110 merged 3 commits intoNov 29, 2026
Conversation
…kip-directive) collect_injections follows a using-directive only in the ADL-barrier shape; any other directive dropped every name it makes visible without a trace. check_skipped_directives now requires each such directive in a library's own headers to be declared, as a republish or as a skip-directive with its reason, and rejects stale entries. Declared skips are listed in skipped.txt.
…-directive) The detail groups of #2 (ublas::detail, serialization::cpp_int_detail, sort::blk_detail) and the other directives the generator skips (icl Interval_Set / Interval_Map, poly_collection::common_impl, accumulators numeric::functional / impl, cobalt::this_coro, covered by its extra). No Boost header, macro, test or example spells a name through any of them. Only skipped.txt changes; no .inc / .deps output moves.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follows #9. Part of #2: the second acceptance criterion, i.e. the detail-namespace groups and suggested direction 2 ("record the reason in
skipped.txt, do not drop silently"). The unanalysed small groups and the reachable-export check in verify-scripts are still open.Problem
collect_injectionsfollows ausing namespaceonly in the ADL-barrier shape, where the target is nested in the directive's own namespace. Every other directive was skipped without a trace. #2 listed three groups lost this way, marked "detail, probably fine to drop, needs confirming":boost::numeric::ublas::detailublas/matrix.hpp,triangular.hpp:using namespace boost::numeric::ublas;boost::serialization::cpp_int_detailmultiprecision/cpp_int/serialize.hpp:using namespace boost::multiprecision;(+::backends)boost::sort::blk_detailsort/block_indirect_sort/blk_detail/block.hpp:using namespace boost::sort::common;Confirmation: the three groups can be dropped
dll::fs(dll: boost::dll::fs follows boost::filesystem (policy republish), smoke test asserts it #9), they are: iclInterval_Set/Interval_Map→icl::segmental,poly_collection::common_impl→poly_collection::detail, accumulatorsnumeric::functional/accumulators::impl→numeric::operators, andcobalt::this_coro→asio::this_coro.upstream/boost/boost(headers, macro bodies) andupstream/boost/libs(tests, examples) and matched each one against the generated.incfiles:ublas::detailexceptions:recursiveis a nested namespace (recursive::mtvis exported), andmake_lambdaappears only in a comment.using namespace.namespace numeric::operators {}reads "For using directives".cobalt::this_coro::executor). It is already handled by[[cobalt.extra]].Change
[[<lib>.skip-directive]](namespace,reason), checked bycheck_skipped_directives:republishor asskip-directive. The error names the directive, its target and both options.republish.skipped.txtas<lib> skip-directive <namespace> -- <reason>; the file header mentions this now.tools/export_policy.toml: accumulators ×2, cobalt, icl ×2, multiprecision, numeric, poly_collection, sort. Each reason states where the directive is and what it is for, the public spelling, and the result of the upstream check. The detail groups also give the name count that following them would add.skipped.txt. No.inc/.depsfile changes.tools/tests/test_gen_exports_skip_directive.py: 8 tests covering the cases above.docs/architecture{,.zh}.mdand the design record.agents/docs/2026-11-28-skip-directive-design.md. The record also covers the rejected options: documenting only the three detail groups, auto-allowing by adetailsubstring, and switching cobalt torepublish, which would add five asio helper types to its surface.Side finding (not addressed)
accumulators' GMF includes
boost/accumulators/numeric/functional/vector.hppand its valarray / complex siblings. Even so, no module exports the operator templates inboost::numeric::operators(operator/(std::vector…)etc.). This is unrelated to directives; it is noted in the design record for a separate look.Verified locally
gen_exports.py --check --no-cache(cold, every library checked) and a cached--check;gen_features.py --check;tools/ci/test_coverage.py check;tools/doc-tools/check_docs.pyandgen_index.py --check.tools/tests: 57 tests pass.sortentry removed, generation fails witherror: sort: `using namespace boost::sort::common;` in boost::sort::blk_detail (...) is not followed: declare [[sort.republish]] ... else [[sort.skip-directive]] ....tools/testsand the docs checks were rerun on the rebased branch.