You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The extension fails with the SyntaxError: "foo(" must be followed by ) error. Full error message:
Error in CLI:
npx prettier --write ../../../Test.dockerfile
../../../Test.dockerfile
[error] ../../../Test.dockerfile: Error: runtime error: cannot internalize syntax.File
[error] at $callDeferred (/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/mvdan-sh/index.js:5:23866)
[error] at $panic (/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/mvdan-sh/index.js:5:24449)
[error] at AT (/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/mvdan-sh/index.js:9:7075)
[error] at $internalize (/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/mvdan-sh/index.js:5:34691)
[error] at $internalize (/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/mvdan-sh/index.js:5:33981)
[error] at e.$externalizeWrapper.e.$externalizeWrapper (/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/mvdan-sh/index.js:5:30547)
[error] at /Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/mvdan-sh/index.js:7:6619
[error] at e.$externalizeWrapper.e.$externalizeWrapper (/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/mvdan-sh/index.js:5:30597)
[error] at Object.print (/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/prettier-plugin-sh/lib/index.cjs:548:11)
[error] at callPluginPrintFunction (/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/prettier/index.js:8420:26)
[error] at mainPrintInternal (/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/prettier/index.js:8369:22)
[error] at mainPrint (/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/prettier/index.js:8356:18)
[error] at printAstToDoc (/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/prettier/index.js:8348:18)
[error] at coreFormat (/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/prettier/index.js:8653:20)
[error] at formatWithCursor2 (/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/prettier/index.js:8837:18)
[error] at Object.formatWithCursor (/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/prettier/index.js:37229:12)
[error] at format (/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/prettier/cli.js:14748:24)
[error] at formatFiles2 (/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/prettier/cli.js:14860:22)
[error] at async main (/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/prettier/cli.js:15077:5)
[error] at async Object.run (/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/prettier/cli.js:15024:5)
/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/prettier-plugin-sh/lib/index.cjs:499
throw new ShParseError(err);
^
ShParseError [SyntaxError]: "foo(" must be followed by )
at Object.<anonymous> (/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/prettier-plugin-sh/lib/index.cjs:499:19)
at Generator.next (<anonymous>)
at /Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/prettier-plugin-sh/lib/index.cjs:438:61
at new Promise (<anonymous>)
at __async (/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/prettier-plugin-sh/lib/index.cjs:422:10)
at Object.parse (/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/prettier-plugin-sh/lib/index.cjs:470:16)
at Object.parse (/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/prettier/index.js:7334:23)
at coreFormat (/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/prettier/index.js:8645:18)
at formatWithCursor2 (/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/prettier/index.js:8837:18)
at Object.formatWithCursor (/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/prettier/index.js:37229:12)
at format (/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/prettier/cli.js:14748:24)
at formatFiles2 (/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/prettier/cli.js:14860:22)
at async main (/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/prettier/cli.js:15077:5)
at async Object.run (/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/prettier/cli.js:15024:5) {
cause: {},
loc: { start: { column: 1, line: 3 } }
}
Node.js v20.2.0
Errror in VS Code:
["INFO" - 10:52:47 AM] Prettier Options:
{
"arrowParens": "always",
"bracketSpacing": true,
"endOfLine": "lf",
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"singleAttributePerLine": false,
"bracketSameLine": false,
"jsxBracketSameLine": false,
"jsxSingleQuote": false,
"printWidth": 80,
"proseWrap": "always",
"quoteProps": "as-needed",
"requirePragma": false,
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"useTabs": false,
"embeddedLanguageFormatting": "auto",
"vueIndentScriptAndStyle": true,
"filepath": "/Users/maxpatiiuk/site/python/specify7/Test.dockerfile",
"parser": "sh"
}
["ERROR" - 10:52:47 AM] Error formatting document.
["ERROR" - 10:52:47 AM] "foo(" must be followed by )
1 | FROM ubuntu
2 |> 3 | RUN (cd out && ls)
| ^
SyntaxError: "foo(" must be followed by )
1 | FROM ubuntu
2 |> 3 | RUN (cd out && ls)
| ^
at Object.parse (/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/prettier-plugin-sh/lib/index.cjs:443:17)
at Object.parse (/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/prettier/index.js:7334:23)
at coreFormat (/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/prettier/index.js:8645:18)
at formatWithCursor2 (/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/prettier/index.js:8837:18)
at /Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/prettier/index.js:37229:12
at Object.format (/Users/maxpatiiuk/site/python/specify7/specifyweb/frontend/js_src/node_modules/prettier/index.js:37243:12)
at MessagePort.<anonymous> (/Users/maxpatiiuk/.vscode/extensions/esbenp.prettier-vscode-10.1.0/dist/worker/prettier-instance-worker.js:1:717)
at [nodejs.internal.kHybridDispatch] (node:internal/event_target:694:20)
at exports.emitMessage (node:internal/per_context/messageport:23:28)
["INFO" - 10:52:47 AM] Formatting completed in 7ms.
I'm sorry, but actually Dockerfile is not officially supported by https://github.com/mvdan/sh what means only basic and simple Dockerfile usage cases can be handled correctly. We can not do much inside.
When formatting the following Dockerfile:
The extension fails with the
SyntaxError: "foo(" must be followed by )
error. Full error message:Error in CLI:
Errror in VS Code:
System
Replicated with:
and with
The text was updated successfully, but these errors were encountered: