{"record":{"id":"48b06687e0591cdc","repo":"apple/pkl","slug":"pkl-version-s-requested-by-module-s-is-not-s","errorCode":null,"errorMessage":"Pkl version `%s` requested by module `%s` is not supported. Available versions: %s%nTo fix this problem, edit the module's `@ModuleInfo { minPklVersion = \"%s\" }` annotation.","messagePattern":"Pkl version `(.+?)` requested by module `(.+?)` is not supported\\. Available versions: (.+?)%nTo fix this problem, edit the module's `@ModuleInfo (.+?)` annotation\\.","errorType":"exception","errorClass":"ExecutorException","httpStatus":null,"severity":"error","filePath":"pkl-executor/src/main/java/org/pkl/executor/EmbeddedExecutor.java","lineNumber":152,"sourceCode":"    var matcher = MODULE_INFO_PATTERN.matcher(sourceText);\n    return matcher.find() ? Version.parse(matcher.group(1)) : null;\n  }\n\n  private PklDistribution findCompatibleDistribution(\n      Path modulePath, Version requestedVersion, ExecutorOptions options) {\n    var result =\n        pklDistributions.stream()\n            .filter(it -> it.getVersion().compareTo(requestedVersion) >= 0)\n            .min(Comparator.comparing(PklDistribution::getVersion));\n\n    if (result.isPresent()) return result.get();\n\n    var availableVersions =\n        pklDistributions.stream()\n            .map(it -> it.getVersion().toString())\n            .collect(Collectors.joining(\", \"));\n\n    throw new ExecutorException(\n        String.format(\n            \"Pkl version `%s` requested by module `%s` is not supported. Available versions: %s%n\"\n                + \"To fix this problem, edit the module's `@ModuleInfo { minPklVersion = \\\"%s\\\" }` annotation.\",\n            requestedVersion,\n            toDisplayPath(modulePath, options),\n            availableVersions,\n            requestedVersion));\n  }\n\n  private static Path toDisplayPath(Path modulePath, ExecutorOptions options) {\n    var rootDir = options.getRootDir();\n    return rootDir == null ? modulePath : relativize(modulePath, rootDir);\n  }\n\n  // On Windows, `Path.relativize` will fail if the two paths have different roots.\n  private static Path relativize(Path path, Path base) {\n    if (path.isAbsolute() && base.isAbsolute() && !path.getRoot().equals(base.getRoot())) {\n      return path;","sourceCodeStart":134,"sourceCodeEnd":170,"githubUrl":"https://github.com/apple/pkl/blob/f3efcbfc9b60d30053b0536d664948d7aa1b8673/pkl-executor/src/main/java/org/pkl/executor/EmbeddedExecutor.java#L134-L170","documentation":"findCompatibleDistribution found the module's requested minPklVersion but no configured Pkl distribution provides a compatible version. The executor lists all available distribution versions and tells you which version string to edit in the module's @ModuleInfo annotation.","triggerScenarios":"evaluatePath on a module whose @ModuleInfo minPklVersion is newer (or otherwise incompatible) than every Pkl distribution registered with the embedded executor.","commonSituations":"A contributor bumps minPklVersion to a release not yet bundled; CI image pins an older pkl distribution; mixing module repos that target different Pkl versions.","solutions":["Edit the module's @ModuleInfo { minPklVersion } to a version from the available-versions list","Add/register a Pkl distribution (fat jar) matching the requested version via executor options","Downgrade the module or upgrade the executor's bundled distributions","Pin consistent Pkl versions across team/CI"],"exampleFix":"// before\n@ModuleInfo { minPklVersion = \"0.28.0\" }  // not available\n\n// after (with 0.27.x distributions installed)\n@ModuleInfo { minPklVersion = \"0.27.2\" }","handlingStrategy":"validation","validationCode":"Set<String> available = distributions.stream().map(d -> d.getVersion().toString()).collect(toSet());\nif (!available.contains(requestedVersion)) throw new IllegalArgumentException(\"unsupported minPklVersion \" + requestedVersion + \", have \" + available);\n","typeGuard":"boolean isSupportedVersion(String v, Set<String> available) { return available.contains(v); }\n","tryCatchPattern":"try { executor.evaluatePath(p, options); } catch (ExecutorException e) { if (e.getMessage().startsWith(\"Pkl version\")) { /* adjust minPklVersion or register distribution */ } throw e; }\n","preventionTips":["Keep module minPklVersion values within the versions your executor bundles","Upgrade bundled distributions when bumping module requirements","Pin Pkl versions in CI images","Check the available versions listed in the error before editing"],"tags":["pkl","versioning","compatibility"],"backgroundTag":"dependency-version-incompatible","analyzedSha":"f3efcbfc9b60d30053b0536d664948d7aa1b8673","analyzedAt":"2026-09-08T13:10:45.570Z","contentChangedAt":"2026-09-08T13:10:45.570Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}