fix(android)!: preserve JVM settings and reuse metadata sessions (#908)
* perf(graph): avoid repeated traversal edge scans and copies * fix(android)!: preserve JVM settings and reuse metadata sessions Read class metadata without generating application source, retain immutable serialized APK sessions, and join owned cleanup on cancellation and shutdown. BREAKING CHANGE: Android analysis now requires a full JDK 17 or newer with its compiler module for the packaged Java source bridge.
This commit is contained in:
@@ -7,6 +7,7 @@ import { MCP_SHUTDOWN_FAILED } from "./messages.js";
|
||||
|
||||
export const createShutdown = (input: {
|
||||
readonly handle: StdioServerHandle;
|
||||
readonly closeAndroid?: () => Promise<void>;
|
||||
readonly session: BinarySession;
|
||||
readonly unregisterReload: () => void;
|
||||
readonly dependencies: RuntimeDependencies;
|
||||
@@ -23,8 +24,13 @@ export const createShutdown = (input: {
|
||||
shutdownPromise ??= (async () => {
|
||||
unregisterReload();
|
||||
unregisterShutdown();
|
||||
await handle.close();
|
||||
await session.close({ retainProviderDocuments: true });
|
||||
const results = await Promise.allSettled([
|
||||
handle.close(),
|
||||
input.closeAndroid?.(),
|
||||
session.close({ retainProviderDocuments: true }),
|
||||
]);
|
||||
for (const result of results)
|
||||
if (result.status === "rejected") throw result.reason;
|
||||
})();
|
||||
return shutdownPromise;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user