 }
 
 extension ConfigEntry {
-  func run(parserCommand: ParserCLI, logger: @escaping (LogLevel, String) -> Void) throws {
-    let parser = try parserCommand.parserType.init(options: options) { msg, _, _ in
-      logger(.warning, msg)
+  func run(parserCommand: ParserCLI, logger: (LogLevel, String) -> Void) throws {
+    let context: [String: Any] = try withoutActuallyEscaping(logger) { logger in
+      let parser = try parserCommand.parserType.init(options: options) { msg, _, _ in
+        logger(.warning, msg)
+      }
+
+      let filter = try Filter(pattern: self.filter ?? parserCommand.parserType.defaultFilter)
+      try parser.searchAndParse(paths: inputs, filter: filter)
+      return parser.stencilContext()
     }
-
-    let filter = try Filter(pattern: self.filter ?? parserCommand.parserType.defaultFilter)
-    try parser.searchAndParse(paths: inputs, filter: filter)
-    let context = parser.stencilContext()
 
     for entryOutput in outputs {
       let templateRealPath = try entryOutput.template.resolvePath(forParser: parserCommand, logger: logger)

    cmd: ParserCLI,
    entry: ConfigEntry,
    verbose: Bool,
    logger: @escaping (LogLevel, String) -> Void
  ) throws {
    var entry = entry


import SwiftGenKit

extension Config {
  func runActions(verbose: Bool, logger: (LogLevel, String) -> Void = logMessage) throws {
    let commandsAndEntries = try collectCommandsAndEntries()

    let errors = commandsAndEntries.parallelCompactMap { cmd, entry -> Swift.Error? in
