IGNITE-28894 C++: add nested thin-client modules to the dev-mode classpath#13373
IGNITE-28894 C++: add nested thin-client modules to the dev-mode classpath#13373anton-vinogradov wants to merge 2 commits into
Conversation
|
TeamCity RunAll (branch The new The remaining RunAll failures are unrelated to this change — the diff only touches the C++ classpath builder, while the failures are in .NET, Java Cache/PDS/Snapshots/Queries/WAL and Messaging suites. Each reproduces on
The C++ suite |
CreateIgniteHomeClasspath()(used whenIGNITE_NATIVE_TEST_CLASSPATH=true, i.e. C++ tests run against an exploded dev build) scansmodules/only one level deep: for every direct child it callsClasspathExploded(child, false), so nested maven modules are never visited.modules/thin-clientis not a maven module itself (nopom.xml) — it is a grouping directory holdingthin-client/apiandthin-client/impl. Neither theirtarget/classesnor theirtarget/libsend up on the classpath of a node started from C++, and they cannot arrive any other way:copy-dependenciesinparent/pom.xmlsets<excludeGroupIds>${project.groupId}</excludeGroupIds>, so ignite artifacts are never copied intotarget/libs.jdepsconfirms real bytecode references fromignite-coreinto the thin client:org.apache.ignite.Ignition->IgniteClient,ClientException,TcpIgniteClientDeactivateCommand,SetStateCommand,StateCommand,WarmUpStopCommand,CommandUtils) ->ClientCluster,IgniteClientThey are resolved lazily, so a node currently starts fine (verified with both the default config and the
cache-test.xmlused by the C++ core tests). But any path reachingIgnition.startClient()or a management command from the C++-hosted JVM fails withNoClassDefFoundError. The hole is latent — it is not yet observable in the existing C++ suite.The same problem was already solved for
modules/binarywhen it was split into api/impl:CreateIgniteHomeClasspath()carries an explicit recursive special case for that directory (ClasspathExploded(home + "/modules/binary", true)). Moving the thin client into nested modules did not add the matching line — the C++ side was not touched.This change mirrors the
binaryspecial case formodules/thin-clientin bothlinux/utils.cppandwin/utils.cpp.The shell launch scripts already account for this:
bin/include/build-classpath.shandbuild-classpath.batboth passmodules/thin-clientexplicitly (right next to theirmodules/binaryentry). So the move into nested modules was completed on the shell side and only the C++ classpath builder was left behind — this PR brings it in line.A test is added in
core-test(classpath_test.cpp) asserting that the compiled classes of all four nested modules —binary/{api,impl}andthin-client/{api,impl}— are present on the classpath returned byCreateIgniteHomeClasspath(). It fails onmaster(thin-client missing) and passes with this fix.A generic two-level scan is deliberately avoided: it would additionally pull
extdata/*(p2p / URI-deployment test data that is intentionally kept off the classpath),platforms/dotnetandweb/*-testinto the dev node classpath.