ComposioHQ/composio · error · Error

Swift package resolution completed but the BetterSwiftAX Acc

Error message

Swift package resolution completed but the BetterSwiftAX AccessibilityControl checkout was not found.

What it means

After `swift package resolve`, the script patches the BetterSwiftAX sources in the expected checkout directory (.build/checkouts/BetterSwiftAX/Sources/AccessibilityControl). If that directory doesn't exist, dependency resolution silently changed (renamed package, different product layout) and patching cannot proceed.

Source

Thrown at ts/packages/cli-local-tools/scripts/build-beeper-imessage-binaries.ts:115

  for (const candidate of licenseCandidates) {
    const sourcePath = path.join(submodulePath, candidate);
    if (await exists(sourcePath)) {
      await fs.copyFile(sourcePath, path.join(outputRoot, 'LICENSE.txt'));
      return;
    }
  }
  throw new Error('No upstream license file found in platform-imessage submodule.');
};

const patchBetterSwiftAxForCurrentSdk = async () => {
  await $`swift package resolve`.cwd(submodulePath);

  const checkoutRoot = path.join(
    submodulePath,
    '.build/checkouts/BetterSwiftAX/Sources/AccessibilityControl'
  );
  if (!(await exists(checkoutRoot))) {
    throw new Error(
      'Swift package resolution completed but the BetterSwiftAX AccessibilityControl checkout was not found.'
    );
  }

  let replacementCount = 0;
  for (const fileName of betterSwiftAxFallbackFiles) {
    const sourcePath = path.join(checkoutRoot, fileName);
    if (!(await exists(sourcePath))) {
      throw new Error(
        `Swift package resolution completed but BetterSwiftAX ${fileName} was not found.`
      );
    }

    const source = await fs.readFile(sourcePath, 'utf8');
    let fileReplacementCount = 0;
    const patched = source.replace(betterSwiftAxConstantReferencePattern, constantName => {
      fileReplacementCount += 1;
      return betterSwiftAxConstantLiteral(constantName);

View on GitHub (pinned to 64b1b85502)

Solutions

  1. Pin BetterSwiftAX to the known-good revision in Package.resolved / submodule and re-run.
  2. Inspect .build/checkouts/ to find the new layout and update checkoutRoot in the script accordingly.
Defensive patterns

Strategy: validation

Validate before calling

const checkoutRoot = path.join(submodulePath, '.build/checkouts/BetterSwiftAX/Sources/AccessibilityControl');
if (!(await exists(checkoutRoot))) {
  throw new Error('BetterSwiftAX layout changed — pin the dependency or update checkoutRoot');
}

Prevention

When it happens

Trigger: A newer BetterSwiftAX version reorganized its Sources tree or renamed the package/product, so the hardcoded checkout path is absent after resolution.

Common situations: Unpinned Swift dependencies (missing/outdated Package.resolved); upstream repo restructuring.

Related errors


AI-assisted analysis of ComposioHQ/composio@64b1b85502 (2026-08-28). Data as JSON: /api/errors/122be0d476bdd41e. Report an issue: GitHub.