Polyman Documentation - v3.0.0
    Preparing search index...
    • Runs compile unless an up-to-date binary for request is cached, in which case that binary is restored to request.binaryPath instead. After a real compile the result is stored for next time and old entries are pruned.

      Cache problems (unreadable files, a compiler that cannot report its version, a read-only problem directory) never fail the compile; they only mean the compile is not cached.

      Parameters

      • request: CompileRequest

        What is being compiled and how

      • compile: () => Promise<unknown>

        Performs the real compilation and writes request.binaryPath

      Returns Promise<void>

      Resolves once request.binaryPath is up to date

      Whatever compile throws

      await cachedCompile(
      { sourcePath, binaryPath, compiler: 'g++', flags: ['-O2'], includeDirs: [cwd] },
      () => executor.execute(command, { timeout: 10000, silent: true })
      );