Route all module interaction through dispatch
A module is addressed by name and command string, and nothing else. Typed API access handed a caller a pointer into the callee's function table, which meant compiling against that module's struct layout — a build-time dependency between modules that the design does not permit. Removing it also removes the manifest, the table magic constant, and the table size field, which existed only to describe and validate those tables. Load validation is now three steps: reserved contract symbols resolve, the minimum-version handshake passes, and the version and description probes return well-formed values. The contract is four reserved symbols, and a module's interface is the command vocabulary it documents. Documentation is brought in line, and artifacts are named exactly: libdpm-core.so for the library, <dpm/core.h> for the header, the dpm binary for the command-line tool.
This commit is contained in:
@@ -82,7 +82,7 @@ set_target_properties(info PROPERTIES
|
||||
add_dependencies(dpm info)
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# Test fixture modules: one known-good stub, five deliberately broken
|
||||
# Test fixture modules: one known-good stub, three deliberately broken
|
||||
# ---------------------------------------------------------------------
|
||||
enable_testing()
|
||||
|
||||
@@ -95,7 +95,7 @@ file(WRITE ${CMAKE_BINARY_DIR}/DartConfiguration.tcl
|
||||
|
||||
set(FIXTURE_MODULE_DIR ${CMAKE_BINARY_DIR}/tests/fixtures)
|
||||
|
||||
foreach(fixture good missing_symbols bad_magic lying_manifest core_too_new bad_version)
|
||||
foreach(fixture good missing_symbols core_too_new bad_version)
|
||||
add_library(fixture_${fixture} MODULE tests/fixtures/src/${fixture}.cpp)
|
||||
set_target_properties(fixture_${fixture} PROPERTIES
|
||||
PREFIX ""
|
||||
@@ -123,7 +123,7 @@ set_target_properties(test_core PROPERTIES
|
||||
BUILD_RPATH "$ORIGIN/../lib"
|
||||
)
|
||||
|
||||
foreach(fixture good missing_symbols bad_magic lying_manifest core_too_new bad_version)
|
||||
foreach(fixture good missing_symbols core_too_new bad_version)
|
||||
add_dependencies(test_core fixture_${fixture})
|
||||
endforeach()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user