apple/pkl · error · ExecutorException
Pkl version `%s` requested by module `%s` is not supported.
Error message
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. What it means
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.
Source
Thrown at pkl-executor/src/main/java/org/pkl/executor/EmbeddedExecutor.java:152
var matcher = MODULE_INFO_PATTERN.matcher(sourceText);
return matcher.find() ? Version.parse(matcher.group(1)) : null;
}
private PklDistribution findCompatibleDistribution(
Path modulePath, Version requestedVersion, ExecutorOptions options) {
var result =
pklDistributions.stream()
.filter(it -> it.getVersion().compareTo(requestedVersion) >= 0)
.min(Comparator.comparing(PklDistribution::getVersion));
if (result.isPresent()) return result.get();
var availableVersions =
pklDistributions.stream()
.map(it -> it.getVersion().toString())
.collect(Collectors.joining(", "));
throw new ExecutorException(
String.format(
"Pkl version `%s` requested by module `%s` is not supported. Available versions: %s%n"
+ "To fix this problem, edit the module's `@ModuleInfo { minPklVersion = \"%s\" }` annotation.",
requestedVersion,
toDisplayPath(modulePath, options),
availableVersions,
requestedVersion));
}
private static Path toDisplayPath(Path modulePath, ExecutorOptions options) {
var rootDir = options.getRootDir();
return rootDir == null ? modulePath : relativize(modulePath, rootDir);
}
// On Windows, `Path.relativize` will fail if the two paths have different roots.
private static Path relativize(Path path, Path base) {
if (path.isAbsolute() && base.isAbsolute() && !path.getRoot().equals(base.getRoot())) {
return path;View on GitHub (pinned to f3efcbfc9b)
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
Example fix
// before
@ModuleInfo { minPklVersion = "0.28.0" } // not available
// after (with 0.27.x distributions installed)
@ModuleInfo { minPklVersion = "0.27.2" } Defensive patterns
Strategy: validation
Validate before calling
Set<String> available = distributions.stream().map(d -> d.getVersion().toString()).collect(toSet());
if (!available.contains(requestedVersion)) throw new IllegalArgumentException("unsupported minPklVersion " + requestedVersion + ", have " + available);
Type guard
boolean isSupportedVersion(String v, Set<String> available) { return available.contains(v); }
Try / catch
try { executor.evaluatePath(p, options); } catch (ExecutorException e) { if (e.getMessage().startsWith("Pkl version")) { /* adjust minPklVersion or register distribution */ } throw e; }
Prevention
- 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
When it happens
Trigger: evaluatePath on a module whose @ModuleInfo minPklVersion is newer (or otherwise incompatible) than every Pkl distribution registered with the embedded executor.
Common situations: 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.
Related errors
- `%s` is too large to fit into a Version.
- `%s` could not be parsed as a semantic version number.
- Pkl module `%s` does not state which Pkl version it requires
- `%s` is too large to fit into a Version.
- Node `%s` of type `%s` does not have a property named `%s`.
AI-assisted analysis of apple/pkl@f3efcbfc9b (2026-09-08).
Data as JSON: /api/errors/48b06687e0591cdc.
Report an issue: GitHub.