Repository navigation
dll: boost::dll::fs follows boost::filesystem (policy republish), smoke test asserts it - #9
Merged
ZheFeng7110 merged 3 commits intoNov 29, 2026
Conversation
boost/dll/config.hpp spells boost::dll::fs as `using namespace boost::filesystem;`. The generator follows a using-directive only in the ADL-barrier shape, so mcpplibs#5 re-declared 33 filesystem names by hand; 28 non-operator spellings of main before #1 (symlink_status, space, permissions, unique_path, ...) stayed unreachable. A [[<lib>.republish]] policy entry names the directive's namespace: every name the owning module emitted directly in the target namespace (after its drops, with its guards) is re-exported through it, and the owner becomes a .deps edge. dll::fs now carries filesystem's 138 names under !defined(BOOST_DLL_USE_STD_FS); the std::filesystem branch stays an extra, completed to the standard's 54 names. Cached entries hold only while the owner's emitted names are unchanged.
Same-type checks against boost::filesystem, program_location's return type, enumerators, Boost-only functions (unevaluated) and a temp-directory round trip through functions the hand-kept list lacked, on the error_code overloads. With main's dll.inc the file fails to compile on exactly those names.
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.
Part of #2: the first acceptance criterion and the
boost::dll::fspart of suggested direction 1. The detail-namespace groups, the unanalysed small groups and the reachable-export check in verify-scripts are still open.Problem
boost/dll/config.hppspellsboost::dll::fsasusing namespace boost::filesystem;, and an importer never sees a using-directive. The generator follows a directive only in the ADL-barrier shape, so #5 re-declared 33 filesystem names by hand in a[[dll.extra]]. Compared with main before #1, 49dll::fs::spellings were still missing. 28 of them are not operators:symlink_status,space,permissions,create_symlink,hard_link_count,resize_file,unique_path,system_complete, … The tests used onlypath,recursive_directory_iteratorandis_regular_file.Change
New policy rule
[[<lib>.republish]](namespace,reason, optionalif):if..depsedge.dll:boost::dll::fsnow carries filesystem's 138boost::filesystemnames under#if !defined(BOOST_DLL_USE_STD_FS).std::filesystembranch stays anextra, completed to the standard's 54 names.tests/dll/smoke.cpp:static_asserts againstboost::filesystem, includingprogram_location()'s return type;dll::fs::regular_file);error_codeoverloads.With main's
dll.incthe file fails to compile on exactly those names.tools/tests/test_gen_exports_republish.py: tests for the new rule.Docs:
docs/architecture{,.zh}.mdand the design record.agents/docs/2026-11-28-dll-fs-republish-design.md. The record also covers the rejected options: following every non-detail cross-library directive automatically, and anelsebranch onrepublish.Verified locally
gen_exports.py: a cold full run, then--check.gen_features.py --checkandtest_coverage.py checkalso pass.tools/tests: 49 tests pass.mcpp test -p boost-m-tests-dllon gcc@16.1.0 and llvm@22.1.8, both with mcpp 2026.11.27.1: 4/4 passed.BOOST_DLL_USE_STD_FSbranch was syntax-checked as plain C++ against libstdc++ with gcc and clang, but not built as a module.