{"record":{"id":"9f3148839eeb1a0e","repo":"apple/pkl","slug":"invalidtripledotsyntax","errorCode":"invalidTripleDotSyntax","errorMessage":"expected `...` or `.../path/to/my_module.pkl`","messagePattern":"expected `\\.\\.\\.` or `\\.\\.\\./path/to/my_module\\.pkl`","errorType":"error_code","errorClass":"URISyntaxException","httpStatus":null,"severity":"error","filePath":"pkl-core/src/main/java/org/pkl/core/util/IoUtils.java","lineNumber":636,"sourceCode":"    // This only influences the behavior of the revocation checker.\n    // Otherwise, proxying is handled by [ProxySelector].\n    System.setProperty(\"http.proxyHost\", proxyAddress.getHost());\n    System.setProperty(\n        \"http.proxyPort\",\n        proxyAddress.getPort() == -1 ? \"80\" : String.valueOf(proxyAddress.getPort()));\n  }\n\n  public static @Nullable String parseTripleDotPath(URI importUri) throws URISyntaxException {\n    var importScheme = importUri.getScheme();\n    if (importScheme != null) return null;\n\n    var schemeSpecificPart = importUri.getSchemeSpecificPart();\n    if (!schemeSpecificPart.startsWith(\"...\")) return null;\n\n    if (schemeSpecificPart.length() == 3) return \"\";\n\n    if (schemeSpecificPart.charAt(3) != '/' || schemeSpecificPart.length() == 4) {\n      throw new URISyntaxException(\n          importUri.toString(), ErrorMessages.create(\"invalidTripleDotSyntax\"));\n    }\n\n    return schemeSpecificPart.substring(4);\n  }\n\n  public static String toUnicodeEscape(int ch) {\n    var hex = Integer.toHexString(ch);\n    return switch (hex.length()) {\n      case 1 -> \"\\\\u000\" + hex;\n      case 2 -> \"\\\\u00\" + hex;\n      case 3 -> \"\\\\u0\" + hex;\n      case 4 -> \"\\\\u\" + hex;\n      default -> throw new IllegalArgumentException(String.valueOf(ch));\n    };\n  }\n\n  public static String toHexEscape(int ch) {","sourceCodeStart":618,"sourceCodeEnd":654,"githubUrl":"https://github.com/apple/pkl/blob/f3efcbfc9b60d30053b0536d664948d7aa1b8673/pkl-core/src/main/java/org/pkl/core/util/IoUtils.java#L618-L654","documentation":"When parsing a triple-dot import URI, the scheme-specific part must be exactly '...' or '.../path'. This URISyntaxException is thrown for malformed forms like '..' + non-slash character (e.g. '..foo' or '...path' without the slash after the dots).","triggerScenarios":"An import string like `import \"...foo\"` or `import \".../ \"`-less variants: the 4th character after the leading '...' exists but is not '/', or the part is exactly 4 chars (e.g. '.../').","commonSituations":"Typo in a triple-dot import — missing slash, extra characters glued to the dots, or an over-abbreviated relative import like `.../` with no path.","solutions":["Write either bare `...` or `.../path/to/module.pkl` with a slash immediately after the dots","Remove stray characters between the dots and the path","If a plain relative import is intended, drop the dots entirely (e.g. `import \"sub/mod.pkl\"`)"],"exampleFix":"// before\nimport \"...my_module.pkl\"\n// after\nimport \".../path/to/my_module.pkl\"","handlingStrategy":"validation","validationCode":"if (s.startsWith(\"...\") && s.length() > 3 && s.charAt(3) != '/') throw new IllegalArgumentException(\"use '...' or '.../path'\");","typeGuard":"function isValidTripleDot(s) { return s === \"...\" || /^\\.\\.\\.\\/.+/.test(s); }","tryCatchPattern":"try { parseTripleDot(uri) } catch (URISyntaxException e) { /* report invalidTripleDotSyntax with correct form */ }","preventionTips":["Memorize the two legal forms: `...` and `.../path/to/module.pkl`","Never put characters between the three dots and the slash","Lint import strings in CI for the .../ pattern"],"tags":["pkl","import","syntax"],"backgroundTag":"invalid-argument-format","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"}